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

Integrate restart policy into the container object #4160

Merged
merged 1 commit into from May 6, 2024

Conversation

sparrc
Copy link
Contributor

@sparrc sparrc commented Apr 25, 2024

Summary

  • Integrates restart policy into the Container object, with a helper function to check if the container restart policy is defined and enabled.
  • Initializes the RestartTracker object when unmarshaling the task payload, if the container has a restart policy defined and enabled.
  • go mod vendor in the agent/ dir to pull in ecs-agent/ shared lib changes.

Exact struct naming is still subject to change but this should roughly match the GA feature.

Testing

New tests cover the changes:

Description for the changelog

NA

Does this PR include breaking model changes? If so, Have you added transformation functions?

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-models-2 branch 4 times, most recently from c3f6b64 to 5514c22 Compare May 3, 2024 21:51
{
name: "enabled restart policy",
container: &Container{
RestartPolicy: &restart.RestartPolicy{
Copy link
Contributor

Choose a reason for hiding this comment

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

Just curious, do we/are there plans to validate RestartPolicy isn't empty if restart policy is enabled when we receive the task payload?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's a good question, we may want to validate that when we initialize the restart trackers, let me sync with Fargate dataplane on how we want to do 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 Cam! I also have no issues for this to be a follow up

@sparrc sparrc merged commit b8192fe into aws:feature/crp May 6, 2024
40 checks passed
@sparrc sparrc deleted the crp-models-2 branch May 6, 2024 18:21
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.

None yet

5 participants