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: try recovering from gateway sync failure only on UpdateError #6237

Merged
merged 1 commit into from
Jun 25, 2024

Conversation

czeslavo
Copy link
Contributor

@czeslavo czeslavo commented Jun 24, 2024

What this PR does / why we need it:

We should try recovering with the fallback configuration (either generated or the persisted last valid one) only if we get an expected UpdateError from the UpdateStrategy. Otherwise, we can assume the error is unrecoverable through the fallback configuration (e.g. transient network errors, gateways returning 5xx, etc.).

It relies on Kong/go-kong#452.

Which issue this PR fixes:

Fixes #6218.

PR Readiness Checklist:

Complete these before marking the PR as ready to review:

  • the CHANGELOG.md release notes have been updated to reflect any significant (and particularly user-facing) changes introduced by this PR

@czeslavo czeslavo force-pushed the fix/only-recover-on-updateerror branch 2 times, most recently from bcf1836 to 15f7a40 Compare June 24, 2024 14:09
Copy link

codecov bot commented Jun 24, 2024

Codecov Report

Attention: Patch coverage is 0% with 14 lines in your changes missing coverage. Please review.

Project coverage is 39.1%. Comparing base (3fa3bc7) to head (15f7a40).

Current head 15f7a40 differs from pull request most recent head 16ce72a

Please upload reports for the commit 16ce72a to get more accurate results.

Files Patch % Lines
internal/dataplane/kong_client.go 0.0% 14 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##            main   #6237      +/-   ##
========================================
- Coverage   73.6%   39.1%   -34.5%     
========================================
  Files        200     199       -1     
  Lines      19909   19903       -6     
========================================
- Hits       14654    7798    -6856     
- Misses      4264   11168    +6904     
+ Partials     991     937      -54     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@czeslavo czeslavo self-assigned this Jun 24, 2024
@czeslavo czeslavo force-pushed the fix/only-recover-on-updateerror branch 2 times, most recently from 389d60a to 228a71e Compare June 24, 2024 16:59
@czeslavo czeslavo force-pushed the fix/only-recover-on-updateerror branch 2 times, most recently from 7459c39 to 7aa5f69 Compare June 25, 2024 09:41
@czeslavo czeslavo force-pushed the fix/only-recover-on-updateerror branch from 7aa5f69 to 16ce72a Compare June 25, 2024 09:46
@czeslavo czeslavo marked this pull request as ready for review June 25, 2024 09:48
@czeslavo czeslavo requested a review from a team as a code owner June 25, 2024 09:48
@czeslavo czeslavo marked this pull request as draft June 25, 2024 10:10
@czeslavo czeslavo force-pushed the fix/only-recover-on-updateerror branch from 16ce72a to 3067931 Compare June 25, 2024 10:52
@czeslavo czeslavo marked this pull request as ready for review June 25, 2024 11:23
@czeslavo czeslavo merged commit 420b44c into main Jun 25, 2024
39 checks passed
@czeslavo czeslavo deleted the fix/only-recover-on-updateerror branch June 25, 2024 12:56
@pmalek pmalek mentioned this pull request Jun 27, 2024
32 tasks
czeslavo added a commit that referenced this pull request Jun 27, 2024
czeslavo added a commit that referenced this pull request Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants