Skip to content

fix!: run extensions field validator even when template omits extensions field#261

Merged
mwiebe merged 1 commit intoOpenJobDescription:mainlinefrom
crowecawcaw:ext-fix
Feb 11, 2026
Merged

fix!: run extensions field validator even when template omits extensions field#261
mwiebe merged 1 commit intoOpenJobDescription:mainlinefrom
crowecawcaw:ext-fix

Conversation

@crowecawcaw
Copy link
Contributor

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_extensions instead of being cleared to an empty set. As a result, extension features like FEATURE_BUNDLE_1's 200 parameter limit were incorrectly used
even when the template didn't declare the extension.

What was the solution? (How)

Added validate_default=True to the extensions field in both JobTemplate and EnvironmentTemplate. This ensures the _permitted_extension_names validator always runs, clearing context.extensions to set() 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.

…ns field

Signed-off-by: Stephen Crowe <6042774+crowecawcaw@users.noreply.github.com>
@sonarqubecloud
Copy link

@mwiebe mwiebe merged commit 4c2c253 into OpenJobDescription:mainline Feb 11, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments