-
Notifications
You must be signed in to change notification settings - Fork 190
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
chore: set context timeout for access to kv #152
Conversation
/azp run pr-e2e-azure |
Azure Pipelines successfully started running 1 pipeline(s). |
cmd/main.go
Outdated
// setting the context to 1m50s will ensure request is terminated if taking longer/unable to establish connection due to underlying network error and | ||
// the correct error is returned back to the driver | ||
// Value is set to 1m50s to provide enough time for driver to complete outstanding operations | ||
ctx, cancel := context.WithTimeout(context.Background(), 1*time.Minute+50*time.Second) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we make this configurable and default to 1m50s?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ritazh Good idea! We can add a context-timeout
flag in the provider and default that to 1m50s for the time being. For addition of this flag as mandatory in the driver, I'll add an item in the agenda next week so we can discuss how we want to do this? This would require an update in all the providers to support the flag before we add to driver.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
What this PR does / why we need it:
Sample error when network policies deny outbound traffic in cluster -
The request only times out after 10m as there is no context defined
Which issue(s) this PR fixes (optional, using
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when the PR gets merged):Fixes #
Special notes for your reviewer: