Skip to content

Fix: truncate decider identity#454

Merged
ybastide merged 2 commits into
mainfrom
fix/truncate-decider-identity
Apr 14, 2026
Merged

Fix: truncate decider identity#454
ybastide merged 2 commits into
mainfrom
fix/truncate-decider-identity

Conversation

@ybastide

@ybastide ybastide commented Apr 13, 2026

Copy link
Copy Markdown
Contributor

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...)

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 to MAX_IDENTITY_LENGTH instead of raising.
  • Tighten typing in simpleflow/format.py (return types for SWF field helpers; explicit None return).
  • 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.

Comment thread simpleflow/format.py
Comment thread simpleflow/format.py
Comment thread tests/test_simpleflow/test_format.py
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>
@ybastide ybastide force-pushed the fix/truncate-decider-identity branch from 4269840 to 028e0f4 Compare April 13, 2026 17:21
@ybastide ybastide requested a review from max-tobelem April 13, 2026 17:23

@max-tobelem max-tobelem left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM 🚀

@ybastide ybastide merged commit a47ecdb into main Apr 14, 2026
9 checks passed
@ybastide ybastide deleted the fix/truncate-decider-identity branch April 14, 2026 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

4 participants