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

Added config store functionality (initial implementation) #4357

Merged
merged 57 commits into from
Aug 13, 2021

Conversation

aliue
Copy link
Contributor

@aliue aliue commented Aug 13, 2021

What changed?
Adds an alternative dynamic config system other than file-based client. Cadence service takes over responsibility of storing and propagating changes to dynamic configs. Added admin cli commands for operators to manage them. Currently only supports Cassandra as data store.

Why?
Offers a potentially better solution to dynamic config as file-based system can be difficult to use in production environment as all hosts need a local copy. Currently, it is the operator's responsibility to manage syncing this file.

How did you test it?
Tested locally, added unit tests. Made sure it passes canary with both Cassandra and SQL.

Potential risks
Currently, configStore is not enabled by default, so it shouldn't causes any issues that we did not check for already.

Release notes
Updated cassandra schema and cli. Should be backwards compatible with the previous dynamicConfigClient struct in development.yaml if new dynamicconfig struct is not specified.

Documentation Changes

aliue added 30 commits June 23, 2021 17:58
aliue added 21 commits August 3, 2021 13:00
…er unit tests, changes to use configStoreClient, added config to development.yaml
… config store client values, better adherence to conventions, etc.
@aliue aliue requested a review from yycptt August 13, 2021 21:10
@aliue aliue merged commit 0fd2b50 into master Aug 13, 2021
@aliue aliue deleted the configurationStore branch August 13, 2021 22:05
@coveralls
Copy link

Pull Request Test Coverage Report for Build c9ef7a42-66d5-4e59-99b2-347dbbce8a5a

  • 533 of 2026 (26.31%) changed or added relevant lines in 42 files are covered.
  • 119 unchanged lines in 10 files lost coverage.
  • Overall coverage decreased (-0.4%) to 56.332%

Changes Missing Coverage Covered Lines Changed/Added Lines %
common/dynamicconfig/constants.go 6 7 85.71%
common/dynamicconfig/filter.go 3 4 75.0%
common/resource/resourceTest.go 0 1 0.0%
tools/cli/domainUtils.go 0 1 0.0%
common/persistence/sql/factory.go 0 3 0.0%
common/persistence/client/factory.go 13 17 76.47%
common/persistence/serializer.go 20 24 83.33%
cmd/server/cadence/cadence.go 0 5 0.0%
common/dynamicconfig/file_based_client.go 4 10 40.0%
common/dynamicconfig/inMemoryClient.go 7 13 53.85%
Files with Coverage Reduction New Missed Lines %
common/dynamicconfig/filter.go 1 77.78%
common/task/weightedRoundRobinTaskScheduler.go 2 89.64%
service/history/queue/timer_gate.go 3 95.83%
common/task/fifoTaskScheduler.go 4 83.51%
service/history/queue/timer_queue_processor_base.go 4 78.78%
service/history/task/transfer_active_task_executor.go 4 70.49%
common/persistence/nosql/nosqlplugin/cassandra/workflow.go 6 49.77%
common/persistence/sql/sqlExecutionStore.go 16 60.0%
common/persistence/nosql/nosqlplugin/cassandra/workflowUtils.go 28 76.31%
common/persistence/nosql/nosqlplugin/cassandra/workflowParsingUtils.go 51 80.09%
Totals Coverage Status
Change from base Build f5b9f2ab-64ac-436c-b308-67b7edd585ea: -0.4%
Covered Lines: 78481
Relevant Lines: 139319

💛 - Coveralls

@yycptt
Copy link
Contributor

yycptt commented Aug 13, 2021

Great job! Thanks for the contribution!

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