panic: proto: message udpa.annotations.MigrateAnnotation is already registered
howardjohn opened this issue · 8 comments
Because the same message is defined in two repos, we cannot run any application relying on this repo. We will have imports of https://github.com/cncf/udpa a long time due to transitive dependency, so we are a bit stuck.
I am investigating how we can mitigate this on our side and will update this if I find anything so other folks that run into this can copy the steps.
Forking go-control-plane and sed cnfcf/xds -> cncf/udpa works. Not good though..
replace
in go.mod does not work, at least not how I did it anyhow. it doesn't like 2 names for the same thing.
For the time being seems like we can work around by not importing udpa.annotations - but seems like it can be really easy to get into a situation where we are stuck
cc @htuch
Why can't we move everything to cncf/xds? It should be mostly a no-op.
I think that requires every single library in the dependency tree to also move? Which is also essentially impossible for some, as certain projects (kubernetes, prometheus) have gotten themselves into dependency loops, so they depend on older versions of themselves which in turn depend on the old cncf/udpa?
I am not a golang expert so I may be wrong
Hi, I have the same problem now.
It's failed to build envoy after I cherry pick this commit, My command is make build_envoy
based on istio/proxy
and the error msgs go to like this:
ERROR: /home/.cache/bazel/_bazel_root/1e0bb3bee2d09d2e4ad3523530d3b40c/external/envoy/source/server/BUILD:28:17: C++ compilation of rule '@envoy//source/server:configuration_lib' failed (Exit 1): clang failed: error executing command /usr/lib/llvm/bin/clang -U_FORTIFY_SOURCE -fstack-protector -Wall -Wthread-safety -Wself-assign -fcolor-diagnostics -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections ... (remaining 389 argument(s) skipped)
Use --sandbox_debug to see verbose messages from the sandbox clang failed: error executing command /usr/lib/llvm/bin/clang -U_FORTIFY_SOURCE -fstack-protector -Wall -Wthread-safety -Wself-assign -fcolor-diagnostics -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections ... (remaining 389 argument(s) skipped)
Use --sandbox_debug to see verbose messages from the sandbox
external/envoy/source/server/configuration_impl.cc:59:17: error: no member named 'stats_flush_case' in 'envoy::config::bootstrap::v3::Bootstrap'
bootstrap.stats_flush_case() !=
~~~~~~~~~ ^
external/envoy/source/server/configuration_impl.cc:60:52: error: no member named 'STATS_FLUSH_NOT_SET' in 'envoy::config::bootstrap::v3::Bootstrap'
envoy::config::bootstrap::v3::Bootstrap::STATS_FLUSH_NOT_SET) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
external/envoy/source/server/configuration_impl.cc:67:17: error: no member named 'stats_flush_case' in 'envoy::config::bootstrap::v3::Bootstrap'
if (bootstrap.stats_flush_case() == envoy::config::bootstrap::v3::Bootstrap::kStatsFlushOnAdmin) {
~~~~~~~~~ ^
external/envoy/source/server/configuration_impl.cc:67:80: error: no member named 'kStatsFlushOnAdmin' in 'envoy::config::bootstrap::v3::Bootstrap'
if (bootstrap.stats_flush_case() == envoy::config::bootstrap::v3::Bootstrap::kStatsFlushOnAdmin) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
external/envoy/source/server/configuration_impl.cc:68:33: error: no member named 'stats_flush_on_admin' in 'envoy::config::bootstrap::v3::Bootstrap'
flush_on_admin_ = bootstrap.stats_flush_on_admin();
~~~~~~~~~ ^
5 errors generated.
Target //src/envoy:envoy failed to build
Oh, my envoy version based on tag v1.17.1
. I have no idea how to do now??
Forking go-control-plane and sed cnfcf/xds -> cncf/udpa works. Not good though..
replace
in go.mod does not work, at least not how I did it anyhow. it doesn't like 2 names for the same thing.
I try to solve the problem based on your solution, But I don't understand what's your meaning?
I shoud replace all the string of "cnfcf/xds" to "cncf/udpa" in go-control-plane rather than replace
in go.mod?
Or, which commit should I cherry-pick?
I added some private filter codes in Envoy,so the project of envoy
\ go-control-plane
\ istio(pilot-discovery)
needs to build.
So, is this right that:
-
I cherry-pick commits in #14157 as well as this commit in project
envoy
-
and cherry-pick commits in istio#32158,istio#32237 in project
istio
Looking forward to your reply, thanks.
Can you move to 1.19? Why are you cherry picking this change into Envoy itself, it should have the same wire behavior before/after?
Can you move to 1.19? Why are you cherry picking this change into Envoy itself, it should have the same wire behavior before/after?
Thanks for reply, you are right that I do not need to cherry pick any change to my repo.
the cause of my problem is the wrong base branch (main
branch) of go-control-plane
I chosen to build istio
, the problem resolved when I choose the matched commit.
Minimal reproducer: https://github.com/howardjohn/cncf-udpa-to-xds-repro