-
Notifications
You must be signed in to change notification settings - Fork 424
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(dev): Stop code generation action #5675
Open
tverney
wants to merge
87
commits into
aws:master
Choose a base branch
from
tverney:feature/stop-progress-status
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This pull request implements a feature or fix, so it must include a changelog entry. See CONTRIBUTING.md#changelog for instructions. |
…rence for stop code generation
…tance and abort the individual call
tverney
force-pushed
the
feature/stop-progress-status
branch
from
September 27, 2024 17:42
0588d8e
to
e604672
Compare
…cancellation should be in gen
This pull request modifies code in src/ but no tests were added/updated. Confirm whether tests should be added or ensure the PR description explains why tests are not required. |
Add stop code gen telemetry
## Problem: When a user does a sleep then wake of their computer, the heartbeat is not up to date since it cannot be sent when the user's computer is asleep. Due to this there is a race condition on wake between the next fresh heartbeat being sent versus when we check the heartbeats to determine if they are stale (crash). If the crash checker runs before a new heartbeat can be sent, it will be seen as a crash. ## Solution: Use a TimeLag class that helps to determine when there is a time discrepancy. It works by updating a state every second, and if we determine that the next update to that state took longer than a second, we determine that there was a lag. Then we simply skip the next crash check, allowing a fresh heartbeat to be sent. --- <!--- REMINDER: Ensure that your PR meets the guidelines in CONTRIBUTING.md --> License: I confirm that my contribution is made under the terms of the Apache 2.0 license. --------- Signed-off-by: nkomonen-amazon <[email protected]>
Initial code for a rule engine to determine whether or not to show an in-IDE notification. A notification is a JSON payload with a set amount of criteria. The rule engine accepts context from the currently running extension then determines if the notification payload's criteria will fit the provided context. The types match the commonly designed schema, but may change in future commits. Future work: - More docs - Updates to types and/or criteria - Code that will use this --- <!--- REMINDER: Ensure that your PR meets the guidelines in CONTRIBUTING.md --> License: I confirm that my contribution is made under the terms of the Apache 2.0 license.
See each commit message for revelant fix --- <!--- REMINDER: Ensure that your PR meets the guidelines in CONTRIBUTING.md --> License: I confirm that my contribution is made under the terms of the Apache 2.0 license. --------- Signed-off-by: nkomonen-amazon <[email protected]>
…ws#5802) Add animation for View Diff and Apply Diff buttons. Demo - https://github.com/user-attachments/assets/05092447-be86-4dc8-89b5-ecb7c4bfee0f License: I confirm that my contribution is made under the terms of the Apache 2.0 license.
Since the amazonq one is empty --- <!--- REMINDER: Ensure that your PR meets the guidelines in CONTRIBUTING.md --> License: I confirm that my contribution is made under the terms of the Apache 2.0 license. Signed-off-by: nkomonen-amazon <[email protected]>
## Problem Follow up from aws#5761 (comment). ## Solution `npm uninstall --save '@types/fs-extra' 'fs-extra' -w packages/core/`
## Problem Follow up to: aws#5761 (comment) ## Solution - target a version of `@types/node` that is closer to the actual version running in CI. - add a techdebt.test.ts reminder.
## Problem Limited ability to diagnose problems with EC2 instances provided in the toolkit. ## Solution Add a right click option to provide system log of Ec2 instance in read-only file view. ### Implementation Details - Log view does NOT live update. This would require refactoring the CWL significantly. Better to get the feature out and see if this is something customers want/need. - To reduce code duplication two new utility components were added `decodeBase64` in`core/src/shared/utilities/textUtilities.ts` and `UriSchema` in `core/src/shared/utilities/uriUtils.ts`. - `decodeBase64` is a helper function to wrap the use of `Buffer.from(X, "base64").toString()` throughout the toolkit. - `UriSchema` provides a general framework for translating between an object and an URI, and vice versa. It allows us to avoid writing the `isValid` method in all cases. With more work this could likely be more general, but is only used twice so unclear if it is worth pursuing. - These changes involved changing some function calls, especially in the CWL code, but does not impact functionality. ### Pictures <img width="1231" alt="image" src="https://github.com/user-attachments/assets/0991c51e-6e27-4102-a85f-08246a7faab0"> <img width="1508" alt="image" src="https://github.com/user-attachments/assets/558d831f-7a7c-475b-9400-719ce8fd99d7"> --- <!--- REMINDER: Ensure that your PR meets the guidelines in CONTRIBUTING.md --> License: I confirm that my contribution is made under the terms of the Apache 2.0 license. --------- Co-authored-by: Justin M. Keyes <[email protected]>
) ## Problem We want to enforce that the private key generated by the toolkit is not accidentally slipped into a telemetry metric. ## Solution Similar to `assertTelemetry`, we implement a `assertNoTelemetryMatch` test utility that scans all metrics to see if a specified keyword is included in its keys or values. With this utility, it is relatively straightforward to assert that this private key doesn't appear in the telemetry when we generate it and perform other operations with it. --- <!--- REMINDER: Ensure that your PR meets the guidelines in CONTRIBUTING.md --> License: I confirm that my contribution is made under the terms of the Apache 2.0 license. --------- Co-authored-by: Justin M. Keyes <[email protected]>
Creates our own version of an Interval, similar to how we have our own Timeout --- <!--- REMINDER: Ensure that your PR meets the guidelines in CONTRIBUTING.md --> License: I confirm that my contribution is made under the terms of the Apache 2.0 license. Signed-off-by: nkomonen-amazon <[email protected]>
increment the time that we wait for the interval to finish since it runs slower in ci --- <!--- REMINDER: Ensure that your PR meets the guidelines in CONTRIBUTING.md --> License: I confirm that my contribution is made under the terms of the Apache 2.0 license. Signed-off-by: nkomonen-amazon <[email protected]>
Problem: c8 was not given a reporter, therefore it defaulted to `text` which is the terminal. Solution: Set it to `lcov`, which is what we have been using previously. Note: More work may be needed on the .c8rc.json files. We might not need the one for core/ anymore. They may not be configured in the optimal way. Is it behaving how we want it to? --- <!--- REMINDER: Ensure that your PR meets the guidelines in CONTRIBUTING.md --> License: I confirm that my contribution is made under the terms of the Apache 2.0 license.
…rence for stop code generation
…tance and abort the individual call
…cancellation should be in gen
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
Currently /dev don't support stop code generation. This PR introduces this functionality (watch the video below).
Solution
Mynah UI provides onStopChatResponse API which we can hook in the cancellation token provided on VS Code, sharing across an active session, aborting current progress.
Screen.Recording.2024-10-16.at.10.11.20.AM.mov
Notes:
License: I confirm that my contribution is made under the terms of the Apache 2.0 license.