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(integ-runner): cleanup tmp snapshot before running test #23773

Merged
merged 2 commits into from
Jan 20, 2023
Merged

fix(integ-runner): cleanup tmp snapshot before running test #23773

merged 2 commits into from
Jan 20, 2023

Commits on Jan 20, 2023

  1. fix(integ-runner): cleanup tmp snapshot before running test

    The integ-runner obtains information on how to run a test from the
    `integ.json` manifest file in the cloud assembly. In order to get this
    information for a new version of the test it first synthesizes the new
    cloud assembly _only for the purpose of loading the integ manifest_. It
    will then run the actual test which synthesizes again into the same
    cloud assembly directory.
    
    We need to cleanup that first temporary cloud assembly _before_ running
    the actual test to make sure we remove any leftover files. Here is one
    example of what might happen.
    
    1. Do the temporary synthesis and create the cloud assembly at
       `cdk-integ.out.my-test.js/`. This assembly has an asset with some
       hash `asset.abcdefg`.
    2. Do the synthesis while executing the test. The cloud assembly at
       `cdk-integ.out.my-test.js` is updated. This time the asset hash is
       different `asset.123456`. Now we have two assets in the cloud
       assembly and one `asset.abcdefg` is not being used!
    3. Test completes and copies the temporary snapshot to the final
       snapshot directory, including the old asset
    
    I've also added back the `lambda-nodejs/integ.dependencies-pnpm.ts`
    integration test that was removed in #23728. With this fix the test will
    no longer check in the asset file. I also removed the Trigger from the
    test since that is what introduced the always changing diff.
    corymhall committed Jan 20, 2023
    Configuration menu
    Copy the full SHA
    de0e52a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    043ac52 View commit details
    Browse the repository at this point in the history