Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
feat: mutator tracing #1050
feat: mutator tracing #1050
Changes from 7 commits
fa91807
137fce8
661bf6a
7c7f21f
fed7446
90433ab
9ec9bd6
ab1c460
e78b0d7
6727875
6f0cf84
2ea63ad
951200a
ddda29c
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
IMO this needs to be moved one scope up, like it was before, so that the default is also set when the config is not set.
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.
And we need a test for this, so e.g. only setting
cfg.Api.Retry.MaxDelay
, and expecting thegiveUpAfter
default to be set.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.
After looking at this in more detail, the retry config was completely broken in 2a97e05.
I'll revisit this...
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.
Alrighty... the retry configuration is broken all over Oathkeeper. Here's my understanding of what is currently happening:
give_up_after
property specifies the per-retry timeout. That's surprising to me, since it sounds like it means the overall timeout, including retries.max_delay
specifies the maximum backoff wait time in between retries.hashicorp/retryablehttp
).give_up_after
is the overall timeout (including retries).Not sure now is the time to fix this fully, since that could also break users.
With the goal of moving this PR over the line, I propose to keep as much backward-compatibility as possible. This particular mutator previously had no overall timeout and no retries if the retry config was not specified at all. If the retry config was specified (even if
{}
), it peformed up to 4 retries. If the retry config is empty ({}
), the timeouts also changed.This patch keeps that behavior, while fixing bugs:
We should consider revamping the timeout handling all over Oathkeeper in a follow-up ticket.
Thoughts? @zepatrik @aeneasr @daviddelucca ?
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.
This PR is related to activate tracing on mutator. I think we could merge it and open another ticket/branch to work on revamping on timeouts.
Does make sense?