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: translate error of old ApisixRoute #1191

Merged
merged 2 commits into from Jul 27, 2022
Merged

Conversation

AlinsRan
Copy link
Contributor

@AlinsRan AlinsRan commented Jul 27, 2022

Type of change:

  • Bugfix
  • New feature provided
  • Improve performance
  • Backport patches

why we need it:

ref:

When translating old objects, translateupstream needs to parse the latest services, which will lead to data inconsistency. Thus, retry and data inconsistency are caused.

What this PR does

Implements an function responsible for converting old objects

  1. Get route object from cache.
  2. Using route to construct Upstream and PluginConfig.
  3. Compare and write APISIX.

Pre-submission checklist:

  • Did you explain what problem does this PR solve? Or what new features have been added?
  • Have you added corresponding test cases?
  • Have you modified the corresponding document?
  • Is this PR backward compatible? If it is not backward compatible, please discuss on the mailing list first

@codecov-commenter
Copy link

codecov-commenter commented Jul 27, 2022

Codecov Report

Merging #1191 (1cd6439) into master (a0bc739) will decrease coverage by 0.12%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master    #1191      +/-   ##
==========================================
- Coverage   29.98%   29.85%   -0.13%     
==========================================
  Files          81       81              
  Lines        9979    10021      +42     
==========================================
  Hits         2992     2992              
- Misses       6663     6705      +42     
  Partials      324      324              
Impacted Files Coverage Δ
pkg/ingress/apisix_route.go 0.00% <0.00%> (ø)
pkg/ingress/utils/manifest.go 45.62% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us.

Copy link
Member

@tao12345666333 tao12345666333 left a comment

Choose a reason for hiding this comment

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

LGTM

@tao12345666333 tao12345666333 added bug Something isn't working area/controller labels Jul 27, 2022
@tao12345666333 tao12345666333 added this to the 1.5.0 milestone Jul 27, 2022
@tao12345666333 tao12345666333 added this to In progress in v1.5 Planning via automation Jul 27, 2022
@tao12345666333 tao12345666333 merged commit 3d720c0 into apache:master Jul 27, 2022
v1.5 Planning automation moved this from In progress to Done Jul 27, 2022
@AlinsRan AlinsRan deleted the fix/old branch August 22, 2022 01:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/controller bug Something isn't working
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

bug: when service port change,the ingress can't handle correctly
4 participants