Skip to content

(fix): handle nil shardorchestrator#22591

Open
justinkaseman wants to merge 1 commit into
developfrom
fix/shard-orchestrator-nil
Open

(fix): handle nil shardorchestrator#22591
justinkaseman wants to merge 1 commit into
developfrom
fix/shard-orchestrator-nil

Conversation

@justinkaseman
Copy link
Copy Markdown
Contributor

No description provided.

@justinkaseman justinkaseman requested review from a team as code owners May 21, 2026 16:41
@github-actions
Copy link
Copy Markdown
Contributor

👋 justinkaseman, thanks for creating this pull request!

To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team.

Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks!

@github-actions
Copy link
Copy Markdown
Contributor

I see you updated files related to core. Please run make gocs in the root directory to add a changeset as well as in the text include at least one of the following tags:

  • #added For any new functionality added.
  • #breaking_change For any functionality that requires manual action for the node to boot.
  • #bugfix For bug fixes.
  • #changed For any change to the existing functionality.
  • #db_update For any feature that introduces updates to database schema.
  • #deprecation_notice For any upcoming deprecation functionality.
  • #internal For changesets that need to be excluded from the final changelog.
  • #nops For any feature that is NOP facing and needs to be in the official Release Notes for the release.
  • #removed For any functionality/config that is removed.
  • #updated For any functionality that is updated.
  • #wip For any change that is not ready yet and external communication about it should be held off till it is feature complete.

@github-actions
Copy link
Copy Markdown
Contributor

✅ No conflicts with other open PRs targeting develop

Copy link
Copy Markdown
Contributor

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

Risk Rating: LOW

Fixes a subtle Go “typed nil in interface” issue when creating the ShardOrchestrator client in the CRE workflow registry syncer, preventing downstream code from treating a non-functional client as present.

Changes:

  • Avoids assigning a (*shardorchestrator.Client)(nil) into a shardorchestrator.ClientInterface, ensuring the interface remains truly nil when shard 0 does not create a client.
  • Adds a debug log when the client is intentionally not created (shard 0 path).

Scrupulous human review recommended for:

  • core/services/cre/cre.go:newWorkflowRegistrySyncerV2 shard-orchestrator initialization path — confirm shard 0 behavior is correct for your sharding topology (it now reliably results in a nil interface, which will skip ownership checks that are guarded by client != nil).

@justinkaseman justinkaseman requested a review from mchain0 May 21, 2026 16:44
@cl-sonarqube-production
Copy link
Copy Markdown

@trunk-io
Copy link
Copy Markdown

trunk-io Bot commented May 21, 2026

Static BadgeStatic BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

@justinkaseman justinkaseman enabled auto-merge May 22, 2026 22:37
@justinkaseman justinkaseman requested a review from a team May 23, 2026 03:12
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.

3 participants