add back publish under original cluster name for symlink cluster #963
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In a previous PR, we removed publishing to the original cluster name (e.g: FooCluster-prod-ltx1) for a symlink cluster ($FooCluster). But there could be edge cases that the original cluster was subscribed by direct curli calls (like calling the colo-suffixed service: d2://FooService-prod-ltx1) or hard-coded custom code.
This change add this publish back.
Test Done
Unit tests.
Tested with QEI d2-proxy,
call d2 service "accountBalances" (which is under cluster "$OmsServiceMaster"):
curli -v "d2://accountBalances" --d2-proxy-url "http://localhost:21360/d2/" -X OPTIONS --force-insecure-d2
HTTP/1.1 200 OK
< Content-Type: application/json
< x-linkedin-processing-colo: ei-ltx1
< x-linkedin-processing-machine: ltx1-app6705.stg.linkedin.com
(was able to pick the host ltx1-app6705.stg.linkedin.com).
, and call d2 service "accountBalances-ei-ltx1" (which is under cluster "OmsService-ei-ltx1"):
curli -v "d2://accountBalances-ei-ltx1" --d2-proxy-url "http://localhost:21360/d2/" -X OPTIONS --force-insecure-d2
HTTP/1.1 200 OK
< Content-Type: application/json
< x-linkedin-processing-colo: ei-ltx1
< x-linkedin-processing-machine: ltx1-app7220.stg.linkedin.com
(was able to pick the host ltx1-app7220.stg.linkedin.com).