Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CASMCMS-9116: Fix boot set schema validation bug preventing valid session templates from being created #362

Merged
merged 1 commit into from
Aug 22, 2024

Conversation

mharding-hpe
Copy link
Contributor

@mharding-hpe mharding-hpe commented Aug 22, 2024

The models generated by the openapi-generator are not able to handle the complicated schema used to enforce the requirement that BOS boot sets contain at least one of three possible node fields. The result is that even valid session templates are failing when attempting to create them.

This PR does two things to fix this:

  1. Returns the API spec to a simpler form, where the above requirement is only found in the description field, but not enforced in the schema itself.
  2. Modify the BOS session template validation code to instead validate this requirement "manually"

I tested this on mug and verified that it allows me to create a legal session template, but gives me an error if I try to create one with none of the node fields specified:

ncn-m001:~ # cray bos v2 sessiontemplates create --file a.json test
Usage: cray bos v2 sessiontemplates create [OPTIONS] SESSION_TEMPLATE_ID
Try 'cray bos v2 sessiontemplates create -h' for help.

Error: The session template could not be created.: Boot set compute has none of the following fields: ['node_list', 'node_roles_groups', 'node_groups']

This bug was introduced with this commit: 948d061

@mharding-hpe mharding-hpe marked this pull request as ready for review August 22, 2024 20:02
@mharding-hpe mharding-hpe requested a review from a team as a code owner August 22, 2024 20:02
@mharding-hpe mharding-hpe merged commit a7cd429 into master Aug 22, 2024
7 of 8 checks passed
@mharding-hpe mharding-hpe deleted the casmcms-9116 branch August 22, 2024 20:15
mharding-hpe added a commit that referenced this pull request Aug 22, 2024
…724357770

[chore] master -> develop from PR #362 (casmcms-9116)
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