Skip to content

fix(schema): require at least one element in command and args arrays - #215

Open
Phoenix1504e wants to merge 1 commit into
score-spec:mainfrom
Phoenix1504e:fix/schema-minitems-command-args
Open

Phoenix1504e wants to merge 1 commit into
score-spec:mainfrom
Phoenix1504e:fix/schema-minitems-command-args

Conversation

@Phoenix1504e

Copy link
Copy Markdown
  • Controls: non-empty command arrays and omitted optional fields continue to pass.

What does this PR do?

Closes the gap where "valid schema, broken deploy" documents pass validation. An explicitly empty command / args array cannot execute in any container runtime, so schema validation should reject it at authoring time rather than letting it surface at deploy time.

Only documents that already fail at runtime are affected; v1b1 is a beta schema, so this is not treated as a breaking change and no version bump is required.

Fixes #197

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • New chore (expected functionality to be implemented)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I've signed off with an email address that matches the commit author.

Add minItems: 1 to container.command, container.args, and execProbe.command. An empty array previously passed schema validation but is guaranteed to fail at runtime; the Kubernetes API server rejects empty exec probe commands with error Invalid value: []string(nil).

Fixes score-spec#197

Signed-off-by: Aditya Pathak <68177924+Phoenix1504e@users.noreply.github.com>
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.

[BUG] execProbe.command accepts empty array []

1 participant