Skip to content

Fix: Action key handling for Go SDK #1661

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

mrkaye97
Copy link
Contributor

@mrkaye97 mrkaye97 commented May 1, 2025

Description

Mirroring the impls in Python and TS - created a getActionKey helper + a corresponding type that returns a string with both the step run id and the retry count of the step to prevent cancellations race conditions

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Copy link

vercel bot commented May 1, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hatchet-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 6, 2025 10:06pm
hatchet-v0-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 6, 2025 10:06pm

@mrkaye97
Copy link
Contributor Author

mrkaye97 commented May 1, 2025

@abelanger5 I'm not 100% sure this is right but I grepped for all the sync.Maps I could find and this is what turned up. lmk if you think this needs to be fixed other places too

Copy link
Contributor

@Copilot Copilot AI left a comment

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 fixes a bug in the Go SDK by introducing a composite ActionKey that includes both the step run id and the retry count, ensuring accurate action cancellation and preventing race conditions.

  • Introduces a new ActionKey type and the createActionKey helper.
  • Updates cancellation and log handling to use the composite key.

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.

1 participant