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: regex & omit vars when no value #1921

Merged
merged 4 commits into from
May 27, 2021
Merged

fix: regex & omit vars when no value #1921

merged 4 commits into from
May 27, 2021

Conversation

iamayushdas
Copy link
Contributor

Please answer these questions before submitting a pull request, or your PR will get closed.

Why submit this pull request?

  • Improve performance
  • Backport patches

What changes will this PR take into?

  • update Regex according to schema_def
  • omit vars field in Route when no value contained
    Please update this section with detailed description.

Related issues

fix/resolve #1798

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

cc - @juzhiyuan @liuxiran @starsz @LiteSun

@netlify
Copy link

netlify bot commented May 26, 2021

✔️ Deploy Preview for apisix-dashboard ready!

🔨 Explore the source changes: e25940c

🔍 Inspect the deploy log: https://app.netlify.com/sites/apisix-dashboard/deploys/60af0f034bbe390008828c2c

😎 Browse the preview: https://deploy-preview-1921--apisix-dashboard.netlify.app/

@juzhiyuan juzhiyuan mentioned this pull request May 26, 2021
10 tasks
@juzhiyuan juzhiyuan requested review from LiteSun, liuxiran and imjoey May 26, 2021 14:52
Copy link
Member

@guoqqqi guoqqqi left a comment

Choose a reason for hiding this comment

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

image
It is better to add this assertion after line 222 to ensure that the vars field disappears.

      cy.contains('vars').should('not.exist');

@iamayushdas
Copy link
Contributor Author

iamayushdas commented May 26, 2021

It is better to add this assertion after line 222 to ensure that the vars field disappears.

      cy.contains('vars').should('not.exist');

added , thanks for nice suggestion @guoqqqi

@codecov-commenter
Copy link

codecov-commenter commented May 26, 2021

Codecov Report

Merging #1921 (e25940c) into master (91ad26b) will decrease coverage by 2.87%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1921      +/-   ##
==========================================
- Coverage   67.00%   64.13%   -2.88%     
==========================================
  Files         169      122      -47     
  Lines        6314     3112    -3202     
  Branches      745      748       +3     
==========================================
- Hits         4231     1996    -2235     
+ Misses       1832     1116     -716     
+ Partials      251        0     -251     
Flag Coverage Δ
backend-e2e-test ?
backend-e2e-test-ginkgo ?
backend-unit-test ?
frontend-e2e-test 64.13% <100.00%> (+0.16%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...b/src/components/Plugin/UI/referer-restriction.tsx 66.66% <ø> (ø)
web/src/components/Upstream/components/Nodes.tsx 100.00% <ø> (ø)
...mponents/Upstream/components/active-check/Host.tsx 33.33% <ø> (ø)
...pages/Route/components/Step1/RequestConfigView.tsx 81.48% <ø> (ø)
web/src/pages/Route/transform.ts 72.35% <100.00%> (-0.11%) ⬇️
api/internal/handler/global_rule/global_rule.go
api/internal/handler/ssl/ssl.go
api/internal/handler/consumer/consumer.go
api/cmd/managerapi.go
... and 45 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7551b78...e25940c. Read the comment docs.

@liuxiran liuxiran merged commit d11ff4f into apache:master May 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

the problem of empty vars expressions in "Advanced Routing Matching Conditions"
6 participants