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

Support AsyncWorkflowConfiguration decoding in admin cli #5694

Merged

Conversation

taylanisikdemir
Copy link
Member

What changed?
Admin CLI supports decoding payloads grabbed from DB and this is handy during investigations. Adding support for AsyncWorkflowConfiguration type which is part of domain_config type in Cassandra.

How did you test it?

  1. Run cadence locally
docker-compose -f docker/docker-compose.yml up
  1. Register domain
go run cmd/tools/cli/main.go  --domain samples-domain domain register --retention 2d
  1. Update Async Queue config of domain
go run cmd/tools/cli/main.go admin aq update \
  --domain cadence-samples \
  --json "{\"PredefinedQueueName\":\"my-queue-1\"}"
  1. Exec into cassandra container and grab async_workflow_config value
docker exec -it docker-cassandra-1
cqlsh
use cadence;
select * from domains_by_name_v2 where domains_partition=0 and name='samples-domain';
# copy async_workflow_config value
  1. Try the decode command
input="0x5902000a000b00140000000a6d792d71756575652d310b001e0000000000"
go run cmd/tools/cli/main.go admin db decode_thrift -i $input
# Output:
# (*shared.AsyncWorkflowConfiguration)(0x1400053ae80)(AsyncWorkflowConfiguration{Enabled: false, PredefinedQueueName: my-queue-1, QueueType: })

@coveralls
Copy link

coveralls commented Feb 28, 2024

Pull Request Test Coverage Report for Build 018df6fa-53cc-4c30-b506-da81c636e26b

Details

  • 25 of 25 (100.0%) changed or added relevant lines in 1 file are covered.
  • 84 unchanged lines in 11 files lost coverage.
  • Overall coverage decreased (-0.03%) to 62.87%

Files with Coverage Reduction New Missed Lines %
common/persistence/historyManager.go 2 66.67%
common/persistence/sql/sqlplugin/postgres/db.go 2 85.0%
common/persistence/sql/sqlplugin/postgres/task.go 2 73.4%
common/task/weighted_round_robin_task_scheduler.go 2 89.05%
service/history/execution/mutable_state_util.go 2 37.63%
common/task/fifo_task_scheduler.go 3 84.54%
service/history/task/fetcher.go 3 85.57%
service/matching/taskListManager.go 4 80.46%
common/persistence/sql/workflowStateMaps.go 20 81.25%
service/history/task/task_util.go 20 70.57%
Totals Coverage Status
Change from base Build 018df01c-3fd6-4c29-b1b5-1dbf8f49a043: -0.03%
Covered Lines: 92925
Relevant Lines: 147806

💛 - Coveralls

@taylanisikdemir taylanisikdemir enabled auto-merge (squash) February 29, 2024 22:27
@taylanisikdemir taylanisikdemir merged commit bc08024 into cadence-workflow:master Feb 29, 2024
16 of 17 checks passed
@taylanisikdemir taylanisikdemir deleted the taylan/asyncwf_decode branch February 29, 2024 22:53
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