-
Notifications
You must be signed in to change notification settings - Fork 117
fix: reset previously set/removed values in per-backend header mutation #1387
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
Merged
Merged
Changes from 4 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
cc5c32e
fix: reset previously set/removed values in header mutation
mathetake 19ecccc
more
mathetake 31ce3b1
more
mathetake ba27892
more
mathetake 04e1496
fix
mathetake e0defcf
fix
mathetake 4d7bf86
fix
mathetake b760c6e
more
mathetake 5fea734
more
mathetake 8daaed6
Merge branch 'main' into headermutatorfix
mathetake ccee34b
site: supported-endpoint doc layout (#1391)
xiaolin593 0fa251b
chore(deps): bump the node group in /site with 7 updates (#1392)
dependabot[bot] 1e4ca5a
address review comments by aaron
mathetake 111db0c
address some review comments by siddharth
mathetake 1a31278
case doens't matter
mathetake aae64fd
Merge remote-tracking branch 'origin/main' into headermutatorfix
mathetake File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -61,10 +61,6 @@ func TestWithTestUpstream(t *testing.T) { | |
| testUpstreamAzureBackend, | ||
| testUpstreamGCPVertexAIBackend, | ||
| testUpstreamGCPAnthropicAIBackend, | ||
| // TODO: this shouldn't be needed. The previous per-backend headers shouldn't affect the subsequent retries. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This TODO summarizes what was happening with the bug being fixed here |
||
| {Name: "testupstream-openai-always-200", Schema: openAISchema, HeaderMutation: &filterapi.HTTPHeaderMutation{ | ||
| Set: []filterapi.HTTPHeader{{Name: testupstreamlib.ResponseStatusKey, Value: "200"}}, | ||
| }}, | ||
| { | ||
| Name: "testupstream-openai-5xx", Schema: openAISchema, HeaderMutation: &filterapi.HTTPHeaderMutation{ | ||
| Set: []filterapi.HTTPHeader{{Name: testupstreamlib.ResponseStatusKey, Value: "500"}}, | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -262,8 +262,8 @@ func requireEnvoy(t testing.TB, | |
| "--concurrency", strconv.Itoa(max(runtime.NumCPU(), 2)), | ||
| // This allows multiple Envoy instances to run in parallel. | ||
| "--base-id", strconv.Itoa(time.Now().Nanosecond()), | ||
| // Add debug logging for extproc. | ||
| "--component-log-level", "ext_proc:trace,http:debug,connection:debug", | ||
| // Add debug logging for http. | ||
| "--component-log-level", "http:debug", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ext_proc trace is just a noise as well as connection stuff as well |
||
| ) | ||
|
|
||
| // wait for the ready message or exit. | ||
|
|
||
Oops, something went wrong.
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.
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.
Just TOL, should we merge this loop and the loop over original headers? If I understand this loop (if no removals or additions) will make headers equal to orignalHeaders. Should we start with headers = originalHeaders and go ahead with remaining mutations?
Initially I skipped this to avoid any header that was already added and was different from original header before entering mutation but as we are making them same now just wondering if extra loop is required
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.
Let's do it in a follow up later