Skip to content
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

Add configurable Stash timeout #2021

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

vlerdman
Copy link

What is the problem I am trying to address?

Currently stash has hardcoded 10 minutes timeout which may leads to timeout errors.

How is the fix applied?

Add timeout field to stasher for using in Stash call. It's configurable via ATHENS_TIMEOUT var.

What GitHub issue(s) does this PR fix or close?

Fixes #1964
Fixes #1960

@vlerdman vlerdman requested a review from a team as a code owner January 15, 2025 09:42
@@ -105,7 +105,7 @@ func addProxyRoutes(
if err != nil {
return err
}
st := stash.New(mf, s, indexer, stash.WithPool(c.GoGetWorkers), withSingleFlight)
st := stash.New(mf, s, indexer, c.TimeoutDuration(), stash.WithPool(c.GoGetWorkers), withSingleFlight)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you are reusing the ATHENS_TIMEOUT variable, I'd suggest documenting that it now also serves this purpose.

Also, I don't know if there is a direct correlation between the timeout users might want to use for the VCS lister and for the stash. I'll let the others decide on whether it should be separate timeouts or not.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for comment! Also want to mention, that stasher uses storage backend for uploading files, and for some providers (for example s3) it uses ATHENS_TIMEOUT as timeout for upload operations. It was a reason for reusing ATHENS_TIMEOUT instead of adding separete var, as for me it would be more clear behaviour.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make Stash timeout configurable
2 participants