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: issue where canary overwrites default backend #10072

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Spazzy757
Copy link
Contributor

@Spazzy757 Spazzy757 commented Jun 12, 2023

What this PR does / why we need it:

We have a bug in the case of canary deployments where if the canary deployment returns an error code it will ignore the custom-error codes and custom default backend setup.

This is due to how we overwrite the balancer in the function route_to_alternative_balancer as it will take precedence over any balancer that is set

NOTE: Majority of the code added here is around E2E testing for this specific scenario. This code will be simplified with the work in #9948

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • CVE Report (Scanner found CVE and adding report)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation only

Which issue/s this PR fixes

fixes: #9944

How Has This Been Tested?

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I've read the CONTRIBUTION guide
  • I have added unit and/or e2e tests to cover my changes.
  • All new and existing tests passed.

/kind bug

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jun 12, 2023
@Spazzy757 Spazzy757 marked this pull request as draft June 12, 2023 07:25
@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. area/lua Issues or PRs related to lua code needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-priority labels Jun 12, 2023
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jun 12, 2023
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jun 14, 2023
@Spazzy757 Spazzy757 force-pushed the fix-canary-annotations branch 2 times, most recently from 4f0ef5a to c4d4afa Compare June 14, 2023 11:55
@Spazzy757 Spazzy757 marked this pull request as ready for review June 14, 2023 11:56
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 14, 2023
@Spazzy757
Copy link
Contributor Author

/kind bug

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. and removed needs-kind Indicates a PR lacks a `kind/foo` label and requires one. labels Jun 14, 2023
@Spazzy757
Copy link
Contributor Author

/triage accepted

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jun 14, 2023
@Spazzy757
Copy link
Contributor Author

/assign @tao12345666333

@tao12345666333
Copy link
Member

I am reading the full context of this PR and issue, it will take some time. Thanks

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 3, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Spazzy757
Once this PR has been reviewed and has the lgtm label, please ask for approval from tao12345666333. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@Spazzy757 Spazzy757 force-pushed the fix-canary-annotations branch 3 times, most recently from 5480293 to 3615993 Compare July 11, 2023 12:22
@strongjz
Copy link
Member

/priority backlog
/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. priority/backlog Higher priority than priority/awaiting-more-evidence. and removed needs-priority labels Jul 20, 2023
@strongjz
Copy link
Member

Possible candidate for 1.9.0

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 31, 2023
@dfl-aeb
Copy link

dfl-aeb commented Jan 30, 2024

@tao12345666333 @Spazzy757 @strongjz any news on this PR?

@dfl-aeb
Copy link

dfl-aeb commented Feb 9, 2024

@tao12345666333 @Spazzy757
Sorry to bother you again, this PR looks pretty ready to me. Can we help push it forward?

@Spazzy757
Copy link
Contributor Author

I will rebase the PR, but I am waiting on @tao12345666333 or @strongjz to approve this. As I believe the concern is that it's a breaking change

@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 9, 2024
@tao12345666333
Copy link
Member

Thanks 🙏 let me do a review today

@dfl-aeb
Copy link

dfl-aeb commented Feb 19, 2024

@tao12345666333 Friendly reminder 😊👌

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 28, 2024
@Spazzy757
Copy link
Contributor Author

I'll try rebase again tomorrow @tao12345666333 @strongjz

@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 1, 2024
Signed-off-by: Spazzy <brendankamp757@gmail.com>
Comment on lines +128 to +134
f.HTTPTestClient().
GET("/status/401").
WithHeader("Host", host).
Expect().
Status(http.StatusUnauthorized).
Body().
Contains("401")
Copy link
Member

Choose a reason for hiding this comment

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

Due to the passage of time, I need to reload some memories.

Can this case cover the actual scenarios in that issue?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, the test case was written specifically to reproduce the issue, before fixing it

Copy link

Choose a reason for hiding this comment

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

Means we are good to go? ;)

Copy link
Member

Choose a reason for hiding this comment

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

I have been trying to find time to verify what would happen with this test case before the Lua part modification.

This is the only issue that I am currently worried about.

Copy link
Member

Choose a reason for hiding this comment

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

@dfl-aeb @Spazzy757 Sorry for the delay, very busy with daily work.

Can you help me verify the result of this test case when there are no modifications to the Lua part? Other than that, I have no other concerns about this PR.

Copy link

Choose a reason for hiding this comment

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

Sorry to bother you again @Spazzy757
Do you think you can find some time in the next few weeks?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can try do this next week and paste the results, I wrote the test before making changes to the Lua to verify the issue.

I also tested this, manually using the same method I used in #9944

Copy link

Choose a reason for hiding this comment

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

Do you have any updates @Spazzy757 ?

Copy link

Choose a reason for hiding this comment

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

@Spazzy757 @tao12345666333 friendly reminder :)

Copy link

Choose a reason for hiding this comment

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

@Spazzy757 could you please share your test results?

@dfl-aeb
Copy link

dfl-aeb commented Mar 27, 2024

@Spazzy757 @tao12345666333 are we good to go?

@Spazzy757
Copy link
Contributor Author

@Spazzy757 @tao12345666333 are we good to go?

I assume so but not sure when it will be merged

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 7, 2024
@k8s-ci-robot
Copy link
Contributor

PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@dfl-aeb
Copy link

dfl-aeb commented Sep 24, 2024

@Spazzy757 @tao12345666333 @longwuyuan
Is there any update on this? It's been a while, and this issue is still affecting us. Would appreciate any feedback or progress.
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/lua Issues or PRs related to lua code cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. priority/backlog Higher priority than priority/awaiting-more-evidence. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Default-backend is ignored by canary ingress
5 participants