Skip to content

Conversation

@Abogical
Copy link
Member

@Abogical Abogical commented Jan 7, 2026

Reason for this change

Tests that timeout will leave an expired token which can't be used to release Atmosphere resources. See the following for an example: https://github.com/aws/aws-cdk/actions/runs/20137124927/job/57793467916#step:12:475

Description of changes

This commit solves this by throwing a warning instead of an error if the Atmosphere release request fails.

Describe any new or updated permissions being added

No new permissions are added.

Description of how you validated changes

Added unit test.

Checklist


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

@Abogical Abogical changed the title ci(integration-test-deployment): timeout tests before token expiry. ci(integration-test-deployment): timeout tests before token expiry Jan 7, 2026
@aws-cdk-automation aws-cdk-automation requested a review from a team January 7, 2026 09:54
@github-actions github-actions bot added p2 star-contributor [Pilot] contributed between 25-49 PRs to the CDK labels Jan 7, 2026
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Jan 7, 2026
@Abogical Abogical force-pushed the integ-deployment-timeout-short-circuit-fix branch 4 times, most recently from 4a75ce2 to 44e8bb7 Compare January 7, 2026 11:00
@Abogical Abogical marked this pull request as ready for review January 7, 2026 11:00
await allocation.release(outcome);
try {
await allocation.release(outcome);
} catch (e) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we catch the token expired error only and not all the errors? Otherwise we're going to hide other problems

Copy link
Member Author

@Abogical Abogical Jan 7, 2026

Choose a reason for hiding this comment

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

  • It already leaves a warning annotation for any errors, including expired tokens.
  • Regardless of the error, I don't think that an error when it comes to releasing should be fatal and stop the entire test.

Copy link
Contributor

Choose a reason for hiding this comment

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

Regardless of the error, I don't think that an error when it comes to releasing should be fatal and stop the entire test.

I disagree! if we think so then we shouldn't need to release at all. If we think the release is important but we know that there's a specific case isn't important then only catch gracefully this case but not all

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok. I've made the error caught only if it is due to an expired security token.

});

test('failed Atmosphere release requests create a warning and proceeds with the next batch', async () => {
jest.spyOn(integRunner, 'deployIntegrationTest').mockImplementation(() => {
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the point of mocking this part?

Copy link
Member Author

@Abogical Abogical Jan 7, 2026

Choose a reason for hiding this comment

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

This is to simulate an integration test failure caused by a timeout. This is the same scenario where the original bug occured: https://github.com/aws/aws-cdk/actions/runs/20137124927/job/57793467916#step:12:475

@Abogical Abogical force-pushed the integ-deployment-timeout-short-circuit-fix branch from 44e8bb7 to 4f6af13 Compare January 7, 2026 13:08
@mergify
Copy link
Contributor

mergify bot commented Jan 7, 2026

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify
Copy link
Contributor

mergify bot commented Jan 7, 2026

Merge Queue Status

✅ The pull request has been merged at dfabadf

This pull request spent 1 hour 16 minutes 36 seconds in the queue, including 38 minutes 46 seconds running CI.
The checks were run in-place.

Required conditions to merge

@mergify
Copy link
Contributor

mergify bot commented Jan 7, 2026

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit 4f41a8e into main Jan 7, 2026
17 of 18 checks passed
@mergify mergify bot deleted the integ-deployment-timeout-short-circuit-fix branch January 7, 2026 15:04
@github-actions
Copy link
Contributor

github-actions bot commented Jan 7, 2026

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

contribution/core This is a PR that came from AWS. p2 star-contributor [Pilot] contributed between 25-49 PRs to the CDK

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants