Skip to content

[domain deprecation]Integrate domain deprecation workflow with CLI #6870

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

gazi-yestemirova
Copy link
Contributor

What changed?
This PR connects the domain deprecation workflow to the CLI's deprecate domain command. When a user runs cadence domain deprecate, the CLI will now:

  1. Require a security token flag for authentication
  2. Start the domain deprecation workflow
  3. Return the workflow ID and run ID to the user
  4. The workflow will then:
    • Disable archival
    • Deprecate the domain
    • Terminate open workflows
    • Validate no workflows remain
    • Retry termination if needed

The force flag has been removed since the domain is now deprecated early in the process, before workflow termination and cleanup. This ensures a more controlled deprecation sequence where the domain is marked as deprecated first, followed by proper cleanup of workflows.

Why?
The goal is to provide a safe and automated way to deprecate domains, ensuring all workflows are properly terminated and validated before the deprecation is considered complete.

How did you test it?
unit tests & local testing

Potential risks

Release notes

Documentation Changes

Copy link
Member

@timl3136 timl3136 left a comment

Choose a reason for hiding this comment

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

LGTM

"github.com/uber/cadence/tools/common/commoncli"
"github.com/uber/cadence/tools/common/flag"
)

const (
Copy link
Member

Choose a reason for hiding this comment

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

please update unit tests of this file

@gazi-yestemirova gazi-yestemirova merged commit 52ee21c into cadence-workflow:master May 7, 2025
23 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.

3 participants