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

Fix Windows CI fail fast #3694

Merged
merged 6 commits into from
May 15, 2023
Merged

Fix Windows CI fail fast #3694

merged 6 commits into from
May 15, 2023

Conversation

amogh09
Copy link
Contributor

@amogh09 amogh09 commented May 12, 2023

Summary

Currently the Windows CI Unit Test Github workflow does not fail on test failures in agent module. This bug was introduced when tests for ecs-agent module were added to the workflow in #3651. The root cause is that the test script for Windows does not fail fast if an intermediate step fails with a non-zero code. It only cares about the exit code of the last step.

For windows-latest runners, pwsh is the default shell used for Github workflows. Github documentation for pwsh says -

Fail-fast behavior when possible. For pwsh and powershell built-in shell, we will prepend $ErrorActionPreference = 'stop' to script contents.

However, the Windows unit tests workflow is not failing fast even when $ErrorActionPreference = 'stop' is explicitly specified in the script.

This PR solves this issue by creating a new workflow step for running ecs-agent tests against Windows.

Testing

Tested by making a unit test fail.

New tests cover the changes: no

Description for the changelog

Fix Windows CI unit tests workflow

Licensing

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

@amogh09 amogh09 changed the base branch from master to dev May 12, 2023 17:57
@amogh09 amogh09 changed the title Fix windows ci Fix windows CI May 12, 2023
@amogh09 amogh09 changed the title Fix windows CI Fix Windows CI May 12, 2023
@amogh09 amogh09 changed the title Fix Windows CI Fix Windows CI fail fast May 12, 2023
@amogh09 amogh09 marked this pull request as ready for review May 12, 2023 19:10
@amogh09 amogh09 requested a review from a team as a code owner May 12, 2023 19:10
@amogh09 amogh09 merged commit ed885c0 into aws:dev May 15, 2023
Realmonia pushed a commit to Realmonia/amazon-ecs-agent that referenced this pull request May 16, 2023
RichaGangwar pushed a commit to RichaGangwar/amazon-ecs-agent that referenced this pull request May 18, 2023
Realmonia pushed a commit to Realmonia/amazon-ecs-agent that referenced this pull request May 21, 2023
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.

5 participants