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

Fix bug and simplify dynamicconfig #2875

Merged
merged 7 commits into from
May 21, 2022
Merged

Fix bug and simplify dynamicconfig #2875

merged 7 commits into from
May 21, 2022

Conversation

dnr
Copy link
Member

@dnr dnr commented May 20, 2022

What changed?
The logic for handling multiple dynamicconfig constraints (in the case of task queue constraints) was split between Collection and Client, which led to at least one bug: a less specific value would be preferred over a more specific one if the more specific one happened to match the default value supplied by the caller.

This pushes more of the logic into Client, which now takes a slice of filter maps, and checks them in order (plus the non-constrained value).

Why?
Fix a bug, make code easier to understand.

How did you test it?
unit tests

Potential risks
This changes the interface of dynamicconfig.Client, so any projects that use the server as a library may have to update their code (to wrap the map in a slice). Client isn't used in the server itself at all, since Collection is a nicer interface.

@dnr dnr requested a review from a team as a code owner May 20, 2022 07:38
@dnr dnr merged commit 5635101 into temporalio:master May 21, 2022
@dnr dnr deleted the schedpr9 branch May 21, 2022 00:54
Sushisource pushed a commit to Sushisource/temporal that referenced this pull request Jun 7, 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.

None yet

2 participants