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

Add helper function to list all dynamic config keys used in production #4891

Merged
merged 2 commits into from
Jul 5, 2022

Conversation

Shaddoll
Copy link
Contributor

@Shaddoll Shaddoll commented Jul 2, 2022

What changed?
Add helper function to list all dynamic config keys used in production

Why?
To provide a way to get all keys used in production excluding keys created for unit tests

How did you test it?

Potential risks

Release notes

Documentation Changes

@Shaddoll Shaddoll force-pushed the dynamic-helper branch 2 times, most recently from f84d560 to 2256472 Compare July 2, 2022 01:11
@coveralls
Copy link

coveralls commented Jul 2, 2022

Pull Request Test Coverage Report for Build 0181cf3b-477b-477a-b389-550c4341a246

  • 0 of 21 (0.0%) changed or added relevant lines in 1 file are covered.
  • 58 unchanged lines in 12 files lost coverage.
  • Overall coverage increased (+0.04%) to 57.739%

Changes Missing Coverage Covered Lines Changed/Added Lines %
common/dynamicconfig/constants.go 0 21 0.0%
Files with Coverage Reduction New Missed Lines %
service/history/queue/timer_queue_processor_base.go 1 77.92%
common/task/fifoTaskScheduler.go 2 85.57%
common/util.go 2 51.47%
service/history/execution/mutable_state_builder.go 2 69.03%
service/history/task/transfer_active_task_executor.go 2 71.41%
service/history/task/transfer_standby_task_executor.go 2 86.75%
common/persistence/nosql/nosqlplugin/cassandra/workflow.go 3 56.69%
common/persistence/statsComputer.go 3 94.29%
service/history/task/fetcher.go 3 91.79%
service/history/execution/mutable_state_task_refresher.go 7 62.66%
Totals Coverage Status
Change from base Build 0181cf19-46ed-4b5a-9369-224f26b8274a: 0.04%
Covered Lines: 83727
Relevant Lines: 145009

💛 - Coveralls

// ListAllProductionKeys returns all key used in production
func ListAllProductionKeys() []Key {
result := make([]Key, 0, len(IntKeys)+len(BoolKeys)+len(FloatKeys)+len(StringKeys)+len(DurationKeys)+len(MapKeys))
for i := TestGetIntPropertyFilteredByTaskListInfoKey + 1; i < LastIntKey; i++ {
Copy link
Contributor

Choose a reason for hiding this comment

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

What do you think about also exposing methods for each of these as well which hides this implementation detail of the Last key and similar?

ListIntConfigKeys() etc?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't find a use case for listing keys by type now. I can add that later if I find a use case

@Shaddoll Shaddoll merged commit 9d45241 into uber:master Jul 5, 2022
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