fix!: run extensions field validator even when template omits extensions field#261
Merged
mwiebe merged 1 commit intoOpenJobDescription:mainlinefrom Feb 11, 2026
Merged
Conversation
…ns field Signed-off-by: Stephen Crowe <6042774+crowecawcaw@users.noreply.github.com>
|
jericht
approved these changes
Feb 11, 2026
mwiebe
approved these changes
Feb 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



What was the problem/requirement? (What/Why)
When a job or environment template omitted the extensions field, Pydantic v2 wasn't running the field validator (because it used the default value). This meant context.extensions retained the caller's
supported_extensionsinstead of being cleared to an empty set. As a result, extension features likeFEATURE_BUNDLE_1's 200 parameter limit were incorrectly usedeven when the template didn't declare the extension.
What was the solution? (How)
Added
validate_default=Trueto the extensions field in both JobTemplate and EnvironmentTemplate. This ensures the_permitted_extension_namesvalidator always runs, clearing context.extensions toset()when the template doesn't declare any extensions.What is the impact of this change?
Templates that omit the extensions field will correctly have no extensions enabled.
How was this change tested?
Unit tests
Was this change documented?
n/a
Is this a breaking change?
It's a bug, but it someone might depend on it. Added a
!to the PR title so the release process bumps the minor version.Does this change impact security?
No.