diff --git a/.changes/1.34.31.json b/.changes/1.34.31.json new file mode 100644 index 000000000000..2525d56f5bd3 --- /dev/null +++ b/.changes/1.34.31.json @@ -0,0 +1,17 @@ +[ + { + "category": "``bedrock-agent``", + "description": "This release adds support to stop an ongoing ingestion job using the StopIngestionJob API in Agents for Amazon Bedrock.", + "type": "api-change" + }, + { + "category": "``codeartifact``", + "description": "Add support for the dual stack endpoints.", + "type": "api-change" + }, + { + "category": "``rds``", + "description": "This release provides additional support for enabling Aurora Limitless Database DB clusters.", + "type": "api-change" + } +] \ No newline at end of file diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 9788fb6d749e..968a5cd43f75 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -2,6 +2,14 @@ CHANGELOG ========= +1.34.31 +======= + +* api-change:``bedrock-agent``: This release adds support to stop an ongoing ingestion job using the StopIngestionJob API in Agents for Amazon Bedrock. +* api-change:``codeartifact``: Add support for the dual stack endpoints. +* api-change:``rds``: This release provides additional support for enabling Aurora Limitless Database DB clusters. + + 1.34.30 ======= diff --git a/awscli/__init__.py b/awscli/__init__.py index 0e740c159147..96d8d99b16cd 100644 --- a/awscli/__init__.py +++ b/awscli/__init__.py @@ -18,7 +18,7 @@ import os -__version__ = '1.34.30' +__version__ = '1.34.31' # # Get our data path to be added to botocore's search path diff --git a/awscli/customizations/codeartifact/login.py b/awscli/customizations/codeartifact/login.py index 6d1353fd46f7..c6816db1e00a 100644 --- a/awscli/customizations/codeartifact/login.py +++ b/awscli/customizations/codeartifact/login.py @@ -720,6 +720,11 @@ class CodeArtifactLogin(BasicCommand): 'help_text': 'Your CodeArtifact repository name', 'required': True, }, + { + 'name': 'endpoint-type', + 'help_text': 'The type of endpoint you want the tool to interact with', + 'required': False + }, { 'name': 'dry-run', 'action': 'store_true', @@ -750,6 +755,8 @@ def _get_repository_endpoint( 'repository': parsed_args.repository, 'format': package_format } + if parsed_args.endpoint_type: + kwargs['endpointType'] = parsed_args.endpoint_type if parsed_args.domain_owner: kwargs['domainOwner'] = parsed_args.domain_owner diff --git a/doc/source/conf.py b/doc/source/conf.py index 449402dc46b6..1f8f2501e2d7 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -52,7 +52,7 @@ # The short X.Y version. version = '1.34.' # The full version, including alpha/beta/rc tags. -release = '1.34.30' +release = '1.34.31' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/setup.cfg b/setup.cfg index b7f504179f51..c6e20f08ddaf 100644 --- a/setup.cfg +++ b/setup.cfg @@ -3,7 +3,7 @@ universal = 0 [metadata] requires_dist = - botocore==1.35.30 + botocore==1.35.31 docutils>=0.10,<0.17 s3transfer>=0.10.0,<0.11.0 PyYAML>=3.10,<6.1 diff --git a/setup.py b/setup.py index 88a13caffb57..5f3248100b9f 100644 --- a/setup.py +++ b/setup.py @@ -24,7 +24,7 @@ def find_version(*file_paths): install_requires = [ - 'botocore==1.35.30', + 'botocore==1.35.31', 'docutils>=0.10,<0.17', 's3transfer>=0.10.0,<0.11.0', 'PyYAML>=3.10,<6.1', diff --git a/tests/functional/codeartifact/test_codeartifact_login.py b/tests/functional/codeartifact/test_codeartifact_login.py index 0715d7dab330..9d0dc1ae5231 100644 --- a/tests/functional/codeartifact/test_codeartifact_login.py +++ b/tests/functional/codeartifact/test_codeartifact_login.py @@ -26,6 +26,7 @@ def setUp(self): self.domain = 'domain' self.domain_owner = 'domain-owner' self.repository = 'repository' + self.endpoint_type = 'ipv4' self.auth_token = 'auth-token' self.namespace = 'namespace' self.nuget_index_url_fmt = '{endpoint}v3/index.json' @@ -66,7 +67,9 @@ def tearDown(self): self.file_creator.remove_all() def _setup_cmd(self, tool, - include_domain_owner=False, dry_run=False, + include_domain_owner=False, + dry_run=False, + include_endpoint_type=False, include_duration_seconds=False, include_namespace=False): package_format = CodeArtifactLogin.TOOL_MAP[tool]['package_format'] @@ -88,6 +91,9 @@ def _setup_cmd(self, tool, if include_domain_owner: cmdline.extend(['--domain-owner', self.domain_owner]) + if include_endpoint_type: + cmdline.extend(['--endpoint-type', self.endpoint_type]) + if dry_run: cmdline.append('--dry-run') @@ -264,7 +270,8 @@ def _assert_expiration_printed_to_stdout(self, stdout): def _assert_operations_called( self, package_format, result, - include_domain_owner=False, include_duration_seconds=False + include_domain_owner=False, include_duration_seconds=False, + include_endpoint_type=False ): get_auth_token_kwargs = { @@ -280,6 +287,9 @@ def _assert_operations_called( get_auth_token_kwargs['domainOwner'] = self.domain_owner get_repo_endpoint_kwargs['domainOwner'] = self.domain_owner + if include_endpoint_type: + get_repo_endpoint_kwargs['endpointType'] = self.endpoint_type + if include_duration_seconds: get_auth_token_kwargs['durationSeconds'] = self.duration @@ -529,6 +539,34 @@ def test_swift_login_with_namespace_dry_run(self): self._assert_dry_run_execution( self._get_swift_commands(scope=self.namespace),result.stdout) + @mock.patch('awscli.customizations.codeartifact.login.is_macos', False) + def test_swift_login_with_namespace_with_endpoint_type(self): + cmdline = self._setup_cmd( + tool='swift', include_namespace=True, include_endpoint_type=True + ) + result = self.cli_runner.run(cmdline) + self.assertEqual(result.rc, 0) + self._assert_operations_called(package_format='swift', result=result, include_endpoint_type=True) + self._assert_expiration_printed_to_stdout(result.stdout) + self._assert_subprocess_execution( + self._get_swift_commands(scope=self.namespace) + ) + self._assert_netrc_has_expected_content() + + @mock.patch('awscli.customizations.codeartifact.login.is_macos', True) + def test_swift_login_with_domain_owner_with_endpoint_type(self): + cmdline = self._setup_cmd( + tool='swift', include_domain_owner=True, include_endpoint_type=True + ) + result = self.cli_runner.run(cmdline) + self.assertEqual(result.rc, 0) + self._assert_operations_called(package_format='swift', result=result, include_endpoint_type=True, + include_domain_owner=True) + self._assert_expiration_printed_to_stdout(result.stdout) + self._assert_subprocess_execution( + self._get_swift_commands(token=self.auth_token) + ) + def test_nuget_login_without_domain_owner_without_duration_seconds(self): cmdline = self._setup_cmd(tool='nuget') result = self.cli_runner.run(cmdline) @@ -586,6 +624,27 @@ def test_nuget_login_with_domain_owner_duration_sections(self): self._get_nuget_commands() ) + def test_nuget_login_with_domain_owner_duration_endpoint_type(self): + cmdline = self._setup_cmd( + tool='nuget', + include_domain_owner=True, + include_duration_seconds=True, + include_endpoint_type=True + ) + result = self.cli_runner.run(cmdline) + self.assertEqual(result.rc, 0) + self._assert_operations_called( + package_format='nuget', + include_domain_owner=True, + include_duration_seconds=True, + include_endpoint_type=True, + result=result + ) + self._assert_expiration_printed_to_stdout(result.stdout) + self._assert_subprocess_execution( + self._get_nuget_commands() + ) + def test_nuget_login_without_domain_owner_dry_run(self): cmdline = self._setup_cmd(tool='nuget', dry_run=True) result = self.cli_runner.run(cmdline) @@ -646,6 +705,26 @@ def test_nuget_login_with_domain_owner_duration_seconds_dry_run(self): result.stdout ) + def test_nuget_login_with_domain_owner_duration_seconds_with_endpoint_type_dryrun(self): + cmdline = self._setup_cmd( + tool='nuget', include_domain_owner=True, + include_duration_seconds=True, + dry_run=True, include_endpoint_type=True + ) + result = self.cli_runner.run(cmdline) + self.assertEqual(result.rc, 0) + self._assert_operations_called( + package_format='nuget', + include_domain_owner=True, + include_duration_seconds=True, + include_endpoint_type=True, + result=result + ) + self._assert_dry_run_execution( + self._get_nuget_commands(), + result.stdout + ) + @mock.patch('awscli.customizations.codeartifact.login.is_windows', True) def test_dotnet_login_without_domain_owner_without_duration_seconds(self): cmdline = self._setup_cmd(tool='dotnet') @@ -657,6 +736,17 @@ def test_dotnet_login_without_domain_owner_without_duration_seconds(self): self._get_dotnet_commands() ) + @mock.patch('awscli.customizations.codeartifact.login.is_windows', True) + def test_dotnet_login_without_domain_owner_without_duration_seconds_with_endpoint_type(self): + cmdline = self._setup_cmd(tool='dotnet', include_endpoint_type=True) + result = self.cli_runner.run(cmdline) + self.assertEqual(result.rc, 0) + self._assert_operations_called(package_format='nuget', result=result, include_endpoint_type=True) + self._assert_expiration_printed_to_stdout(result.stdout) + self._assert_subprocess_execution( + self._get_dotnet_commands() + ) + @mock.patch('awscli.customizations.codeartifact.login.is_windows', True) def test_dotnet_login_with_domain_owner_without_duration_seconds(self): cmdline = self._setup_cmd(tool='dotnet', include_domain_owner=True) @@ -799,6 +889,21 @@ def test_dotnet_login_sources_listed_with_extra_non_list_text(self): ]] self._assert_subprocess_check_output_execution(commands) + @mock.patch('awscli.customizations.codeartifact.login.is_windows', True) + def test_dotnet_login_sources_listed_with_extra_non_list_text_with_endpoint_type(self): + + self.subprocess_check_output_patch.return_value = \ + self._NUGET_SOURCES_LIST_RESPONSE_WITH_EXTRA_NON_LIST_TEXT + + cmdline = self._setup_cmd(tool='dotnet', include_endpoint_type=True) + result = self.cli_runner.run(cmdline) + self.assertEqual(result.rc, 0) + self._assert_operations_called(package_format='nuget', result=result, include_endpoint_type=True) + commands = [[ + 'dotnet', 'nuget', 'list', 'source', '--format', 'detailed' + ]] + self._assert_subprocess_check_output_execution(commands) + def test_npm_login_without_domain_owner(self): cmdline = self._setup_cmd(tool='npm') result = self.cli_runner.run(cmdline) @@ -849,6 +954,18 @@ def test_npm_login_with_domain_owner(self): self._assert_expiration_printed_to_stdout(result.stdout) self._assert_subprocess_execution(self._get_npm_commands()) + def test_npm_login_with_domain_owner_endpoint_type(self): + cmdline = self._setup_cmd(tool='npm', include_domain_owner=True, include_endpoint_type=True) + result = self.cli_runner.run(cmdline) + self.assertEqual(result.rc, 0) + self._assert_operations_called( + package_format='npm', result=result, + include_domain_owner=True, include_duration_seconds=False, + include_endpoint_type=True + ) + self._assert_expiration_printed_to_stdout(result.stdout) + self._assert_subprocess_execution(self._get_npm_commands()) + def test_npm_login_with_domain_owner_duration(self): cmdline = self._setup_cmd(tool='npm', include_domain_owner=True, include_duration_seconds=True) @@ -896,6 +1013,18 @@ def test_npm_login_with_namespace_dry_run(self): result.stdout ) + def test_npm_login_with_namespace_endpoint_type_dry_run(self): + cmdline = self._setup_cmd( + tool='npm', include_namespace=True, dry_run=True, include_endpoint_type=True + ) + result = self.cli_runner.run(cmdline) + self.assertEqual(result.rc, 0) + self._assert_operations_called(package_format='npm', result=result, include_endpoint_type=True) + self._assert_dry_run_execution( + self._get_npm_commands(scope='@{}'.format(self.namespace)), + result.stdout + ) + def test_pip_login_without_domain_owner(self): cmdline = self._setup_cmd(tool='pip') result = self.cli_runner.run(cmdline) @@ -933,6 +1062,18 @@ def test_pip_login_with_domain_owner_duration(self): self._assert_expiration_printed_to_stdout(result.stdout) self._assert_subprocess_execution(self._get_pip_commands()) + def test_pip_login_with_domain_owner_duration_endpoint_type(self): + cmdline = self._setup_cmd(tool='pip', include_domain_owner=True, + include_duration_seconds=True, include_endpoint_type=True) + result = self.cli_runner.run(cmdline) + self.assertEqual(result.rc, 0) + self._assert_operations_called( + package_format='pypi', result=result, include_domain_owner=True, + include_duration_seconds=True, include_endpoint_type=True + ) + self._assert_expiration_printed_to_stdout(result.stdout) + self._assert_subprocess_execution(self._get_pip_commands()) + def test_pip_login_with_domain_owner_dry_run(self): cmdline = self._setup_cmd( tool='pip', include_domain_owner=True, dry_run=True @@ -1012,6 +1153,20 @@ def test_twine_login_without_domain_owner_dry_run(self): password=self.auth_token ) + def test_twine_login_without_domain_owner_dry_run_endpoint_type(self): + cmdline = self._setup_cmd(tool='twine', dry_run=True, include_endpoint_type=True) + result = self.cli_runner.run(cmdline) + self.assertEqual(result.rc, 0) + self._assert_operations_called(package_format='pypi', result=result, include_endpoint_type=True) + self.assertFalse(os.path.exists(self.test_pypi_rc_path)) + self._assert_pypi_rc_has_expected_content( + pypi_rc_str=self._get_twine_commands(), + server='codeartifact', + repo_url=self.endpoint, + username='aws', + password=self.auth_token + ) + def test_twine_login_with_domain_owner(self): cmdline = self._setup_cmd(tool='twine', include_domain_owner=True) result = self.cli_runner.run(cmdline)