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

fix filter removal for http filter #37903

Merged
merged 3 commits into from
Mar 16, 2022

Conversation

ramaraochavali
Copy link
Contributor

Found this bug in this PR #36404. Http filter removal does not work correctly.

  • Configuration Infrastructure
  • Docs
  • Installation
  • Networking
  • Performance and Scalability
  • Policies and Telemetry
  • Security
  • Test and Release
  • User Experience
  • Developer Infrastructure

Please check any characteristics that apply to this pull request.

  • Does not have any user-facing changes. This may include CLI changes, API changes, behavior changes, performance improvements, etc.

Signed-off-by: Rama Chavali <rama.rao@salesforce.com>
@ramaraochavali ramaraochavali requested a review from a team as a code owner March 14, 2022 09:42
@istio-testing istio-testing added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Mar 14, 2022
@@ -512,6 +520,7 @@ func patchHTTPFilters(patchContext networking.EnvoyFilter_PatchContext,
if removedFilters.Contains(filter.Name) {
continue
}
tempArray = append(tempArray, filter)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the actual fix. Not adding to tempArray. Rest of the changes are format changes.

Copy link
Member

Choose a reason for hiding this comment

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

Can you add a test? Lack of ut cause this happen.

Copy link
Member

@howardjohn howardjohn left a comment

Choose a reason for hiding this comment

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

do we have any tests for this?

Comment on lines 538 to 539
httpFilter *hcm.HttpFilter,
) bool {
Copy link
Member

Choose a reason for hiding this comment

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

can you use the older gofumpt to avoid noise in PRs?

Signed-off-by: Rama Chavali <rama.rao@salesforce.com>
Signed-off-by: Rama Chavali <rama.rao@salesforce.com>
@ramaraochavali ramaraochavali requested review from a team as code owners March 15, 2022 14:23
@ramaraochavali
Copy link
Contributor Author

network filter removal has test but not http filter removal. Added a test for it. PTAL.

@istio-testing istio-testing added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 15, 2022
@istio-testing
Copy link
Collaborator

In response to a cherrypick label: new pull request created: #37961

aryan16 pushed a commit to aryan16/istio that referenced this pull request Mar 28, 2022
* fix filter removal for http filter

Signed-off-by: Rama Chavali <rama.rao@salesforce.com>

* add test and release notes

Signed-off-by: Rama Chavali <rama.rao@salesforce.com>

* add test and release notes

Signed-off-by: Rama Chavali <rama.rao@salesforce.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants