chore(shard-manager): provide metadata in constructor#7711
Merged
dkrotx merged 1 commit intocadence-workflow:masterfrom Feb 16, 2026
Merged
Conversation
7fe5910 to
6bbd54b
Compare
eleonoradgr
approved these changes
Feb 16, 2026
dkrotx
added a commit
to dkrotx/cadence
that referenced
this pull request
Feb 16, 2026
During refactoring for cadence-workflow#7711 When shard was lost and matcher is on shard-manager, we returned untyped error which could potentially lead to wrong retries from client. Also, returning right error ensures we have the same stats/logs as we would have without shard-manager. Signed-off-by: Jan Kisel <dkrot@uber.com>
10 tasks
Ininitalising this separately is a bit unusual. In addition, unifying panic -> logger.Fatal as we do in other cases. Signed-off-by: Jan Kisel <dkrot@uber.com>
6bbd54b to
c9c0f09
Compare
Code Review ✅ ApprovedClean refactoring that moves metadata into the executor constructor and unifies error handling from panic to logger.Fatal. The reorder in GetShardProcess is semantically equivalent. No issues found. Rules ✅ All requirements metRepository Rules
OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |
dkrotx
added a commit
to dkrotx/cadence
that referenced
this pull request
Feb 16, 2026
During refactoring for cadence-workflow#7711 When shard was lost and matcher is on shard-manager, we returned untyped error which could potentially lead to wrong retries from client. Also, returning right error ensures we have the same stats/logs as we would have without shard-manager. Signed-off-by: Jan Kisel <dkrot@uber.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed?
Refactoring for #7712:
Providing shard executor metadata to the constructor instead of Initalising this separately.
In addition, unifying panic -> logger.Fatal as we do in other cases.
Why?
+Better readability as code is more aligned with other usages of log.Fatal.
Passing metadata to constructor allows to avoid partial structure initialization.
How did you test it?
go test -v ./service/matching/handler
Potential risks
Release notes
Documentation Changes
Reviewer Validation
PR Description Quality (check these before reviewing code):
go testinvocation)