Skip to content

Conversation

@prestomation
Copy link
Contributor

The EnvironmentActions oneOf validator assumed that actions was a dictionary.

If the template being validated had an environment action of any other type then an AttributeError would throw

Fixes:

What was the problem/requirement? (What/Why)

If the template being validated had an environment action of any type other than a dict then an AttributeError would throw

What was the solution? (How)

The requires_oneof first ensures that the action is a Dict before continuing

What is the impact of this change?

openjd check will no longer crash when presented with a template with this sort of error

How was this change tested?

A new unit test was added

See DEVELOPMENT.md for information on running tests.

  • Have you run the unit tests?
    yes

Was this change documented?

no

  • Are relevant docstrings in the code base updated?
    no, not sure there are any.

Is this a breaking change?

no

A breaking change is one that modifies a public contract in a way that is not backwards compatible. See the
Public Interfaces section
of the DEVELOPMENT.md for more information on the public contracts.

If so, then please describe the changes that users of this package must make to update their scripts, or Python applications.

Does this change impact security?

no

  • Does the change need to be threat modeled? For example, does it create or modify files/directories that must only be readable by the process owner?
    • If so, then please label this pull request with the "security" label. We'll work with you to analyze the threats.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@prestomation prestomation requested a review from a team as a code owner June 2, 2025 23:24
The EnvironmentActions oneOf validator assumed that actions was a dictionary.

If the template being validated had an environment action of any other type then an AttributeError would throw

Signed-off-by: Preston Tamkin <845970+prestomation@users.noreply.github.com>
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jun 2, 2025

@prestomation prestomation enabled auto-merge (squash) June 2, 2025 23:58
@prestomation prestomation merged commit ae69150 into OpenJobDescription:mainline Jun 3, 2025
19 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.

3 participants