S3 plugin fails to download artefacts due to presigned URLs are expired

Hi,

Currently using this https://github.com/JetBrains/teamcity-s3-artifact-storage-plugin to store artifacts in S3.

We have an ongoing issue where the presigned URLs sent to agent for downloading an artefact is already expired when they try to process it.

I see from the code (https://github.com/JetBrains/teamcity-s3-artifact-storage-plugin/blob/master/s3-artifact-storage-common/src/main/java/jetbrains/buildServer/artifacts/s3/S3Constants.java#L16) that it is possible to override the default (https://github.com/JetBrains/teamcity-s3-artifact-storage-plugin/blob/master/s3-artifact-storage-common/src/main/java/jetbrains/buildServer/artifacts/s3/S3Constants.java#L20) time to expire which is set to 60 seconds, via a system property called storage.s3.url.expiration.time.seconds.

Also relevant code:

https://github.com/JetBrains/teamcity-s3-artifact-storage-plugin/blob/master/s3-artifact-storage-server/src/main/java/jetbrains/buildServer/artifacts/s3/preSignedUrl/S3PreSignedUrlProviderImpl.java#L37

But there is no documentation on how we can change this value without building the code on our own.

Please advice

 

1 comment
Comment actions Permalink

Figured it out. Since the presigned url is generated on the teamcity instance and not the build agents, the system variable needs to be set on that server.

We increased the value and haven't seen an error yet

0

Please sign in to leave a comment.