Files
tasks/api
Shahab TajikandDavid Reiss 9547db2e56 Apply build ID assignment rules (#5350)
## What changed?
<!-- Describe what has changed in this PR -->
Assigning a task to the appropriate build ID based on the versioning
assignment rules.

For now, both old and new versioning data is supported, in the following
manner
- tasks for unassigned (new) workflows/activities -> first try
assignment rules, if there is no matching assignment rules fallback to
default version set.
- tasks of existing versioned executions -> if the build id is part of a
version set keep using the version set, otherwise, assume user intends
to use the new API and use a dedicated queue for the build ID.
- This means we no longer created "guessed" version sets for "unkown"
build IDs
- tasks of existing unversioned executions -> stays unversioned

## Why?
<!-- Tell your future self why have you made these changes -->
Part of new Worker Versioning API

## How did you test it?
<!-- How have you verified this change? Tested locally? Added a unit
test? Checked in staging env? -->
Unit tests, functional test will come when the API for adding rules is
implemented.

## Potential risks
<!-- Assuming the worst case, what can be broken when deploying this
change to production? -->
Because we no longer created "guessed" version sets for "unkown" build
IDs, users of old WV API may "loose" tasks in extremely rare situations.
But that is expected for the old API given its private preview stage.

## Is hotfix candidate?
<!-- Is this PR a hotfix candidate or does it require a notification to
be sent to the broader community? (Yes/No) -->
No.
2024-04-12 11:48:50 -07:00
..