Skip to content

Conversation

@carlydf
Copy link
Collaborator

@carlydf carlydf commented Aug 22, 2025

What was changed

Add arbitrary test case setup function to set up non-standard test cases with environments that are not represented in TemporalWorkerDeploymentStatus.

Add test cases:

  • manual rollout -> deploy inactive worker but no routing config changes
  • first progressive rollout -> target immediately becomes current
  • nth progressive rollout -> progressive rollout steps are respected
  • test that controller scales down deployments for inactive versions of failed target

Why?

We want coverage of these scenarios want to build out our ability to add more scenarios

Checklist

  1. Closes TEST: Controller doesn't scale down Inactive workers for failed test workflows -> scale down inactive versions that are not the target #33

  2. How was this tested:
    This PR adds tests
    The manual mode test and the scaling down inactive versions test needed Controller code changes to pass, so I saw them fail, thereby ensuring that the test actually tests what I say it does.

  3. Any docs updates needed?
    TODO: Possibly mention this in definition of Inactive version status, actually. Or in description of Worker Controller Scaling Behavior

@carlydf carlydf marked this pull request as ready for review August 22, 2025 11:09
@carlydf carlydf requested review from a team and jlegrone as code owners August 22, 2025 11:09
Copy link
Collaborator

@jlegrone jlegrone left a comment

Choose a reason for hiding this comment

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

lgtm, just a few small style/documentation suggestions!

Use else if to make the conditional logic clearer in the inactive version scaling code.

Addresses: temporalio#127 (comment)
jlegrone added a commit that referenced this pull request Aug 25, 2025
Change TaskQueueEnvKey to taskQueueEnvKey since it's not used outside the package.

Addresses: #127 (comment)
jlegrone added a commit that referenced this pull request Aug 25, 2025
Change TaskQueueEnvKey to taskQueueEnvKey since it's not used outside the package.

Addresses: #127 (comment)
jlegrone and others added 3 commits August 25, 2025 17:38
Change TaskQueueEnvKey to taskQueueEnvKey since it's not used outside the package.

Addresses: temporalio#127 (comment)
- Move field descriptions from README to proper godoc comments on TestCase struct
- Create testable examples in example_test.go with compile-time checks
- Update README to reference godoc and examples instead of duplicating struct definition

Addresses: temporalio#127 (comment)
@carlydf carlydf merged commit 15aa23b into temporalio:main Aug 26, 2025
11 checks passed
@carlydf carlydf deleted the more-tests branch August 26, 2025 16:05
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.

TEST: Controller doesn't scale down Inactive workers for failed test workflows -> scale down inactive versions that are not the target

3 participants