-
Notifications
You must be signed in to change notification settings - Fork 738
feat(cwl): Create LiveTailSession object and registry. Adds MaxLine configuration #5738
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
Conversation
|
This pull request implements a feature or fix, so it must include a changelog entry. See CONTRIBUTING.md#changelog for instructions. |
packages/core/package.json
Outdated
| }, | ||
| "dependencies": { | ||
| "@amzn/codewhisperer-streaming": "file:../../src.gen/@amzn/codewhisperer-streaming", | ||
| "@aws-sdk/client-cloudwatch-logs": "^3.215.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we able to update this to a slightly newer version? It looks like it created a bunch of churn in the package-lock.json since i'm guessing newer versions of the aws-sdk use different versions of smithy components, etc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes there is a newer version, will push with a revision!
packages/core/src/awsService/cloudWatchLogs/registry/liveTailSessionRegistry.ts
Outdated
Show resolved
Hide resolved
packages/core/src/test/awsService/cloudWatchLogs/registry/liveTailRegistry.test.ts
Outdated
Show resolved
Hide resolved
…onfiguration (aws#5738) 1. On the client side, VSCode needs to be aware of some additional context of a running LiveTail session, other than just the response from the StartLiveTail API call (Abort Controller, Max Lines config, TextDocument URI, etc). 2. Additionally, we want to be able to have multiple LiveTail sessions running, and have a way to organize all of them. 1. Create a LiveTailSession class in AWSToolkit that will persist all of the metadata and context the LiveTail feature needs to operate. 2. Create a LiveTailSessionRegistry that maps a vscode URI to a LiveTailSession. The URI for a LiveTailSession is composed of the API request elements. This will allow us to tell when a user is making a duplicate request. This URI will also be used as the URI of the TextDocument to display the session results. * Adds VSCode preference config for LiveTail max events. This will be used to cap the number of live tail events can be in the TextDocument at a given time. When the limit is reached, the oldest log events will be dropped in order to fit new events streaming in. * Adds a missing String for "Tail Log Group"
Problem
On the client side, VSCode needs to be aware of some additional context of a running LiveTail session, other than just the response from the StartLiveTail API call (Abort Controller, Max Lines config, TextDocument URI, etc).
Additionally, we want to be able to have multiple LiveTail sessions running, and have a way to organize all of them.
Solution
Additional Changes
License: I confirm that my contribution is made under the terms of the Apache 2.0 license.