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

add back publish under original cluster name for symlink cluster #963

Merged
merged 1 commit into from
Jan 3, 2024

Conversation

bohhyang
Copy link
Contributor

@bohhyang bohhyang commented Jan 2, 2024

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).

Copy link
Member

@PapaCharlie PapaCharlie left a comment

Choose a reason for hiding this comment

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

Thank you for fixing this! What a weird and frustrating bug...

@bohhyang bohhyang merged commit 12375bf into master Jan 3, 2024
2 checks passed
@bohhyang bohhyang deleted the bohan/pubSymlink branch January 3, 2024 19:21
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.

2 participants