peak / s5cmd

Parallel S3 and local filesystem execution tool.
MIT License
2.71k stars 241 forks source link

fix: renew the session token when the token expires #683

Open MqllR opened 11 months ago

MqllR commented 11 months ago

This PR fix https://github.com/peak/s5cmd/issues/678

In a Kubernetes context, when running a very long process, we can easily fall into the ExpiredToken error. In order to not introduce any performance degradation, I propose to keep to global variable caching the session token but clear it when catching this specific error. The session will be renewed by reading again the projected volume /var/run/secrets/eks.amazonaws.com/serviceaccount/token.

jasonyic commented 11 months ago

this is also an issue on our side and could speed up the review & release process? thank you.

l1n commented 3 months ago

+1, this would be great to have!

tooptoop4 commented 1 month ago

@MqllR does the error only happen if s5cmd runs for more than hour? or it happens when trying to run short s5cmd on pod that is older than an hour?