Skip to content

cre-4959: orgId->shard assignments support (OrgResolver) - #23395

Open
mchain0 wants to merge 26 commits into
developfrom
cre-4959
Open

cre-4959: orgId->shard assignments support (OrgResolver)#23395
mchain0 wants to merge 26 commits into
developfrom
cre-4959

Conversation

@mchain0

@mchain0 mchain0 commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Shard assignment extended with OrgId support.

Config struct + parser:

  • Added PerOrgAssignment map[string][]uint32 field to ShardAssignmentConfig
  • Added TOML parsing for [per_org_assignment] section (keys are org IDs, values are shard ID arrays)

ShardResolver:

  • Added OrgResolver interface (Get(ctx, owner) (string, error))
  • manualShardResolver and overrideShardResolver now accept an OrgResolver
  • resolveManual checks PerOwnerAssignment first, then PerOrgAssignment (via orgResolver), then hashed/static fallbacks
  • Override resolver refactored to use resolveManual + delegate to RingOCR when not found

Wiring:

  • NewManualShardResolver and NewOverrideShardResolver now receive the existing orgResolver

System tests:

  • in relevant TOMLs added [CRE.Linking] URL so nodes can resolve org IDs
  • ExecuteManualShardAssignmentTest: uses per_org_assignment
  • ExecuteRingOCROverridesTest: adds per_org_assignment override to shard 1, verifying manual override wins over RingOCR

cre-4959

@mchain0
mchain0 changed the base branch from develop to cre-4958 August 12, 2026 14:02
@github-actions

Copy link
Copy Markdown
Contributor

✅ No conflicts with other open PRs targeting develop

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

@trunk-io

trunk-io Bot commented Aug 12, 2026

Copy link
Copy Markdown

Static BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

@mchain0
mchain0 marked this pull request as ready for review August 12, 2026 14:23
@mchain0
mchain0 requested review from a team as code owners August 12, 2026 14:23
pavel-raykov
pavel-raykov previously approved these changes Aug 12, 2026
Base automatically changed from cre-4958 to develop August 12, 2026 16:13
@mchain0
mchain0 dismissed pavel-raykov’s stale review August 12, 2026 16:13

The base branch was changed.

@mchain0
mchain0 requested review from a team as code owners August 12, 2026 16:13
@cl-sonarqube-production

Copy link
Copy Markdown

@mchain0
mchain0 enabled auto-merge August 13, 2026 13:33
@mchain0
mchain0 requested review from bolekk and pavel-raykov August 13, 2026 13:33
ResolveShards(ctx context.Context, workflowIDs []string, ownerHexes []string) (map[string]uint32, error)
}

type OrgResolver interface {

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.

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