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

integ-runner: exit code 1 despite tests passing #33279

Open
1 task
graydenshand opened this issue Feb 3, 2025 · 1 comment
Open
1 task

integ-runner: exit code 1 despite tests passing #33279

graydenshand opened this issue Feb 3, 2025 · 1 comment
Labels
@aws-cdk/integ-runner bug This issue is a bug. effort/medium Medium work item – several days of effort p2

Comments

@graydenshand
Copy link
Contributor

Describe the bug

If a change contains destructive changes, integ-runner will exit with exit code 1 with the following message:

Tests:    2 passed, 2 total
Error: Some changes were destructive!
    at main (~/.nvm/versions/node/v18.17.1/lib/node_modules/@aws-cdk/integ-runner/lib/index.js:10271:11)

This happens even when the tests pass and the --disable-update-workflow flag is used.

Regression Issue

  • Select this option if this issue appears to be a regression.

Last Known Working CDK Version

No response

Expected Behavior

I expect that if the tests pass with --disable-update-workflow, that the job succeeds.

Current Behavior

The job fails with exit code 1.

Reproduction Steps

  1. Make a destructive change.
  2. Run integration tests using integ-runner --update-on-failed --disable-update-workflow
  3. Check the exit code via echo $?

Possible Solution

Two ideas:

  • exit with code 0 to indicate that the tests succeeded without error and that the snapshots have been updated.
  • exit with some other code (not 1) to differentiate this error from an actual test failure.

Additional Information/Context

In my project I use a CI job which executes the integration tests and commits the new snapshot files. With this bug, I need to run integration tests using the following pattern to suppress this error in order for the new snapshots to be committed:

integ-runner ... || true

However, given that exit code 1 is used for genuine test failures, those errors are suppressed as well.

CDK CLI Version

2.174.0

Framework Version

No response

Node.js Version

v18.17.1

OS

MacOS

Language

Python

Language Version

No response

Other information

No response

@graydenshand graydenshand added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Feb 3, 2025
@pahud pahud self-assigned this Feb 5, 2025
@pahud
Copy link
Contributor

pahud commented Feb 5, 2025

Thank you for the feedback. Will bring this up to the team for review and inputs.

@pahud pahud added p2 and removed needs-triage This issue or PR still needs to be triaged. labels Feb 5, 2025
@pahud pahud removed their assignment Feb 5, 2025
@pahud pahud added the effort/medium Medium work item – several days of effort label Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/integ-runner bug This issue is a bug. effort/medium Medium work item – several days of effort p2
Projects
None yet
Development

No branches or pull requests

2 participants