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

feat: basic support Apache APISIX 2.9 #2117

Merged
merged 19 commits into from
Sep 3, 2021
Merged

Conversation

bzp2010
Copy link
Contributor

@bzp2010 bzp2010 commented Sep 2, 2021

Why submit this pull request?

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

What changes will this PR take into?

Provide basic support for Apache APISIX 2.9. Includes changes to the upstream property definition.

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

@bzp2010 bzp2010 added enhancement New feature or request frontend backend labels Sep 2, 2021
@bzp2010 bzp2010 self-assigned this Sep 2, 2021
@netlify
Copy link

netlify bot commented Sep 2, 2021

✔️ Deploy Preview for apisix-dashboard ready!

🔨 Explore the source changes: 5e26fc4

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

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

@codecov-commenter
Copy link

codecov-commenter commented Sep 2, 2021

Codecov Report

Merging #2117 (6efa271) into master (1a0b12b) will increase coverage by 0.16%.
The diff coverage is 100.00%.

❗ Current head 6efa271 differs from pull request most recent head 5e26fc4. Consider uploading reports for the commit 5e26fc4 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2117      +/-   ##
==========================================
+ Coverage   67.31%   67.48%   +0.16%     
==========================================
  Files         124      126       +2     
  Lines        3283     3294      +11     
  Branches      800      802       +2     
==========================================
+ Hits         2210     2223      +13     
+ Misses       1073     1071       -2     
Flag Coverage Δ
frontend-e2e-test 67.48% <100.00%> (+0.16%) ⬆️

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

Impacted Files Coverage Δ
web/src/components/Plugin/UI/limit-conn.tsx 100.00% <100.00%> (ø)
web/src/components/Upstream/UpstreamForm.tsx 92.40% <100.00%> (+0.19%) ⬆️
...c/components/Upstream/components/KeepalivePool.tsx 100.00% <100.00%> (ø)
...rc/components/Upstream/components/RetryTimeout.tsx 100.00% <100.00%> (ø)
web/src/helpers.tsx 73.77% <0.00%> (+3.27%) ⬆️

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 1a0b12b...5e26fc4. Read the comment docs.

@bzp2010 bzp2010 force-pushed the feat-support-290 branch 2 times, most recently from 3923974 to 567cce5 Compare September 2, 2021 18:56
@liuxiran
Copy link
Contributor

liuxiran commented Sep 2, 2021

@nic-chen please help to review, thanks a lot

@liuxiran liuxiran marked this pull request as ready for review September 3, 2021 00:55
@liuxiran liuxiran requested a review from starsz September 3, 2021 01:18
.github/workflows/backend-cli-test.yml Show resolved Hide resolved
.github/workflows/go-lint.yml Show resolved Hide resolved
api/conf/schema.json Outdated Show resolved Hide resolved
api/conf/schema.json Show resolved Hide resolved
api/conf/schema.json Outdated Show resolved Hide resolved
api/conf/schema.json Outdated Show resolved Hide resolved
api/conf/schema.json Outdated Show resolved Hide resolved
ExpectStatus: http.StatusOK,
})
})
})
Copy link
Member

Choose a reason for hiding this comment

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

Need dp test, please refer to APISIX related test

UnHealthy UnHealthy `json:"unhealthy,omitempty"`
ReqHeaders []string `json:"req_headers,omitempty"`
Type string `json:"type,omitempty"`
Timeout TimeoutValue `json:"timeout,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

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

Why change this to float32?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There are two "number" definitions in jsonschema, one is an integer, the other is number, where number runs to store float values. Such as 5.5

Therefore, a float value is used here to store.

In addition, only map[string]interface{} was used to store the value before, and there was ambiguity in the data type. Crash may occur during runtime. This is also the reason for this modification.(add a Timeout struct)

@@ -97,10 +97,11 @@ type Route struct {
}

// --- structures for upstream start ---
type TimeoutValue float32
Copy link
Contributor

Choose a reason for hiding this comment

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

why

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There are two "number" definitions in jsonschema, one is an integer, the other is number, where number runs to store float values. Such as 5.5

Therefore, a float value is used here to store.

In addition, only map[string]interface{} was used to store the value before, and there was ambiguity in the data type. Crash may occur during runtime. This is also the reason for this modification.(add a Timeout struct)

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

so do we support timeout 5.5s?

Copy link
Contributor

Choose a reason for hiding this comment

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

image

It seems that float is ok

api/conf/schema.json Outdated Show resolved Hide resolved
@liuxiran
Copy link
Contributor

liuxiran commented Sep 3, 2021

all CI passed @starsz @nic-chen please review again, thanks a lot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants