Граф коммитов

204 Коммитов

Автор SHA1 Сообщение Дата
Noah Gilson c560ef05e1 Merge branch 'nagilson-intermittent-error-fix' into nagilson-2.0.1-release 2024-01-02 16:34:40 -08:00
Noah Gilson 595003df38 Prepare for 2.0.1 2024-01-02 16:34:09 -08:00
Noah Gilson eb0e3c7d07 Add ability for tests to use a custom install directory 2024-01-02 15:54:39 -08:00
Noah Gilson 18d1d17b53 Migrate to optional installkey for all errors
Some errors can be thrown in contexts without a version to acquire such as the install linux dependencies command. Using ! is an anti pattern and removes type safety. We just need to make sure the install key is included everywhere we error from the acquisition context, which I do believe is the case, otherwise this fix will not work in those edge cases

The other thing to note here is how I added the version being set in the mock acquisition worker... the version is set by the extension in extension.ts but this does not happen in unit tests so we needed to add that logic now that everyone needs an acquisition context to be happy
2023-11-28 15:51:55 -08:00
Noah Gilson 714d2313f1 start propagating the install version to tests as the new api requires that 2023-11-13 09:30:19 -08:00
Noah Gilson 214da6a320 Migrate to x64 VS Code instances for testing as 32-bit is unsupported now 2023-11-09 09:46:29 -08:00
Noah Gilson 27072fcebb wip -- add version to acquisition context mocks so that information is available for tests 2023-11-09 09:23:36 -08:00
Noah Gilson e1fafd6d84 Code cleanup
remove extra sdk feature band check thats already done in the linux distro code
make the context optional in places where it may not actually exist, e.g. if vs code telemetry setting is changed before we call an acquire command, there would be no acquire context
2023-11-08 16:09:39 -08:00
Noah Gilson d7b0ea9bdc Fix circular dependency tree (TypeError: Class extends value undefined is not a constructor or null)
- First moving the mock object import in index.ts resolved the dependency loading order problem where classes were being imported out of order

- Then, removing the getInstallKey function out of the worker prevented loading the vscode module which will always cause a failure in the library tests

- Also cleans up imports and adds whitespace

Some problems remain post refactor which I will fix next
2023-11-08 14:51:56 -08:00
Noah Gilson c1680ff603 Update classes to all have worker contexts
Do this to deduplicate event stream, timeout time, extension state, proxy url, arch, and install key so we can throw errors from other places

uses a hack for the telemetry observer because it needs to be created before the acquisition context can be created
2023-11-08 10:18:25 -08:00
Noah Gilson c57609a756 Move the Global Command Test to the Runtime Extension
Since we arent shipping a new SDK extension, we don't need to duplicate the test in both places.
2023-10-25 15:10:12 -07:00
Noah Gilson b955625510 add the sdk global command to the runtime extension 2023-10-25 14:57:39 -07:00
Noah Gilson bf5253907d Revert "Update vscode to match pipeline version"
This reverts commit 95d9e21ce9.
2023-10-24 11:36:35 -07:00
Noah Gilson 5d5b3ab546 Revert "update shas from the npm upstream, as they have changed for the new vscode version"
This reverts commit 465256b677.
2023-10-24 11:36:16 -07:00
Noah Gilson 144b9b164b Fix build by isolating vscode references
'vscode' cannot be referenced outside of code that's directly part of an extension. So wrapper classes are necessary to access the vscode ui api, or the environment, or the extension context environment. If referencing a file that references these types the build will pass but tests will fail to execute.

The utility context is where things like this will go in the future. Some of these objects must be created before the acquisition context can be ready and it is best to have some 'global' state for utilities. File Utilities could probably go there in the future as well.

