Commit 818cdb7
authored
[CLI] fix a few things in domain migration command (cadence-workflow#5374)
What changed?
add two methods in ClientFactory for migration
countWorkflowCheck should be on current domain
fix concurrency bug
make template look slightly better
Why?
add two methods in ClientFactory for migration
This is needed to be able to use environment flags for internal usage
How did you test it?
shengs@shengs-C02XN3VDJGH6 cadence % go run cmd/tools/cli/main.go --do domain-1 domain migration --destination_address localhost:7933 --destination_domain domain-2 --tasklist ts1 --search_attr someID:INT
2023/08/08 10:21:28 Loading configFiles=[config/base.yaml config/development.yaml]
2023/08/08 10:21:28 Loading configFiles=[config/base.yaml config/development.yaml]
{"level":"info","ts":"2023-08-08T10:21:28.241-0700","msg":"Updated dynamic config","logging-call-at":"file_based_client.go:284"}
Validation Check:
- Domain Meta Data: true
Current Domain:
Name: domain-1
UUID: d3cc0a3c-8f55-40af-9820-c48f8a0f46e5
New Domain:
Name: domain-2
UUID: 203f0088-1d0f-40ac-a7c3-fdcf57ec0a99
- Workflow Check: true
Long Running Workflow Num: 0
- Dynamic Config Check: false
- Config Key: matching.asyncTaskDispatchTimeout
Current Response:
Data: "50s"
Filters:
- Name: domainName
Value: "domain-1"
- Name: taskListName
Value: ["ts1"]
New Response:
Data: "20s"
Filters:
- Name: domainName
Value: "domain-2"
- Name: taskListName
Value: ["ts1"]
- Search Attributes Check: false
Missing Search Attributes in Current Domain:
- someID:INT
Missing Search Attributes in New Domain:
- someID:INT
Potential risks
No Risk1 parent fea24c2 commit 818cdb7
File tree
6 files changed
+575
-513
lines changed- tools/cli
6 files changed
+575
-513
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
63 | 71 | | |
64 | 72 | | |
65 | 73 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
87 | 86 | | |
88 | 87 | | |
89 | 88 | | |
90 | 89 | | |
91 | 90 | | |
92 | 91 | | |
93 | | - | |
| 92 | + | |
94 | 93 | | |
95 | 94 | | |
96 | 95 | | |
| |||
0 commit comments