{"sha":"5b141f25ec16015e1b4aa5961dbc7f3dc69a535c","node_id":"C_kwDOBX7wHdoAKDViMTQxZjI1ZWMxNjAxNWUxYjRhYTU5NjFkYmM3ZjNkYzY5YTUzNWM","commit":{"author":{"name":"jonife","email":"79116465+jonife@users.noreply.github.com","date":"2024-12-05T23:02:20Z"},"committer":{"name":"GitHub","email":"noreply@github.com","date":"2024-12-05T23:02:20Z"},"message":"Add support for --no-use-container option  (#7769)\n\n* add support for --no-use-container option\n\n* add duplicate test for sync","tree":{"sha":"59397e98691dd51304003b0d661b55eae562694e","url":"https://api.github.com/repos/aws/aws-sam-cli/git/trees/59397e98691dd51304003b0d661b55eae562694e"},"url":"https://api.github.com/repos/aws/aws-sam-cli/git/commits/5b141f25ec16015e1b4aa5961dbc7f3dc69a535c","comment_count":0,"verification":{"verified":true,"reason":"valid","signature":"-----BEGIN PGP SIGNATURE-----\n\nwsFcBAABCAAQBQJnUjENCRC1aQ7uu5UhlAAAKg4QADLbVRPKbkgL6CrjDQHrBfUB\nA3JXc4YDTt7Cdg8LEB7YH2cySr87RBdYVKjTKhoOULbKRElwvyF6Vh5nmCAKEQoU\njW+YglA55MXHcZpvnHXPNyfQRZNp+ZHI7J9pPwofuMGqe7o/TDsAOD4pJBHSl1qp\nGylAn87n0DotmjsNoR020eHoALNZiPEA+CuSF7bE5PkeujAGmJomH/O12cqBNU3B\nHDuyh5ms/lk1PkbkUE/OOpkoHF/yEX7ihxexv7nKzBQG0p1VTcHzgDC7rVR8gptJ\nWPw8Tdno0ZXN0QrOfJ+jmFUlc/wScxJZ8uh0hatKehXyFfKwyzhp9cQxh2PwGAPv\nUDe2KMxqWlQO8Oiquh2zMtJXpDeYn/LmzL1YLpd7SmG+LNu/QprjUAguSrE0TYoB\n5n9yNUL2K298zyERciaFp1cQamgyznmQGGNnFd6SmSFhKOdukspPLqJn8qtrSRd7\nALmQP27Q4TpBM4IGIUsBtBfXJekwropSeAciPpZTtDp26YRoB8F3aH8b66KcE1QB\nhqCe5UwTzvPzGv9jihD4q5otOkt55RO5xWGRy9NwPVroxFdRoSQGUTXLFft+cOPG\n+G81l+9uSgZ9WeGurpsXg/t9hphZOpwWan60NkjIXh6KuyCLoKJq51k6mhBAvfxP\nESH9i6bFdiXis/IhV9xJ\n=Cc3c\n-----END PGP SIGNATURE-----\n","payload":"tree 59397e98691dd51304003b0d661b55eae562694e\nparent 99b9d4b7e702bd0e1a80f05172cf999e5bbcb404\nauthor jonife <79116465+jonife@users.noreply.github.com> 1733439740 -0800\ncommitter GitHub <noreply@github.com> 1733439740 +0000\n\nAdd support for --no-use-container option  (#7769)\n\n* add support for --no-use-container option\n\n* add duplicate test for sync","verified_at":"2024-12-05T23:07:40Z"}},"url":"https://api.github.com/repos/aws/aws-sam-cli/commits/5b141f25ec16015e1b4aa5961dbc7f3dc69a535c","html_url":"https://github.com/aws/aws-sam-cli/commit/5b141f25ec16015e1b4aa5961dbc7f3dc69a535c","comments_url":"https://api.github.com/repos/aws/aws-sam-cli/commits/5b141f25ec16015e1b4aa5961dbc7f3dc69a535c/comments","author":{"login":"jonife","id":79116465,"node_id":"MDQ6VXNlcjc5MTE2NDY1","avatar_url":"https://avatars.githubusercontent.com/u/79116465?v=4","gravatar_id":"","url":"https://api.github.com/users/jonife","html_url":"https://github.com/jonife","followers_url":"https://api.github.com/users/jonife/followers","following_url":"https://api.github.com/users/jonife/following{/other_user}","gists_url":"https://api.github.com/users/jonife/gists{/gist_id}","starred_url":"https://api.github.com/users/jonife/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonife/subscriptions","organizations_url":"https://api.github.com/users/jonife/orgs","repos_url":"https://api.github.com/users/jonife/repos","events_url":"https://api.github.com/users/jonife/events{/privacy}","received_events_url":"https://api.github.com/users/jonife/received_events","type":"User","user_view_type":"public","site_admin":false},"committer":{"login":"web-flow","id":19864447,"node_id":"MDQ6VXNlcjE5ODY0NDQ3","avatar_url":"https://avatars.githubusercontent.com/u/19864447?v=4","gravatar_id":"","url":"https://api.github.com/users/web-flow","html_url":"https://github.com/web-flow","followers_url":"https://api.github.com/users/web-flow/followers","following_url":"https://api.github.com/users/web-flow/following{/other_user}","gists_url":"https://api.github.com/users/web-flow/gists{/gist_id}","starred_url":"https://api.github.com/users/web-flow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/web-flow/subscriptions","organizations_url":"https://api.github.com/users/web-flow/orgs","repos_url":"https://api.github.com/users/web-flow/repos","events_url":"https://api.github.com/users/web-flow/events{/privacy}","received_events_url":"https://api.github.com/users/web-flow/received_events","type":"User","user_view_type":"public","site_admin":false},"parents":[{"sha":"99b9d4b7e702bd0e1a80f05172cf999e5bbcb404","url":"https://api.github.com/repos/aws/aws-sam-cli/commits/99b9d4b7e702bd0e1a80f05172cf999e5bbcb404","html_url":"https://github.com/aws/aws-sam-cli/commit/99b9d4b7e702bd0e1a80f05172cf999e5bbcb404"}],"stats":{"total":452,"additions":451,"deletions":1},"files":[{"sha":"624ad2bdbebb94fb2ceb7787179e72b6c132f930","filename":"samcli/commands/_utils/options.py","status":"modified","additions":3,"deletions":1,"changes":4,"blob_url":"https://github.com/aws/aws-sam-cli/blob/5b141f25ec16015e1b4aa5961dbc7f3dc69a535c/samcli%2Fcommands%2F_utils%2Foptions.py","raw_url":"https://github.com/aws/aws-sam-cli/raw/5b141f25ec16015e1b4aa5961dbc7f3dc69a535c/samcli%2Fcommands%2F_utils%2Foptions.py","contents_url":"https://api.github.com/repos/aws/aws-sam-cli/contents/samcli%2Fcommands%2F_utils%2Foptions.py?ref=5b141f25ec16015e1b4aa5961dbc7f3dc69a535c","patch":"@@ -849,8 +849,10 @@ def resolve_image_repos_option(f):\n \n def use_container_build_click_option():\n     return click.option(\n-        \"--use-container\",\n+        \"--use-container/--no-use-container\",\n         \"-u\",\n+        required=False,\n+        default=False,\n         is_flag=True,\n         help=\"Build functions within an AWS Lambda-like container.\",\n     )"},{"sha":"ad3c10adc8b3a69c90d122b2c22015c1462bd063","filename":"tests/unit/commands/samconfig/test_samconfig.py","status":"modified","additions":448,"deletions":0,"changes":448,"blob_url":"https://github.com/aws/aws-sam-cli/blob/5b141f25ec16015e1b4aa5961dbc7f3dc69a535c/tests%2Funit%2Fcommands%2Fsamconfig%2Ftest_samconfig.py","raw_url":"https://github.com/aws/aws-sam-cli/raw/5b141f25ec16015e1b4aa5961dbc7f3dc69a535c/tests%2Funit%2Fcommands%2Fsamconfig%2Ftest_samconfig.py","contents_url":"https://api.github.com/repos/aws/aws-sam-cli/contents/tests%2Funit%2Fcommands%2Fsamconfig%2Ftest_samconfig.py?ref=5b141f25ec16015e1b4aa5961dbc7f3dc69a535c","patch":"@@ -162,6 +162,182 @@ def test_build(self, do_cli_mock):\n                 \"READ\",\n             )\n \n+    @patch(\"samcli.commands.build.command.do_cli\")\n+    def test_build_with_no_use_container(self, do_cli_mock):\n+        config_values = {\n+            \"resource_logical_id\": \"foo\",\n+            \"template_file\": \"mytemplate.yaml\",\n+            \"base_dir\": \"basedir\",\n+            \"build_dir\": \"builddir\",\n+            \"cache_dir\": \"cachedir\",\n+            \"cache\": True,\n+            \"use_container\": False,\n+            \"manifest\": \"requirements.txt\",\n+            \"docker_network\": \"mynetwork\",\n+            \"skip_pull_image\": True,\n+            \"parameter_overrides\": \"ParameterKey=Key,ParameterValue=Value ParameterKey=Key2,ParameterValue=Value2\",\n+            \"container_env_var\": [(\"\")],\n+            \"container_env_var_file\": \"file\",\n+            \"build_image\": [(\"\")],\n+            \"exclude\": [(\"\")],\n+            \"mount_with\": \"read\",\n+        }\n+\n+        with samconfig_parameters([\"build\"], self.scratch_dir, **config_values) as config_path:\n+            from samcli.commands.build.command import cli\n+\n+            LOG.debug(Path(config_path).read_text())\n+            runner = CliRunner()\n+            result = runner.invoke(cli, [])\n+\n+            LOG.info(result.output)\n+            LOG.info(result.exception)\n+            if result.exception:\n+                LOG.exception(\"Command failed\", exc_info=result.exc_info)\n+            self.assertIsNone(result.exception)\n+\n+            do_cli_mock.assert_called_with(\n+                ANY,\n+                \"foo\",\n+                str(Path(os.getcwd(), \"mytemplate.yaml\")),\n+                \"basedir\",\n+                \"builddir\",\n+                \"cachedir\",\n+                True,\n+                False,\n+                False,\n+                False,\n+                \"requirements.txt\",\n+                \"mynetwork\",\n+                True,\n+                {\"Key\": \"Value\", \"Key2\": \"Value2\"},\n+                None,\n+                (\"\",),\n+                \"file\",\n+                (\"\",),\n+                (\"\",),\n+                None,\n+                False,\n+                \"READ\",\n+            )\n+\n+    @patch(\"samcli.commands.build.command.do_cli\")\n+    def test_build_with_no_use_container_option(self, do_cli_mock):\n+        config_values = {\n+            \"resource_logical_id\": \"foo\",\n+            \"template_file\": \"mytemplate.yaml\",\n+            \"base_dir\": \"basedir\",\n+            \"build_dir\": \"builddir\",\n+            \"cache_dir\": \"cachedir\",\n+            \"cache\": True,\n+            \"manifest\": \"requirements.txt\",\n+            \"docker_network\": \"mynetwork\",\n+            \"skip_pull_image\": True,\n+            \"parameter_overrides\": \"ParameterKey=Key,ParameterValue=Value ParameterKey=Key2,ParameterValue=Value2\",\n+            \"container_env_var\": [(\"\")],\n+            \"container_env_var_file\": \"file\",\n+            \"build_image\": [(\"\")],\n+            \"exclude\": [(\"\")],\n+            \"mount_with\": \"read\",\n+        }\n+\n+        with samconfig_parameters([\"build\"], self.scratch_dir, **config_values) as config_path:\n+            from samcli.commands.build.command import cli\n+\n+            LOG.debug(Path(config_path).read_text())\n+            runner = CliRunner()\n+            result = runner.invoke(cli, [\"--no-use-container\"])\n+\n+            LOG.info(result.output)\n+            LOG.info(result.exception)\n+            if result.exception:\n+                LOG.exception(\"Command failed\", exc_info=result.exc_info)\n+            self.assertIsNone(result.exception)\n+\n+            do_cli_mock.assert_called_with(\n+                ANY,\n+                \"foo\",\n+                str(Path(os.getcwd(), \"mytemplate.yaml\")),\n+                \"basedir\",\n+                \"builddir\",\n+                \"cachedir\",\n+                True,\n+                False,\n+                False,\n+                False,\n+                \"requirements.txt\",\n+                \"mynetwork\",\n+                True,\n+                {\"Key\": \"Value\", \"Key2\": \"Value2\"},\n+                None,\n+                (\"\",),\n+                \"file\",\n+                (\"\",),\n+                (\"\",),\n+                None,\n+                False,\n+                \"READ\",\n+            )\n+\n+    @patch(\"samcli.commands.build.command.do_cli\")\n+    def test_build_with_no_use_container_override(self, do_cli_mock):\n+        config_values = {\n+            \"resource_logical_id\": \"foo\",\n+            \"template_file\": \"mytemplate.yaml\",\n+            \"base_dir\": \"basedir\",\n+            \"build_dir\": \"builddir\",\n+            \"cache_dir\": \"cachedir\",\n+            \"cache\": True,\n+            \"use_container\": True,\n+            \"manifest\": \"requirements.txt\",\n+            \"docker_network\": \"mynetwork\",\n+            \"skip_pull_image\": True,\n+            \"parameter_overrides\": \"ParameterKey=Key,ParameterValue=Value ParameterKey=Key2,ParameterValue=Value2\",\n+            \"container_env_var\": [(\"\")],\n+            \"container_env_var_file\": \"file\",\n+            \"build_image\": [(\"\")],\n+            \"exclude\": [(\"\")],\n+            \"mount_with\": \"read\",\n+        }\n+\n+        with samconfig_parameters([\"build\"], self.scratch_dir, **config_values) as config_path:\n+            from samcli.commands.build.command import cli\n+\n+            LOG.debug(Path(config_path).read_text())\n+            runner = CliRunner()\n+            result = runner.invoke(cli, [\"--no-use-container\"])\n+\n+            LOG.info(result.output)\n+            LOG.info(result.exception)\n+            if result.exception:\n+                LOG.exception(\"Command failed\", exc_info=result.exc_info)\n+            self.assertIsNone(result.exception)\n+\n+            do_cli_mock.assert_called_with(\n+                ANY,\n+                \"foo\",\n+                str(Path(os.getcwd(), \"mytemplate.yaml\")),\n+                \"basedir\",\n+                \"builddir\",\n+                \"cachedir\",\n+                True,\n+                False,\n+                False,\n+                False,\n+                \"requirements.txt\",\n+                \"mynetwork\",\n+                True,\n+                {\"Key\": \"Value\", \"Key2\": \"Value2\"},\n+                None,\n+                (\"\",),\n+                \"file\",\n+                (\"\",),\n+                (\"\",),\n+                None,\n+                False,\n+                \"READ\",\n+            )\n+\n     @patch(\"samcli.commands.build.command.do_cli\")\n     def test_build_with_no_cached_override(self, do_cli_mock):\n         config_values = {\n@@ -1027,6 +1203,278 @@ def test_sync(\n                 {\"HelloWorld\": [\"file.txt\", \"other.txt\"], \"HelloMars\": [\"single.file\"]},\n             )\n \n+    @patch(\"samcli.commands._utils.experimental.is_experimental_enabled\")\n+    @patch(\"samcli.lib.cli_validation.image_repository_validation._is_all_image_funcs_provided\")\n+    @patch(\"samcli.lib.cli_validation.image_repository_validation.get_template_artifacts_format\")\n+    @patch(\"samcli.commands._utils.template.get_template_artifacts_format\")\n+    @patch(\"samcli.commands._utils.options.get_template_artifacts_format\")\n+    @patch(\"samcli.commands.sync.command.do_cli\")\n+    def test_sync_with_no_use_container(\n+        self,\n+        do_cli_mock,\n+        template_artifacts_mock1,\n+        template_artifacts_mock2,\n+        template_artifacts_mock3,\n+        is_all_image_funcs_provided_mock,\n+        experimental_mock,\n+    ):\n+        template_artifacts_mock1.return_value = [ZIP]\n+        template_artifacts_mock2.return_value = [ZIP]\n+        template_artifacts_mock3.return_value = [ZIP]\n+        is_all_image_funcs_provided_mock.return_value = True\n+        experimental_mock.return_value = True\n+\n+        config_values = {\n+            \"template_file\": \"mytemplate.yaml\",\n+            \"stack_name\": \"mystack\",\n+            \"image_repository\": \"123456789012.dkr.ecr.us-east-1.amazonaws.com/test1\",\n+            \"base_dir\": \"path\",\n+            \"use_container\": False,\n+            \"s3_bucket\": \"mybucket\",\n+            \"s3_prefix\": \"myprefix\",\n+            \"kms_key_id\": \"mykms\",\n+            \"parameter_overrides\": 'Key1=Value1 Key2=\"Multiple spaces in the value\"',\n+            \"capabilities\": \"cap1 cap2\",\n+            \"no_execute_changeset\": True,\n+            \"role_arn\": \"arn\",\n+            \"notification_arns\": \"notify1 notify2\",\n+            \"tags\": 'a=tag1 b=\"tag with spaces\"',\n+            \"metadata\": '{\"m1\": \"value1\", \"m2\": \"value2\"}',\n+            \"container_env_var_file\": \"file\",\n+            \"guided\": True,\n+            \"confirm_changeset\": True,\n+            \"region\": \"myregion\",\n+            \"signing_profiles\": \"function=profile:owner\",\n+            \"watch_exclude\": {\"HelloWorld\": [\"file.txt\", \"other.txt\"], \"HelloMars\": [\"single.file\"]},\n+        }\n+\n+        with samconfig_parameters([\"sync\"], self.scratch_dir, **config_values) as config_path:\n+            from samcli.commands.sync.command import cli\n+\n+            LOG.debug(Path(config_path).read_text())\n+            runner = CliRunner()\n+            result = runner.invoke(cli, [])\n+\n+            LOG.info(result.output)\n+            LOG.info(result.exception)\n+            if result.exception:\n+                LOG.exception(\"Command failed\", exc_info=result.exc_info)\n+            self.assertIsNone(result.exception)\n+\n+            do_cli_mock.assert_called_with(\n+                str(Path(os.getcwd(), \"mytemplate.yaml\")),\n+                False,\n+                False,\n+                (),\n+                (),\n+                True,\n+                True,\n+                \"mystack\",\n+                \"myregion\",\n+                None,\n+                \"path\",\n+                {\"Key1\": \"Value1\", \"Key2\": \"Multiple spaces in the value\"},\n+                None,\n+                \"123456789012.dkr.ecr.us-east-1.amazonaws.com/test1\",\n+                None,\n+                \"mybucket\",\n+                \"myprefix\",\n+                \"mykms\",\n+                [\"cap1\", \"cap2\"],\n+                \"arn\",\n+                [\"notify1\", \"notify2\"],\n+                {\"a\": \"tag1\", \"b\": \"tag with spaces\"},\n+                {\"m1\": \"value1\", \"m2\": \"value2\"},\n+                False,\n+                \"file\",\n+                (),\n+                \"samconfig.toml\",\n+                \"default\",\n+                False,\n+                {\"HelloWorld\": [\"file.txt\", \"other.txt\"], \"HelloMars\": [\"single.file\"]},\n+            )\n+\n+    @patch(\"samcli.commands._utils.experimental.is_experimental_enabled\")\n+    @patch(\"samcli.lib.cli_validation.image_repository_validation._is_all_image_funcs_provided\")\n+    @patch(\"samcli.lib.cli_validation.image_repository_validation.get_template_artifacts_format\")\n+    @patch(\"samcli.commands._utils.template.get_template_artifacts_format\")\n+    @patch(\"samcli.commands._utils.options.get_template_artifacts_format\")\n+    @patch(\"samcli.commands.sync.command.do_cli\")\n+    def test_sync_with_no_use_container_options(\n+        self,\n+        do_cli_mock,\n+        template_artifacts_mock1,\n+        template_artifacts_mock2,\n+        template_artifacts_mock3,\n+        is_all_image_funcs_provided_mock,\n+        experimental_mock,\n+    ):\n+        template_artifacts_mock1.return_value = [ZIP]\n+        template_artifacts_mock2.return_value = [ZIP]\n+        template_artifacts_mock3.return_value = [ZIP]\n+        is_all_image_funcs_provided_mock.return_value = True\n+        experimental_mock.return_value = True\n+\n+        config_values = {\n+            \"template_file\": \"mytemplate.yaml\",\n+            \"stack_name\": \"mystack\",\n+            \"image_repository\": \"123456789012.dkr.ecr.us-east-1.amazonaws.com/test1\",\n+            \"base_dir\": \"path\",\n+            \"s3_bucket\": \"mybucket\",\n+            \"s3_prefix\": \"myprefix\",\n+            \"kms_key_id\": \"mykms\",\n+            \"parameter_overrides\": 'Key1=Value1 Key2=\"Multiple spaces in the value\"',\n+            \"capabilities\": \"cap1 cap2\",\n+            \"no_execute_changeset\": True,\n+            \"role_arn\": \"arn\",\n+            \"notification_arns\": \"notify1 notify2\",\n+            \"tags\": 'a=tag1 b=\"tag with spaces\"',\n+            \"metadata\": '{\"m1\": \"value1\", \"m2\": \"value2\"}',\n+            \"container_env_var_file\": \"file\",\n+            \"guided\": True,\n+            \"confirm_changeset\": True,\n+            \"region\": \"myregion\",\n+            \"signing_profiles\": \"function=profile:owner\",\n+            \"watch_exclude\": {\"HelloWorld\": [\"file.txt\", \"other.txt\"], \"HelloMars\": [\"single.file\"]},\n+        }\n+\n+        with samconfig_parameters([\"sync\"], self.scratch_dir, **config_values) as config_path:\n+            from samcli.commands.sync.command import cli\n+\n+            LOG.debug(Path(config_path).read_text())\n+            runner = CliRunner()\n+            result = runner.invoke(cli, [\"--no-use-container\"])\n+\n+            LOG.info(result.output)\n+            LOG.info(result.exception)\n+            if result.exception:\n+                LOG.exception(\"Command failed\", exc_info=result.exc_info)\n+            self.assertIsNone(result.exception)\n+\n+            do_cli_mock.assert_called_with(\n+                str(Path(os.getcwd(), \"mytemplate.yaml\")),\n+                False,\n+                False,\n+                (),\n+                (),\n+                True,\n+                True,\n+                \"mystack\",\n+                \"myregion\",\n+                None,\n+                \"path\",\n+                {\"Key1\": \"Value1\", \"Key2\": \"Multiple spaces in the value\"},\n+                None,\n+                \"123456789012.dkr.ecr.us-east-1.amazonaws.com/test1\",\n+                None,\n+                \"mybucket\",\n+                \"myprefix\",\n+                \"mykms\",\n+                [\"cap1\", \"cap2\"],\n+                \"arn\",\n+                [\"notify1\", \"notify2\"],\n+                {\"a\": \"tag1\", \"b\": \"tag with spaces\"},\n+                {\"m1\": \"value1\", \"m2\": \"value2\"},\n+                False,\n+                \"file\",\n+                (),\n+                \"samconfig.toml\",\n+                \"default\",\n+                False,\n+                {\"HelloWorld\": [\"file.txt\", \"other.txt\"], \"HelloMars\": [\"single.file\"]},\n+            )\n+\n+    @patch(\"samcli.commands._utils.experimental.is_experimental_enabled\")\n+    @patch(\"samcli.lib.cli_validation.image_repository_validation._is_all_image_funcs_provided\")\n+    @patch(\"samcli.lib.cli_validation.image_repository_validation.get_template_artifacts_format\")\n+    @patch(\"samcli.commands._utils.template.get_template_artifacts_format\")\n+    @patch(\"samcli.commands._utils.options.get_template_artifacts_format\")\n+    @patch(\"samcli.commands.sync.command.do_cli\")\n+    def test_sync_with_no_use_container_override(\n+        self,\n+        do_cli_mock,\n+        template_artifacts_mock1,\n+        template_artifacts_mock2,\n+        template_artifacts_mock3,\n+        is_all_image_funcs_provided_mock,\n+        experimental_mock,\n+    ):\n+        template_artifacts_mock1.return_value = [ZIP]\n+        template_artifacts_mock2.return_value = [ZIP]\n+        template_artifacts_mock3.return_value = [ZIP]\n+        is_all_image_funcs_provided_mock.return_value = True\n+        experimental_mock.return_value = True\n+\n+        config_values = {\n+            \"template_file\": \"mytemplate.yaml\",\n+            \"stack_name\": \"mystack\",\n+            \"image_repository\": \"123456789012.dkr.ecr.us-east-1.amazonaws.com/test1\",\n+            \"base_dir\": \"path\",\n+            \"use_container\": True,\n+            \"s3_bucket\": \"mybucket\",\n+            \"s3_prefix\": \"myprefix\",\n+            \"kms_key_id\": \"mykms\",\n+            \"parameter_overrides\": 'Key1=Value1 Key2=\"Multiple spaces in the value\"',\n+            \"capabilities\": \"cap1 cap2\",\n+            \"no_execute_changeset\": True,\n+            \"role_arn\": \"arn\",\n+            \"notification_arns\": \"notify1 notify2\",\n+            \"tags\": 'a=tag1 b=\"tag with spaces\"',\n+            \"metadata\": '{\"m1\": \"value1\", \"m2\": \"value2\"}',\n+            \"container_env_var_file\": \"file\",\n+            \"guided\": True,\n+            \"confirm_changeset\": True,\n+            \"region\": \"myregion\",\n+            \"signing_profiles\": \"function=profile:owner\",\n+            \"watch_exclude\": {\"HelloWorld\": [\"file.txt\", \"other.txt\"], \"HelloMars\": [\"single.file\"]},\n+        }\n+\n+        with samconfig_parameters([\"sync\"], self.scratch_dir, **config_values) as config_path:\n+            from samcli.commands.sync.command import cli\n+\n+            LOG.debug(Path(config_path).read_text())\n+            runner = CliRunner()\n+            result = runner.invoke(cli, [\"--no-use-container\"])\n+\n+            LOG.info(result.output)\n+            LOG.info(result.exception)\n+            if result.exception:\n+                LOG.exception(\"Command failed\", exc_info=result.exc_info)\n+            self.assertIsNone(result.exception)\n+\n+            do_cli_mock.assert_called_with(\n+                str(Path(os.getcwd(), \"mytemplate.yaml\")),\n+                False,\n+                False,\n+                (),\n+                (),\n+                True,\n+                True,\n+                \"mystack\",\n+                \"myregion\",\n+                None,\n+                \"path\",\n+                {\"Key1\": \"Value1\", \"Key2\": \"Multiple spaces in the value\"},\n+                None,\n+                \"123456789012.dkr.ecr.us-east-1.amazonaws.com/test1\",\n+                None,\n+                \"mybucket\",\n+                \"myprefix\",\n+                \"mykms\",\n+                [\"cap1\", \"cap2\"],\n+                \"arn\",\n+                [\"notify1\", \"notify2\"],\n+                {\"a\": \"tag1\", \"b\": \"tag with spaces\"},\n+                {\"m1\": \"value1\", \"m2\": \"value2\"},\n+                False,\n+                \"file\",\n+                (),\n+                \"samconfig.toml\",\n+                \"default\",\n+                False,\n+                {\"HelloWorld\": [\"file.txt\", \"other.txt\"], \"HelloMars\": [\"single.file\"]},\n+            )\n+\n \n class TestSamConfigWithOverrides(TestCase):\n     def setUp(self):"}]}