Fix: truncate decider identity#454
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR changes how SWF “identity” values are handled so overly long identities don’t prevent deciders/workers from starting (notably when deployment metadata like branch names are embedded in the identity).
Changes:
- Update
format.identity()to truncate strings toMAX_IDENTITY_LENGTHinstead of raising. - Tighten typing in
simpleflow/format.py(return types for SWF field helpers; explicitNonereturn). - Adjust/modernize tests for identity truncation and typed decode cases.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
simpleflow/format.py |
Implements identity truncation and updates helper type annotations/casts. |
tests/test_simpleflow/test_format.py |
Updates identity test expectations and adds typing/casts for test values. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Truncate `identity` instead of raising: raising prevents deciders from starting... Signed-off-by: Yves Bastide <yves@botify.com>
Add typing and casts to `simpleflow.format` and its tests. Signed-off-by: Yves Bastide <yves@botify.com>
4269840 to
028e0f4
Compare
ewjoachim
approved these changes
Apr 14, 2026
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.
Truncate identity instead of preventing deciders and workers to start.
(Botify deployments include branch name, among other data, in the identity; this has historically forced us to rename branches, which is a PITA on GitHub...)