It is an ugly hack but the best option. Note the runtime extension test is timing out, which I am investigating.
2023-10-24 11:01:45 -07:00
Noah Gilson f4331b899c Set the environment of the VS Code Terminal
The process environment is for the extension host, which is separate from the vscode terminal environment. That needs to be edited as well, which we now do here.
2023-10-20 11:20:17 -07:00
Noah Gilson 465256b677 update shas from the npm upstream, as they have changed for the new vscode version 2023-10-20 10:21:42 -07:00
Noah Gilson 95d9e21ce9 Update vscode to match pipeline version 2023-10-20 10:15:07 -07:00
Noah Gilson 72f60df30f Fix timeout issue & Set environment correctly on windows
- the shell option is needed for spawn to access windows shell commands, exec does this by default but exec does not capture detailed output streams

- fix a timeout where ms was used as seconds

- note that you need to restart for telemetry notice to change
2023-10-19 16:14:49 -07:00
Noah Gilson 8e06ab0b41 Add Warning if we fail to disable SDK Telemetry 2023-10-18 16:48:15 -07:00
Noah Gilson 38becc9cda Merge remote-tracking branch 'origin/nagilson-global-sdk-install' into nagilson-global-compliance 2023-10-12 15:41:45 -07:00
Noah Gilson 2c30fc843e
Run PATH command for global linux installs 2023-10-11 16:49:37 -07:00
Noah Gilson afeddbc2ef Add alternative options for osx open 2023-10-09 17:01:00 -07:00
Noah Gilson 01ef243e64 Respond to my own PR Feedback
Move to event strem events so they get published correctly, refactor code for easier reading and maintenance
2023-10-06 09:44:48 -07:00
Noah Gilson 594659acd1 Respond to pr feedback from Sarah to improve code quality 2023-10-03 13:58:23 -07:00
Noah Gilson ab7c2c8360 Merge with Main
Move global code to axios. Expect JSON objects from the web worker
Fix typos
Fix package json and yarn lock files that got messy in the merge (we delibereately merged with conflicts.)
Forward proxy into web workers created by global code (should verify that everyone is using the proxy, could be done cleaner)
mock objects use the newer interfaces
2023-10-03 11:48:17 -07:00
Noah Gilson 1df99b44fd Merge remote-tracking branch 'upstream/main' into nagilson-global-sdk-install 2023-10-02 17:00:54 -07:00
Noah Gilson 508c1fd3af Merge remote-tracking branch 'upstream/main' into nagilson-licensing 2023-09-25 14:59:09 -07:00
Noah Gilson aa1037a1c7 Improve whitespace from licensing
Co-authored-by: Annie Li <59816815+JL03-Yue@users.noreply.github.com>

Improve whitespace from file licensing.

Co-authored-by: Annie Li <59816815+JL03-Yue@users.noreply.github.com>

Improve whitespace from file licensing.

Co-authored-by: Annie Li <59816815+JL03-Yue@users.noreply.github.com>

Improve whitespace from file licensing.

Co-authored-by: Annie Li <59816815+JL03-Yue@users.noreply.github.com>

Improve whitespace from file licensing.

Co-authored-by: Annie Li <59816815+JL03-Yue@users.noreply.github.com>

Improve whitespace from file licensing.

Co-authored-by: Annie Li <59816815+JL03-Yue@users.noreply.github.com>

Improve whitespace from file licensing.

Co-authored-by: Annie Li <59816815+JL03-Yue@users.noreply.github.com>

Improve whitespace from file licensing.

Co-authored-by: Annie Li <59816815+JL03-Yue@users.noreply.github.com>

Improve whitespace from file licensing.

Co-authored-by: Annie Li <59816815+JL03-Yue@users.noreply.github.com>

Improve whitespace from file licensing.

Co-authored-by: Annie Li <59816815+JL03-Yue@users.noreply.github.com>

Improve whitespace from file licensing.

Co-authored-by: Annie Li <59816815+JL03-Yue@users.noreply.github.com>

Improve whitespace from file licensing.

