Hi, has someone experience with the AWS CDK integ-...
# general
m
Hi, has someone experience with the AWS CDK integ-runner command in combination with pants? We currently already use the CDK CLI deploy command within a pants project, now we want to use the CDK integ-runner integration test tool similarly (https://github.com/aws/aws-cdk/tree/main/packages/%40aws-cdk/integ-runner). However, using similar commands and similar BUILD files we get different behaviour from pants. With the commands and BUILD files below we see (through logging in a CDK stack that should be deployed/tested) that the CDK deploy is executed in the project root directory and the integ-runner command is executed in a sandbox directory (even so run_goal_use_sandbox=False was specified): Logging of path.dirname(file):
Copy code
CDK deploy  : /Users/skleber/Projects/.../src/python/.../stacks
integ-runner: /private/var/folders/0v/1sp0_9gd1hvcym9w0bq0fvlm0000gn/T/pants-sandbox-JZQdRZ/src/python/.../stacks
Therefore we encounter problems e.g. for resolving zip files in the dist directory in our project. Commands:
Copy code
CDK deploy  : cdk deploy --app 'pants --no-pantsd run src/python/cdk-dev:app' --all
integ-runner: integ-runner  --language python --app 'pants --no-pantsd run {filePath}:integration-test' --directory ./ --update-on-failed --profiles default
For the integ-runner we need the directory parameter to specify where to recursively look for test files and the {filePath} is injected to the pants run command to execute the integration-test goal there. BUILD files: 1. CDK app
Copy code
python_source(
    name="app",
    source="app.py",
    run_goal_use_sandbox=False,
)
2. integration test
Copy code
python_source(
    name="integration-test",
    source="integ_some_test.py",
    run_goal_use_sandbox=False,
)