Run Github action Linux tests on ubuntu-22.04 #4479
Merged
+1
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Explicitly run Linux unit tests Github action using ubuntu-22.04 instead of ubuntu-latest (which recently was updated to point to ubuntu-24.04 instead of ubuntu-22.04).
Currently, some ecs-init unit tests make an assumption on the expected total number of Agent host config binds. However, when running these tests on ubuntu-24.04 a different number of Agent host config binds end up occurring since some Agent host config binds are binded dynamically depending on host configuration. This results in Linux unit tests Github action workflow failing on new pull requests opened to amazon-ecs-agent repository, which blocks merging of new functionality.
This pull request is to go back to using ubuntu-22.04 (which has an LTS end-of-life date of Apr 2027; ref) to run Linux unit tests. This aligns with what was being done up until the point ubuntu-latest was recently updated to point to ubuntu-24.04. This is so that merging new pull requests is unblocked. Separately, ECS Agent team will re-visit its test implementation for ecs-init unit tests which make assumptions on expected total number of Agent host config binds and see if improvements can be made for those tests to be more resilient to dependency changes which ECS Agent team does not control.
Implementation details
See "Summary" section above.
Testing
Automated pull request tests.
New tests cover the changes: N/A
Description for the changelog
Run Github action Linux tests on ubuntu-22.04
Additional Information
Does this PR include breaking model changes? If so, Have you added transformation functions?
No
Does this PR include the addition of new environment variables in the README?
No
Licensing
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.