Co-authored-by: Annie Li <59816815+JL03-Yue@users.noreply.github.com>
2023-09-25 11:08:00 -07:00
Noah Gilson cded2e1dc7 Correct File Licensing Info
Files here should be licensed under the .NET Foundation, not Microsoft Corporation.
2023-09-21 16:20:57 -07:00
Noah Gilson 7261d09659 Remove Legacy Only After Completion
Fixes SDK tests
Improves event variable names to match what they are actually getting

A few events still use version. This may be a bit annoying with the telemetry, because the beginning events are before architecture is determined, so they use a different version key vs the install key. I worry this may make it harder to drive failure insights. We could change this. but I left it because this is technically an existing problem -- the version used in these events is the unresolved version, so it will not be the fully specified version used in later events.

I moved the removal of legacy installs down incase someone is offline, then we keep their legacy install if the new install failed to reduce breakage chance
2023-09-21 10:44:15 -07:00
Noah Gilson b19a43d065 Migrate to 8.0 + Remove e2e test
the e2e test to show sdk and runtime versions did not remove each other did not work as the sdk commands are not registered in the other extension

we could eventually fix this

the versions will be different as the fully specified version is given in production, which is how they should not overlap
2023-09-20 16:51:01 -07:00
Noah Gilson 51f4b126fe Correctly delete legacy installs
Need to update api to allow architecture so we can test it from an e2e
2023-09-20 16:31:13 -07:00
Noah Gilson 7488098c6b Fix mock objects and add auto proxy detection 2023-09-08 17:01:38 -07:00
Noah Gilson f874acba33 Add extension requester id to the downloading msg 2023-08-29 17:06:00 -07:00
Noah Gilson bc1e689523 Respond to PR feedback, Downgrade is-online, upgrade node
see https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
for why is-online is downgraded
2023-08-28 15:14:16 -07:00
Noah Gilson ced82f3150 Make the web request timeouts work
Axios deprecated cancel tokens so you need to use this new abort controller thing.
2023-08-28 10:30:07 -07:00
Noah Gilson 429906f15f Fix linter issues 2023-08-24 12:29:16 -07:00
Noah Gilson 0a9bb5fd3b Merge remote-tracking branch 'upstream/main' into nagilson-axios 2023-08-24 11:20:36 -07:00
Noah Gilson e17e399420
Merge pull request #1320 from nagilson/nagilson-171-release
Increase Timeout Time, Change File, 1.7.1 Release
2023-08-24 09:51:44 -07:00
Noah Gilson 104ba2b066 Update the changelog 2023-08-23 15:49:03 -07:00
Chet Husk bc489b0702 update default download timeout to 10 minutes and update documentation universally 2023-08-23 15:19:29 -07:00
Chet Husk 46a7766df0 Address Noah's review notes 2023-08-22 22:03:41 -05:00
Noah Gilson cec4ba1a94 Update timeout time to 10 minutes and add cache timeout test 2023-08-22 16:24:11 -07:00
Noah Gilson dd9935bc71 Merge branch 'nagilson-171-release' into nagilson-axios
Add to the local SDK tests that fail if you have a global SDK a warning so they dont fail when building on a devbox
Merge in the version resolver changes to expect a json object from WRWorker
Merge all of the package upgrades together
2023-08-22 14:31:53 -07:00
Chet Husk eb76988ca5
Update README.md with telemetry notice 2023-08-22 15:58:10 -05:00
Noah Gilson 584e0ae89d Annotate the assert type as chai now requires this 2023-08-22 09:31:21 -07:00
Noah Gilson 1592defcbb Learn how to attach function to on did change telemetry enabled event 2023-08-18 15:38:48 -07:00
Chet Husk cfb1f90ef1
Merge branch 'main' into reword-runtime-extension 2023-08-18 14:55:12 -05:00
Chet Husk 53906ffefd
Merge branch 'main' into reword-runtime-extension 2023-08-18 11:06:09 -05:00