Skip to content
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

Add cloudwatch logs for gradle-check job #434

Merged
merged 1 commit into from
Jun 27, 2024

Conversation

rishabh6788
Copy link
Collaborator

Description

Add cloudwatch logs for gradle-check job.
In the future similar configuration can be added if we want to onboard other job logs as well.

Issues Resolved

List any issues this PR will resolve, e.g. Closes [...].

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Rishabh Singh <sngri@amazon.com>
Comment on lines +399 to +400
auto_removal: true,
log_stream_name: 'gradle-check.log/{date}',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would date create too many log-streams? Also forgot what auto-removal does. Any idea?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no limit on how many log streams can be created.
The choice is either push everything into one log stream or have one created daily so that it becomes easier to find the log one is looking for and faster, since it will contain only limited logs.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reg auto_removal, it is mainly helpful when you have some sort of log rotation happening, particularly on logs that are suffixed, e.g., sys.log is your main log file and your rotation logs creates sys.log.1 after each hour. In this case CW is supposed to clean up the rotated log.

But in our case it is not the case and the flag doesn't do anything.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah we can think about adding log retention policy. I believe it will be just too much logs. Even jenkins has 30 day retention policy for gradle-check logs. Can come as an enhancement.

@rishabh6788 rishabh6788 merged commit 42f176f into opensearch-project:main Jun 27, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

2 participants