Skip to content

Conversation

@Eijebong
Copy link
Contributor

Instead of hardcoding the schema, make it part of the registration of the strategy, this allows for people to add their own strategy without having to work around OptimizationSchema which is painful and brittle.

The slight drawback from this is that we lose the documentation in the task schema about what is possible since it's now deferred to the strategies themselves, and that we now validate optimizations twice, first to check that it's a dict then to check that it matches the strategy.

Fixes #368

@Eijebong Eijebong requested a review from a team as a code owner December 24, 2025 02:18
@Eijebong Eijebong requested a review from bhearsum December 24, 2025 02:18
@Eijebong
Copy link
Contributor Author

An example of what it looks after this change: Eijebong/Archipelago-index@bee7fca

Instead of hardcoding the schema, make it part of the registration of
the strategy, this allows for people to add their own strategy without
having to work around `OptimizationSchema` which is painful and brittle.

The slight drawback from this is that we lose the documentation in
the task schema about what is possible since it's now deferred to the
strategies themselves, and that we now validate optimizations twice,
first to check that it's a dict then to check that it matches the
strategy.

Fixes taskcluster#368
@Eijebong Eijebong force-pushed the opt-schema-in-register branch from d5c2724 to cf8e2f6 Compare December 24, 2025 02:19
@Eijebong Eijebong added the BREAKING CHANGE Backwards incompatible request that will require major version bump label Dec 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BREAKING CHANGE Backwards incompatible request that will require major version bump

Projects

None yet

Development

Successfully merging this pull request may close these issues.

allow for custom optimization strategies

1 participant