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

fix: bundle submit parameter processing splits name/value at right-most = #331

Merged
merged 1 commit into from
May 14, 2024

Conversation

mwiebe
Copy link
Contributor

@mwiebe mwiebe commented May 13, 2024

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

When providing parameter values for a parameter like CondaPackages, it often has an = in it like
-p CondaPackages=blender=3.6. The regex validating these parameters allows the = to get in the parameter name
instead of the parameter value. The parameter name further needs to conform to the Open Job Description
syntax, so it would be helpful to validate it against that.

What was the solution? (How)

  • Fix the '-p' parameter regex to exclude '=' from the parameter name match.
  • Incorporated a regex for the Open Job Description identifier constraints, to fail parameter validation when parameter names do not conform.
  • Added two tests, one for the '=' splitting and one for the parameter name validation.

What is the impact of this change?

Submitting jobs from the CLI for the buggy case will work. Other cases where the parameter name
doesn't conform will produce a quicker and more clear error message.

How was this change tested?

Added unit tests, submitted a job and confirmed the parameter value was set correctly.

Was this change documented?

No

Is this a breaking change?

No


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

@mwiebe mwiebe requested a review from a team as a code owner May 13, 2024 18:49
* Also incorporated a regex for the Open Job Description identifier
  constraints, to fail parameter validation when parameter names do not
  conform.
* Added two tests, one for the '=' splitting and one for the parameter name
  validation.

Signed-off-by: Mark Wiebe <399551+mwiebe@users.noreply.github.com>
@epmog epmog added the bug Something isn't working label May 13, 2024
@mwiebe mwiebe changed the title fix: Modify -p parameter regex to split at the left-most '=' fix: bundle submit parameter processing splits name/value at right-most = May 14, 2024
@mwiebe mwiebe merged commit 09bead0 into aws-deadline:mainline May 14, 2024
15 checks passed
@mwiebe mwiebe deleted the fix-job-param-split branch May 14, 2024 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants