Skip to content

Add capability to have multiple domains in replication simulation #6923

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

Conversation

fimanishi
Copy link
Member

What changed?
Add capability to have multiple domains in replication simulation. Allow workflows to target the domain where it will be created and create workers for all registered domains.

Why?
We want to simulate failover and replication involving multiple domains.

How did you test it?
Tested locally with the existing simulations

Potential risks

Release notes

Documentation Changes

@@ -79,7 +79,7 @@ func main() {
}

dispatcher := yarpc.NewDispatcher(yarpc.Config{
Name: simTypes.WorkerIdentityFor(*clusterName),
Name: simTypes.WorkerIdentityFor(*clusterName, "test-domain"),
Copy link
Member

Choose a reason for hiding this comment

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

I guess we don't need to hardcode test-domain here. you can use another name for dispatcher config

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah, I was passing an empty string here. I was testing and forgot to revert it

Logger: logger,
MetricsScope: tally.NewTestScope(simTypes.TasklistName, map[string]string{"cluster": *clusterName}),
for domainName := range simCfg.Domains {
waitUntilDomainReady(logger, cadenceClient, domainName)
Copy link
Member

Choose a reason for hiding this comment

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

there's only 1 /health endpoint and it will be marked ready as soon as first domain is created. I recommend running waitUntilDomainReady in goroutines and wait for both of them to return. Also the /health handler above should return OK if ready == num_domains

Comment on lines 77 to 79
for domainName := range simCfg.Domains {
waitUntilWorkersReady(t, domainName)
}
Copy link
Member

Choose a reason for hiding this comment

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

this doesn't need to be done per domain. see my other comment. worker readyness endpoint can deal with multiple domain aspect

@fimanishi fimanishi merged commit 4c813e7 into cadence-workflow:master May 16, 2025
24 checks passed
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