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: implement pluginconfig clients (#638) #772

Merged
merged 6 commits into from
Dec 8, 2021

Conversation

neverCase
Copy link
Contributor

@neverCase neverCase commented Nov 25, 2021

Please answer these questions before submitting a pull request


Bugfix

  • Description

  • How to fix?


New feature or improvement

  • Describe the details and related test reports.

Backport patches

  • Why need to backport?

  • Source branch

  • Related commits and pull requests

  • Target branch

@codecov-commenter
Copy link

codecov-commenter commented Nov 25, 2021

Codecov Report

Merging #772 (904e1ba) into master (0c6de2d) will increase coverage by 0.20%.
The diff coverage is 42.12%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #772      +/-   ##
==========================================
+ Coverage   32.07%   32.28%   +0.20%     
==========================================
  Files          65       66       +1     
  Lines        6943     7137     +194     
==========================================
+ Hits         2227     2304      +77     
- Misses       4466     4565      +99     
- Partials      250      268      +18     
Impacted Files Coverage Δ
pkg/apisix/apisix.go 67.50% <ø> (ø)
pkg/apisix/schema.go 62.26% <0.00%> (-2.45%) ⬇️
pkg/apisix/pluginconfig.go 37.33% <37.33%> (ø)
pkg/apisix/nonexistentclient.go 38.81% <42.50%> (-2.98%) ⬇️
pkg/apisix/resource.go 60.27% <66.66%> (+0.57%) ⬆️
pkg/apisix/cache/memdb.go 75.12% <76.47%> (+0.12%) ⬆️
pkg/apisix/cluster.go 33.49% <100.00%> (+0.15%) ⬆️

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 0c6de2d...904e1ba. Read the comment docs.

@neverCase
Copy link
Contributor Author

@tao12345666333
hi, i'm ok.
I had add the missing license header.

@@ -23,6 +23,7 @@ import (
"testing"

"github.com/apache/apisix-ingress-controller/pkg/metrics"

Copy link
Contributor

Choose a reason for hiding this comment

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

Can we sort these imports?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My local golangci-lint would print these warnings below:

golangci-lint run
pkg/apisix/plugin_test.go:25: File is not `goimports`-ed with -local github.com/apache/apisix-ingress-controller (goimports)
	"github.com/apache/apisix-ingress-controller/pkg/metrics"
pkg/apisix/schema_test.go:24: File is not `goimports`-ed with -local github.com/apache/apisix-ingress-controller (goimports)
	"github.com/apache/apisix-ingress-controller/pkg/metrics"

Finally, I found that if I split the imports then there no warnings left.
Maybe I should ignore it in the next commits.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's caused by the lexicographical orders.

"testing"

"github.com/apache/apisix-ingress-controller/pkg/metrics"
v1 "github.com/apache/apisix-ingress-controller/pkg/types/apisix/v1"
Copy link
Contributor

Choose a reason for hiding this comment

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

Ditto, we should sort these imports.

pkg/apisix/cache/cache.go Outdated Show resolved Hide resolved
pkg/apisix/cache/memdb_test.go Outdated Show resolved Hide resolved
pkg/apisix/cache/memdb_test.go Outdated Show resolved Hide resolved
pkg/apisix/cache/memdb_test.go Outdated Show resolved Hide resolved
pkg/apisix/pluginconfig.go Outdated Show resolved Hide resolved
@tao12345666333
Copy link
Member

@neverCase Sorry for delay. I leave some comments, I hope you can make changes

@neverCase
Copy link
Contributor Author

@neverCase Sorry for delay. I leave some comments, I hope you can make changes

ok, i will change these and update right now

@neverCase
Copy link
Contributor Author

@tao12345666333
hi, i'm ready

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, Thanks!

@tao12345666333
Copy link
Member

ping @gxthrj @tokers for review, thanks!

Copy link
Contributor

@tokers tokers left a comment

Choose a reason for hiding this comment

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

Mostly LGTM but some import block style problems.

@tao12345666333
Copy link
Member

Mostly LGTM but some import block style problems.

@neverCase can you improve the code style?

@neverCase
Copy link
Contributor Author

Mostly LGTM but some import block style problems.

@neverCase can you improve the code style?

I had revert it

@tao12345666333
Copy link
Member

#788 has fixed the e2e error. It's green!

@tao12345666333 tao12345666333 merged commit 413e7ca into apache:master Dec 8, 2021
@tao12345666333
Copy link
Member

Good job!

@tao12345666333 tao12345666333 linked an issue Dec 8, 2021 that may be closed by this pull request
6 tasks
@neverCase neverCase deleted the feat-638 branch December 8, 2021 08:19
Sindweller pushed a commit to Sindweller/apisix-ingress-controller that referenced this pull request Dec 18, 2021
tao12345666333 pushed a commit to tao12345666333/ingress-controller that referenced this pull request Dec 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

proposal: Add CRD ApisixPluginConfig support plugin configs
5 participants