Files
Shahab TajikandGitHub 7dd52ee852 Handle independent activities of unpinned workflows + more tests (#6917)
## What changed?
<!-- Describe what has changed in this PR -->
Adding a check in `RecordActivityTaskStarted` to make sure the workflow
TQ's current deployment is the samewith the activity poller's deployment
before starting to transition the workflow. (The check is only
applicable when poller's deployment is different from the workflows
effective deployment).

## Why?
<!-- Tell your future self why have you made these changes -->
Activities belonging to different deployments are versioned
independently and should start on the current deployment of their task
queues without interference with versioning of the workflow. **Before
this change, the workflow would be stuck in a busy loop of activity and
workflow tasks,** because activity started a transition to it's own
deployment but then the next wf task would change the transition to it's
own deployment and reschedule the activity.

## How did you test it?
<!-- How have you verified this change? Tested locally? Added a unit
test? Checked in staging env? -->
Added functional test.

## Potential risks
<!-- Assuming the worst case, what can be broken when deploying this
change to production? -->
None. This only affects workflows who use versioning 3. The single place
in the code that is changed is within `if` blocks that can activate only
when workflows/workers are using versioning 3.

## Documentation
<!-- Have you made sure this change doesn't falsify anything currently
stated in `docs/`? If significant
new behavior is added, have you described that in `docs/`? -->

## Is hotfix candidate?
<!-- Is this PR a hotfix candidate or does it require a notification to
be sent to the broader community? (Yes/No) -->
Yes. Ideally should be added to the release 125 because other wise
workflows who use versioning 3 and also run activities belonging to TQs
in other deployments will generate explosive load to server and user's
workers.
2024-12-02 11:51:37 -08:00
..