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: enable job logs command #3794
Conversation
…d custom prefixes
use pagination for log stream fetching. rename variables. make sure log stream truncation and filtering are engaged in tests.
feat: enable command test: add job logs ask and validate tests; rename svcAppNameHelpPrompt chore: add execute tests
- chore: add job logs logic and validation - chore: update cloudwatchlogs to allow limiting log streams fetched and custom prefixes - chore: rename service.go to workload.go in logging pkg - chore: add logic for fetching state machine logs to workload - chore: add unit tests for workload logging pkg Adds unit tests and changes for the cloudwatchlogs and logging libraries necessary for job logs, specifically for getting one or N executions at a time, optionally including state machine logs. By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the Apache 2.0 License.
It's made moot later, see this comment: https://github.com/aws/copilot-cli/pull/3794/files#r933412494
require.Equal(t, param.LogStreamPrefixFilters, []string{"copilot/", "states"}) | ||
require.Equal(t, param.Limit, aws.Int64(10)) | ||
require.Equal(t, param.LogStreamLimit, 2) |
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 still interested in what's passed in param.Limit
? If so, what do you think of
require.Equal(t, param.LogStreamPrefixFilters, []string{"copilot/", "states"})
require.Equal(t, param,Limit aws.Int(10))
require.Equal(t, param.LogStreamLimit, 2)
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.
Good idea; i've added a check here and a new test to ensure that some log stream limit behavior is working properly.
Co-authored-by: Wanxian Yang <79273084+Lou1415926@users.noreply.github.com>
Co-authored-by: Wanxian Yang <79273084+Lou1415926@users.noreply.github.com>
Co-authored-by: Wanxian Yang <79273084+Lou1415926@users.noreply.github.com>
… logStreamLimit work together
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.
LGTM! Feel free to remove the label when you are ready (I did it but then added it back just in case you wanted to add anything)
Adds job logs command and fixes a bug which randomized the sort order of log streams.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the Apache 2.0 License.