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 restart count to TMDE v4 response #4166

Merged
merged 2 commits into from
May 22, 2024
Merged

Conversation

sparrc
Copy link
Contributor

@sparrc sparrc commented May 6, 2024

Summary

Update v4 TMDE with the restart count of the container, if the container has a restart policy enabled.

Testing

unit tests updated, manual check on restart count being incremented as expected

Description for the changelog

NA

Licensing

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@sparrc sparrc force-pushed the crp-tmde branch 10 times, most recently from 6db4637 to 0d00199 Compare May 17, 2024 23:08
@sparrc sparrc changed the title [WIP] Add restart count to TMDE v4 response Add restart count to TMDE v4 response May 20, 2024
hozkaya2000
hozkaya2000 previously approved these changes May 21, 2024
if !ok {
// did not find container, continue on and try next container(s)
// we don't return error here to avoid disrupting all of a TMDS response
// on a single missing container.
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we add a log at warning or debug level if the container cannot be found from the state?
Like https://github.com/aws/amazon-ecs-agent/blob/master/agent/handlers/v4/stats_response.go#L41-L46.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes I can add that

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks!

@sparrc sparrc merged commit bf11e80 into aws:feature/crp May 22, 2024
40 checks passed
sparrc added a commit that referenced this pull request Jun 26, 2024
* Add restart count to TMDE v4 response

* Add warning log message if container is not found in internal state
sparrc added a commit that referenced this pull request Jul 29, 2024
* Add restart count to TMDE v4 response

* Add warning log message if container is not found in internal state
sparrc added a commit that referenced this pull request Jul 29, 2024
* Add restart count to TMDE v4 response

* Add warning log message if container is not found in internal state
sparrc added a commit that referenced this pull request Jul 29, 2024
* Add restart count to TMDE v4 response

* Add warning log message if container is not found in internal state
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants