Skip to content

Conversation

@Shivs11
Copy link
Member

@Shivs11 Shivs11 commented Nov 14, 2025

What changed?

  • WISOTT

Why?

  • Cleaner code

How did you test it?

  • built
  • run locally and tested manually
  • covered by existing tests
  • added new unit test(s)
  • added new functional test(s)

Potential risks

  • Not with this PR

Note

Refines how current and ramping versions are derived by tracking task-queue membership across data formats and only allowing unversioned selections when not part of any version.

  • Worker versioning:
    • CalculateTaskQueueVersioningInfo:
      • Add flags isTaskQueuePartOfSomeCurrentVersion and isTaskQueuePartOfSomeRampingVersion to track membership across legacy and new data.
      • Use these flags when picking latest RoutingConfig so unversioned current/ramping is only chosen if the task queue isn’t part of any version.
      • Set membership flags when finding current/ramping via legacy deployments and versions list.
      • Remove redundant local flags and obsolete nullification checks for routing configs.
      • Continue returning final selections via PickFinalCurrentAndRamping.

Written by Cursor Bugbot for commit 877d890. This will update automatically on new commits. Configure here.

@Shivs11 Shivs11 requested review from a team as code owners November 14, 2025 20:04
@Shivs11 Shivs11 changed the title tried optimizing calculatetaskqueueversioninginfo Refactor VersioningInfo calculation for a TaskQueue Nov 14, 2025
Base automatically changed from shahab/fix-final-routing to main November 14, 2025 20:28
isTaskQueuePartOfSomeCurrentVersion = true
} else if !isTaskQueuePartOfSomeCurrentVersion && routingConfig.GetCurrentDeploymentVersion() == nil {
// Current version can only be unversioned if the task queue is not part of any other version.
// The flag isTaskQueuePartOfSomeCurrentVersion serves the purpose of this check.
Copy link

Choose a reason for hiding this comment

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

Bug: Unversioned Deployments Blocked by Versioning Mixup

The refactored logic incorrectly blocks unversioned deployments from the new routing config format when the old format contains any current version (including unversioned ones). The removed validation specifically checked if current.GetVersion() != nil to only block when old format had a versioned deployment, but the new flag isTaskQueuePartOfSomeCurrentVersion is set even for unversioned deployments in the old format. This causes the function to ignore newer unversioned routing configs when an older unversioned deployment exists in the old format, violating the timestamp-based selection logic.

Fix in Cursor Fix in Web

@Shivs11
Copy link
Member Author

Shivs11 commented Nov 25, 2025

closing this one out

@Shivs11 Shivs11 closed this Nov 25, 2025
@Shivs11 Shivs11 reopened this Nov 25, 2025
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