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

Add support for --no-use-container option #7769

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

jonife
Copy link
Contributor

@jonife jonife commented Dec 3, 2024

Why is this change necessary?

use-container currently doesn't have an opposite option called no-use-container, user wants to use the IDE toolkit which depends on samcli to set default behaviors but still wants the flexibility of using the opposite option to carry out different operation.

How does it address the issue?

Add support for no-use-container allow the cli to pass use-container = false in the samConfig file

What side effects does this change have?

no-use-container can result to use_container = false in samConfig
sam sync

Container Options:                        
                                    
    -u, --use-container / --no-use-container
                                    Build functions within an AWS Lambda-like container.
                                                                      

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.

@jonife jonife requested a review from a team as a code owner December 3, 2024 23:15
@github-actions github-actions bot added pr/external stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. labels Dec 3, 2024
@patch("samcli.commands._utils.template.get_template_artifacts_format")
@patch("samcli.commands._utils.options.get_template_artifacts_format")
@patch("samcli.commands.sync.command.do_cli")
def test_sync_with_no_use_container(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

qq: is this test suppose to set the --no-use-container option? Otherwise at first glance, it looks like the test is checking the same behaviour as before (ie. this uses the config value and we didn't specify any CLI options)

Copy link
Contributor

@lucashuy lucashuy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making changes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr/external stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants