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
Refactor request marking for serverless and operator modes #110370
Refactor request marking for serverless and operator modes #110370
Changes from 30 commits
6741289
c76b56d
bc973c9
5734020
083995c
eef7fbf
55e562f
2160008
ba37140
01b9171
efb0cba
4a87239
409e957
24b4891
c9eecb2
046bd6e
2fc4e32
41a477a
058f591
340dde0
ca33943
bf0d176
0581c71
1081d32
86a066d
e71cd56
52146d2
dea8e5b
d25a178
a95764f
f9b728b
82d3db7
451e10d
7b3f927
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.
Is this necessary because we are marking the request earlier in the process ?
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.
we need this because we now set the parameter for actions for which we did not set it before (we didn't set the parameter for internal actions previously, now we do). A couple of these actions (e.g.,
RestDeleteSnapshotAction
) overrideallSupportedParameters
which in turn means that we run a check against all request parameters and reject "unsupported" ones. The default (for virtually all other actions) is to returnnull
which means no check, so we simply didn't exercise this code path before.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.
nit: technically, we don't need to use case-insensitive checking (arguably we shouldn't be since http params are case intensive). If we don't case insensitive checking, the request with these paramas (say all uppercase) would still fail due to the consumed params check. I do slightly prefer the case-insenstive check since it prevents someone from accidentally mirroring these names with slightly different case. However, this code is called for every request and could save a couple clock cycles (I think) and a couple allocations (I think) if we ignored case and just did a set.contains. Micro optimization for sure, but would make for a simple micro benchmark. super nitpick, nothing wrong as-is, so feel free to ignore this comment.
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.
I agree with the potential optimization but would prefer to keep this refactor "focused" -- moving away from
equalsIgnoreCase
is a functional change so I'd rather follow up with a separate PR