Skip to content

fix: make All optimization strategy work for replacement again - #1121

Merged
bhearsum merged 1 commit into
taskcluster:mainfrom
bhearsum:fix-make-all-optimization-stra
Dec 1, 2026
Merged

bhearsum merged 1 commit into
taskcluster:mainfrom
bhearsum:fix-make-all-optimization-stra

Conversation

@bhearsum

Copy link
Copy Markdown
Contributor

Replacement requires the result of the first optimization strategy to work correctly. https://phabricator.services.mozilla.com/D83715 & https://phabricator.services.mozilla.com/D83849 changed this composite strategy to return the first result when it returns a non-truthy value (to avoid unnecessarily calling additional strategies), and return a plain True when all strategies return a truthy-value.

This works fine for removal (it only requires True/False), but replacement requires the result from the underlying strategy to work correctly.

This change restores that behaviour, while preserving the early bail out if an optimization strategy rejects the task.

This is technically a breaking change despite being a bug fix. I'm indifferent on whether or not it should require a major version bump. It doesn't appear to actually change anything for Gecko graphs.

Replacement requires the result of the first optimization strategy to work correctly. https://phabricator.services.mozilla.com/D83715 & https://phabricator.services.mozilla.com/D83849 changed this composite strategy to return the first result when it returns a non-truthy value (to avoid unnecessarily calling additional strategies), and return a plain `True` when all strategies return a truthy-value.

This works fine for removal (it only requires True/False), but replacement requires the result from the underlying strategy to work correctly.

This change restores that behaviour, while preserving the early bail out if an optimization strategy rejects the task.

This is _technically_ a breaking change despite being a bug fix. I'm indifferent on whether or not it should require a major version bump. It doesn't appear to actually change anything for Gecko graphs.
@bhearsum
bhearsum requested a review from a team as a code owner November 27, 2026 15:38
@bhearsum
bhearsum requested a review from hneiva November 27, 2026 15:38

@ahal ahal left a comment

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.

Thanks!

@bhearsum
bhearsum merged commit b77442b into taskcluster:main Dec 1, 2026
25 checks passed
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.

2 participants