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: Handle input parameters classified as multiple value click options #6108

Merged
merged 7 commits into from
Oct 19, 2023

Conversation

mildaniel
Copy link
Contributor

Which issue(s) does this change fix?

#6053

Why is this change necessary?

Click will handle single values and convert them to a list before being processed if the option is set to multiple=True. When using a samconfig file, the values are injected into click after this conversion resulting in click crashing when these values are processed. This leads to a discrepancy in behaviour between command line options and configuration file options.

How does it address the issue?

Check the configured resources in the samconfig file and ensure the same type of option processing is done to convert single value types to a list before giving them to click.

What side effects does this change have?

N/A

Mandatory Checklist

PRs will only be reviewed after checklist is complete

  • Add input/output type hints to new functions/methods
  • Write design document if needed (Do I need to write a design document?)
  • Write/update unit tests
  • Write/update integration tests
  • Write/update functional tests if needed
  • make pr passes
  • make update-reproducible-reqs if dependencies were changed
  • Write documentation

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@mildaniel mildaniel requested a review from a team as a code owner October 18, 2023 22:03
samcli/cli/cli_config_file.py Outdated Show resolved Hide resolved
samcli/cli/cli_config_file.py Show resolved Hide resolved
samcli/cli/cli_config_file.py Show resolved Hide resolved
@mildaniel mildaniel added this pull request to the merge queue Oct 19, 2023
Merged via the queue into aws:develop with commit 7a969fa Oct 19, 2023
76 checks passed
@mildaniel mildaniel deleted the fix-debug-port branch October 19, 2023 16:55
moelasmar pushed a commit to moelasmar/aws-sam-cli that referenced this pull request Oct 22, 2023
…ns (aws#6108)

* fix: Handle parsing input parameter from config

* fix typo

* Fix docstring

* Add debug log stating that a value was changed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants