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

Allow register domain with given uuid #5350

Open
zedongh opened this issue Jul 17, 2023 · 4 comments
Open

Allow register domain with given uuid #5350

zedongh opened this issue Jul 17, 2023 · 4 comments
Labels
customer Feature asks from customer good first issue Up for grab as first issue to contribute to Cadence project up-for-grabs Issues that are good entry points for those new to Cadence that want to contribute

Comments

@zedongh
Copy link
Contributor

zedongh commented Jul 17, 2023

Is your feature request related to a problem? Please describe.
No

Proposed Solution
register domain request support optional domain id parameter.

Additional context
Our cadence server running both old and latest version without xdc, to give user the fixed api workflow interface, it's convenient to keep same domain uuid for both system.

@ibarrajo ibarrajo added customer Feature asks from customer up-for-grabs Issues that are good entry points for those new to Cadence that want to contribute labels Sep 23, 2024
@demirkayaender demirkayaender added the good first issue Up for grab as first issue to contribute to Cadence project label Nov 1, 2024
@ibarrajo ibarrajo assigned ibarrajo and unassigned ibarrajo Nov 12, 2024
@ibarrajo
Copy link
Contributor

ibarrajo commented Nov 12, 2024

I was approached by a contributor for first steps onto this issue, it would be good to share some guidance onto who tackles this issue.

Cadence in a multi cluster environment, domains have a unique UUID even if they share the same name. At Uber for example, we have a couple of regions. PHX and DCA. So a global domain would be created, say "cadence-samples-domain". A global domainis essentially the same domain name under the two regions (PHX and DCA) which are configured to function as Active and Passive for purposes of replication. Both instances of the cadence service would automatically generate a domain UUID when the domain is registered using the CLI with cadence --do test-domain domain register --global_domain true

We don't provide a mechanism to use a specific UUID during registration, but I imagine it would not be hard to create. Now what I definitely do not know is if Cadence depends on the UUID for replicating workflow history or in any way requires domains to have a unique domain UUID. I would suggest grepping the codebase to find out where and how the domain UUID is used.

You would need to update the CLI, handler, middleware and of course add a unit test
https://github.com/uber/cadence/blob/9d328c7c6aba12b3791ec9716f037ac122191f3b/tools/cli/domain_commands.go#L84-L174

https://github.com/uber/cadence/blob/9d328c7c6aba12b3791ec9716f037ac122191f3b/common/domain/handler.go#L148-L316

@3vilhamster
Copy link
Member

This can cause issues when you have two domains with the same ID on two different clusters. Connecting them will cause big problems.
We need very good clarification on the problem you want to address.

DomainID is not exposed to the client, so it is purely internal to Cadence backend, what is the problem of having different IDs?

@demirkayaender
Copy link
Member

@zedongh could you explain what you are trying to do and where/how you use domain id?

@zedongh
Copy link
Contributor Author

zedongh commented Nov 26, 2024

@zedongh could you explain what you are trying to do and where/how you use domain id?

This issue can be closed now. We have different version Cadence last year. One of them is very old version without xdc. For easily upgrade and unify user's interface. Wanna keep both version have same domain uuid (in two different cadence store).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer Feature asks from customer good first issue Up for grab as first issue to contribute to Cadence project up-for-grabs Issues that are good entry points for those new to Cadence that want to contribute
Projects
None yet
Development

No branches or pull requests

4 participants