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: plugin_metadata not populating to the correct etcd key #2012

Merged
merged 2 commits into from
Oct 24, 2023

Conversation

zhuoyang
Copy link
Contributor

Type of change:

  • Bugfix

What this PR does / why we need it:

Fix plugin_metadata_cm not working due to populating to wrong etcd key
Before this fix, this can be seen in the debug log

2023-10-18T11:31:03+08:00	[35mdebug[0m	apisix/cluster.go:1225	push event to adapter	{"event": "create", "key": "/apisix/plugin_metadatas/datadog", "value": "{\"host\":\"datadog.datadog\",\"namespace\":\"apisix\",\"port\":8125}"}

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 Oct 18, 2023

Codecov Report

Merging #2012 (2aa0488) into master (5177b5f) will not change coverage.
Report is 5 commits behind head on master.
The diff coverage is 0.00%.

❗ Current head 2aa0488 differs from pull request most recent head b78d0d5. Consider uploading reports for the commit b78d0d5 to get more accurate results

@@           Coverage Diff           @@
##           master    #2012   +/-   ##
=======================================
  Coverage   36.81%   36.81%           
=======================================
  Files          93       93           
  Lines        7863     7863           
=======================================
  Hits         2895     2895           
  Misses       4580     4580           
  Partials      388      388           
Files Coverage Δ
pkg/apisix/plugin_metadata.go 2.23% <0.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@lingsamuel
Copy link
Member

It would be better to have some e2e tests for this function.

@zhuoyang
Copy link
Contributor Author

I agree, but I will need some time as there are other priority for me right now

@indrekj
Copy link

indrekj commented Oct 20, 2023

I saw you fixed the wrong path in the helm charts. Do you think it's also worth fixing it in this repo as well: https://github.com/apache/apisix-ingress-controller/blob/master/conf/config-default.yaml#L86 (should also be on the root level)

@zhuoyang
Copy link
Contributor Author

I am actually having a hard time understanding the e2e test, it seems like there's e2e test written for this feature already but why does it not fail in the first place?
I did pass in ENABLED_ETCD_SERVER=true when I run make e2e-test-local, tried both with and without my fix, the test still pass anyway

@lingsamuel lingsamuel merged commit 4d004e1 into apache:master Oct 24, 2023
79 checks passed
@zhuoyang
Copy link
Contributor Author

thanks for merging! is it possible to release a hotfix for this PR?

lingsamuel pushed a commit that referenced this pull request Oct 24, 2023
* fix: plugin_metadata not populating to the correct etcd key

* fix url also

(cherry picked from commit 4d004e1)
lingsamuel added a commit that referenced this pull request Oct 24, 2023
…2021)

* fix: plugin_metadata not populating to the correct etcd key

* fix url also

(cherry picked from commit 4d004e1)

Co-authored-by: zhuoyang <zhuoyang98@gmail.com>
@lingsamuel
Copy link
Member

thanks for merging! is it possible to release a hotfix for this PR?

Sure. Patch version 1.7.1 is voting, thread here:

https://lists.apache.org/thread/fjy8t21nrj2yyfvrmyshlokc6w3jcgp

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.

None yet

5 participants