-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Description
Describe the bug
Using AgentRuntimeArtifact.fromAsset() for generating an agent Docker image from the local filesystem will add an MD5 hash of the root directory to the Asset name. This causes a CDK pipeline to self-mutate whenever contents of the Docker image base directory changed (which migh happen quite often).
(In our case it even caused an endless loop of self-mutation as we had a root directory that changed on each build).
Compare e.g. with Docker images built for Lambda functions this hash is not added to the Asset's name.
So we expect this to be the desired behaviour instead of the one for agents.
Regression Issue
- Select this option if this issue appears to be a regression.
Last Known Working CDK Library Version
No response
Expected Behavior
The name of the Asset does not change when the contents of the Docker directory are changed.
Current Behavior
Upon each change of the Docker base directory the pipeline will self-mutate.
Reproduction Steps
- Create a CDK pipeline building and Agent based on the local filesystem.
- Run the pipeline once.
- Change sth. in the base directory for the Docker image.
- Run the pipeline again.
- The pipeline will self-mutate
Possible Solution
No response
Additional Information/Context
No response
AWS CDK Library version (aws-cdk-lib)
2.222.0
AWS CDK CLI version
2.1030.0
Node.js Version
22
OS
Windows 11
Language
TypeScript
Language Version
5.8.2
Other information
No response