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

BUG: ECSRun on Run Screen breaks if run_task_kwargs are not provided #1023

Closed
1 of 5 tasks
cicdw opened this issue Sep 1, 2021 · 2 comments · Fixed by #1029
Closed
1 of 5 tasks

BUG: ECSRun on Run Screen breaks if run_task_kwargs are not provided #1023

cicdw opened this issue Sep 1, 2021 · 2 comments · Fixed by #1029
Labels
bug Something isn't working

Comments

@cicdw
Copy link
Member

cicdw commented Sep 1, 2021

Bug Description

If you don't provide run_task_kwargs when customizing a Run Config on the Run screen, the flow errors out with

botocore.exceptions.ParamValidationError: Parameter validation failed:
Unknown parameter in input: "null", must be one of: capacityProviderStrategy, cluster, count, enableECSManagedTags, enableExecuteCommand, group, launchType, networkConfiguration, overrides, placementConstraints, placementStrategy, platformVersion, propagateTags, referenceId, startedBy, tags, taskDefinition

This is because when no key / value pairs are provided for run_task_kwargs, it seems the UI submits {"null": null} as the key / value pair:

"run_task_kwargs": {"null": null}

when instead it should submit

"run_task_kwargs": null

Steps To Reproduce

  1. Start an ECS agent
  2. Navigate to "Run" screen on any flow page
  3. Set the appropriate labels for the ECS agent
  4. provide a valid task_role_arn
  5. Run -- you'll see the above incorrect run task dict in the backend, and the run will error out with the error above

Browsers Tested:

  • Chrome
  • Firefox
  • Safari
  • Edge
  • IE

Notes

The UI should submit null if no values are provided for run_task_kwargs cc: @kmoonwright

@cicdw cicdw added the bug Something isn't working label Sep 1, 2021
@znicholasbrown
Copy link
Contributor

@cicdw since run_task_kwargs is a dict, an empty dict is valid as well, correct? #1029 fixes the issue where the dict was being sent as { "null": null }but a further update to the run component would be needed to filter out dict type fields that have no key/values and set them to null instead of an empty object/dict.

@cicdw
Copy link
Member Author

cicdw commented Sep 1, 2021

Yea an empty dict should be fine 👍 (I haven't tested it yet though so we'll want to confirm)

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 a pull request may close this issue.

2 participants