-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
(aws-s3-assets): Object keys don't preserve the full extension name #12699
Comments
Happens because we use aws-cdk/packages/@aws-cdk/core/lib/asset-staging.ts Lines 247 to 249 in 0963f78
Which means this would happen for any multi dot extension. Maybe worth applying some heuristics here or possibly exposing some configuration for the user to specify the extension of an asset. |
Are there any news about this issue? |
This issue has not received any attention in 1 year. If you want to keep this issue open, please leave a comment below and auto-close will be canceled. |
in progress |
…r.gz (#20874) using aws-s3-assets to upload data artifacts of extension `tar.gz` returns an uploaded asset renamed to `<random Id>.gz`. This PR proposes that the AssetStaging Object should be able to check if the uploaded artifact is a `tar.gz` or any other archive tar file with a compression extension and return the appropriate extension name as stagedPath. closes #12699 ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
…r.gz (aws#20874) using aws-s3-assets to upload data artifacts of extension `tar.gz` returns an uploaded asset renamed to `<random Id>.gz`. This PR proposes that the AssetStaging Object should be able to check if the uploaded artifact is a `tar.gz` or any other archive tar file with a compression extension and return the appropriate extension name as stagedPath. closes aws#12699 ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
I'm using aws-s3-assets to upload data artifacts I used for a Sagemaker model. According to the documentation of Sagemaker, the S3 object needs to end with
tar.gz
extension. However, the uploaded asset is renamed to<random-id>.gz
.Reproduction Steps
What did you expect to happen?
I expect the s3 object key is ended with
tar.gz
What actually happened?
The generated object is named as
<id>.gz
. Here is an example output from one run:s3://<bucket-name>/assets/f43ce33c42b10b3e1fe78d87a46cd0dff8611c37637edcf1857a36c33f302ee5.gz
Environment
Other
A possible fix is to add an optional parameter for customize the extension name of the asset.
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: