From 26863a73ef90a6894a03a44fcdc065e446195c0d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 2 May 2023 11:54:27 -0700 Subject: [PATCH 01/10] chore(deps-dev): bump ruff from 0.0.261 to 0.0.262 in /requirements (#491) Bumps [ruff](https://github.com/charliermarsh/ruff) from 0.0.261 to 0.0.262. - [Release notes](https://github.com/charliermarsh/ruff/releases) - [Changelog](https://github.com/charliermarsh/ruff/blob/main/BREAKING_CHANGES.md) - [Commits](https://github.com/charliermarsh/ruff/compare/v0.0.261...v0.0.262) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Mehmet Nuri Deveci <5735811+mndeveci@users.noreply.github.com> --- requirements/dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/dev.txt b/requirements/dev.txt index 8e9dc818c..b8d169726 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -12,4 +12,4 @@ pyelftools~=0.29 # Used to verify the generated Go binary architecture in integr # formatter black==23.3.0 -ruff==0.0.261 \ No newline at end of file +ruff==0.0.262 \ No newline at end of file From 918d1037105636b883f93f7ffed0c3117acd12b1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 2 May 2023 19:02:13 +0000 Subject: [PATCH 02/10] chore(deps-dev): bump coverage from 7.2.3 to 7.2.5 in /requirements (#494) Bumps [coverage](https://github.com/nedbat/coveragepy) from 7.2.3 to 7.2.5. - [Release notes](https://github.com/nedbat/coveragepy/releases) - [Changelog](https://github.com/nedbat/coveragepy/blob/master/CHANGES.rst) - [Commits](https://github.com/nedbat/coveragepy/compare/7.2.3...7.2.5) --- updated-dependencies: - dependency-name: coverage dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements/dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/dev.txt b/requirements/dev.txt index b8d169726..a42b04eff 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -1,4 +1,4 @@ -coverage==7.2.3 +coverage==7.2.5 flake8==3.3.0; python_version < '3.8' flake8==3.8.4; python_version >= '3.8' pytest-cov==4.0.0 From 6211c2c13d880b4a93c63db09cf886908ae3d89a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 2 May 2023 14:59:26 -0700 Subject: [PATCH 03/10] chore(deps-dev): bump ruff from 0.0.262 to 0.0.264 in /requirements (#495) Bumps [ruff](https://github.com/charliermarsh/ruff) from 0.0.262 to 0.0.264. - [Release notes](https://github.com/charliermarsh/ruff/releases) - [Changelog](https://github.com/charliermarsh/ruff/blob/main/BREAKING_CHANGES.md) - [Commits](https://github.com/charliermarsh/ruff/compare/v0.0.262...v0.0.264) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements/dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/dev.txt b/requirements/dev.txt index a42b04eff..30de5976e 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -12,4 +12,4 @@ pyelftools~=0.29 # Used to verify the generated Go binary architecture in integr # formatter black==23.3.0 -ruff==0.0.262 \ No newline at end of file +ruff==0.0.264 \ No newline at end of file From 20a66369c44b26b8b1fc33d7941987d00cedc747 Mon Sep 17 00:00:00 2001 From: Daniel Mil <84205762+mildaniel@users.noreply.github.com> Date: Mon, 8 May 2023 15:19:25 -0700 Subject: [PATCH 04/10] feat: Add format target to makefile (#499) --- Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile b/Makefile index a4b44ad32..0232ed82f 100644 --- a/Makefile +++ b/Makefile @@ -20,6 +20,9 @@ lint: # Liner performs static analysis to catch latent bugs ruff aws_lambda_builders +lint-fix: + ruff aws_lambda_builders --fix + # Command to run everytime you make changes to verify everything works dev: lint test @@ -31,3 +34,5 @@ black-check: # Verifications to run before sending a pull request pr: init dev black-check + +format: lint-fix black \ No newline at end of file From 906375d182f4ed3dd9782b4f224fdb790af9887c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 9 May 2023 15:11:03 -0700 Subject: [PATCH 05/10] chore(deps-dev): bump ruff from 0.0.264 to 0.0.265 in /requirements (#497) Bumps [ruff](https://github.com/charliermarsh/ruff) from 0.0.264 to 0.0.265. - [Release notes](https://github.com/charliermarsh/ruff/releases) - [Changelog](https://github.com/charliermarsh/ruff/blob/main/BREAKING_CHANGES.md) - [Commits](https://github.com/charliermarsh/ruff/compare/v0.0.264...v0.0.265) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements/dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/dev.txt b/requirements/dev.txt index 30de5976e..5b9ce1023 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -12,4 +12,4 @@ pyelftools~=0.29 # Used to verify the generated Go binary architecture in integr # formatter black==23.3.0 -ruff==0.0.264 \ No newline at end of file +ruff==0.0.265 \ No newline at end of file From 7ef58036d0bb775dba103d704213cb952f243ef1 Mon Sep 17 00:00:00 2001 From: Daniel Mil <84205762+mildaniel@users.noreply.github.com> Date: Tue, 16 May 2023 16:18:59 -0700 Subject: [PATCH 06/10] feat: Make esbuild command builder accept any flag (#498) * feat: Make esbuild command builder accept any flag * Format files * Revert "feat: Add format target to makefile (#499)" This reverts commit 20a66369c44b26b8b1fc33d7941987d00cedc747. * Address comments * Turn list into a set --- .../workflows/nodejs_npm_esbuild/esbuild.py | 156 ++++++++++-------- .../nodejs_npm_esbuild/test_esbuild.py | 14 +- 2 files changed, 93 insertions(+), 77 deletions(-) diff --git a/aws_lambda_builders/workflows/nodejs_npm_esbuild/esbuild.py b/aws_lambda_builders/workflows/nodejs_npm_esbuild/esbuild.py index 173d22e67..ba4546e45 100644 --- a/aws_lambda_builders/workflows/nodejs_npm_esbuild/esbuild.py +++ b/aws_lambda_builders/workflows/nodejs_npm_esbuild/esbuild.py @@ -3,7 +3,7 @@ """ import logging from pathlib import Path -from typing import Any, Dict, List +from typing import Any, Callable, Dict, List, Union from aws_lambda_builders.actions import ActionFailedError from aws_lambda_builders.workflows.nodejs_npm.utils import OSUtils @@ -99,28 +99,7 @@ def run(self, args, cwd=None): return out.decode("utf8").strip() -# The esbuild API flags are broken up into three forms (https://esbuild.github.io/api/): -# Multi-word arguments are expected to be passed down using snake case e.g. entry_points -# Boolean types (--minify) -SUPPORTED_ESBUILD_APIS_BOOLEAN = [ - "minify", - "sourcemap", -] - -# single value types (--target=es2020) -SUPPORTED_ESBUILD_APIS_SINGLE_VALUE = [ - "target", - "format", - "main_fields", - "sources_content", -] - -# Multi-value types (--external:axios --external:aws-sdk) -SUPPORTED_ESBUILD_APIS_MULTI_VALUE = [ - "external", - "loader", - "out_extension", -] +NON_CONFIGURABLE_VALUES = {"bundle", "platform", "outdir"} class EsbuildCommandBuilder: @@ -154,15 +133,96 @@ def build_esbuild_args_from_config(self) -> "EsbuildCommandBuilder": """ args = [] - args.extend(self._get_boolean_args()) - args.extend(self._get_single_value_args()) - args.extend(self._get_multi_value_args()) + for config_key, config_value in self._bundler_config.items(): + if config_key in NON_CONFIGURABLE_VALUES: + LOG.debug( + "'%s=%s' was not a used configuration since AWS Lambda Builders " + "sets these values for the code to be correctly consumed by AWS Lambda", + config_key, + config_value, + ) + continue + if config_key == "entry_points": + # Entry points are a required parameter and are handled by the build_entry_points() method + continue + configuration_type_callback = self._get_config_type_callback(config_value) + LOG.debug("Configuring the parameter '%s=%s'", config_key, config_value) + args.extend(configuration_type_callback(config_key, config_value)) LOG.debug("Found the following args in the config: %s", str(args)) self._command.extend(args) return self + def _get_config_type_callback( + self, config_value: Union[bool, str, list] + ) -> Callable[[str, Union[bool, str, list]], List[str]]: + """ + Determines the type of the command and returns the corresponding + function to build out that command line argument type + + :param config_value: Union[bool, str, list] + The configuration value configured through the options. The configuration should be one + of the supported types as defined by the esbuild API (https://esbuild.github.io/api/). + :return: Callable[[str, Union[bool, str, list]], List[str]] + Returns a function that the caller can use to turn the relevant + configuration into the correctly formatted command line argument. + """ + if isinstance(config_value, bool): + return self._create_boolean_config + elif isinstance(config_value, str): + return self._create_str_config + elif isinstance(config_value, list): + return self._create_list_config + raise EsbuildCommandError("Failed to determine the type of the configuration: %s", config_value) + + def _create_boolean_config(self, config_key: str, config_value: bool) -> List[str]: + """ + Given boolean-type configuration, convert it to a string representation suitable for the esbuild API + Should be created in the form ([--config-key]) + + :param config_key: str + The configuration key to be used + :param config_value: bool + The configuration value to be used + :return: List[str] + List of resolved command line arguments to be appended to the builder + """ + if config_value is True: + return [f"--{self._convert_snake_to_kebab_case(config_key)}"] + return [] + + def _create_str_config(self, config_key: str, config_value: str) -> List[str]: + """ + Given string-type configuration, convert it to a string representation suitable for the esbuild API + Should be created in the form ([--config-key=config_value]) + + :param config_key: str + The configuration key to be used + :param config_value: List[str] + The configuration value to be used + :return: List[str] + List of resolved command line arguments to be appended to the builder + """ + return [f"--{self._convert_snake_to_kebab_case(config_key)}={config_value}"] + + def _create_list_config(self, config_key: str, config_value: List[str]) -> List[str]: + """ + Given list-type configuration, convert it to a string representation suitable for the esbuild API + Should be created in the form ([--config-key:config_value_a, --config_key:config_value_b]) + + :param config_key: str + The configuration key to be used + :param config_value: List[str] + The configuration value to be used + :return: List[str] + List of resolved command line arguments to be appended to the builder + """ + args = [] + for config_item in config_value: + args.append(f"--{self._convert_snake_to_kebab_case(config_key)}:{config_item}") + return args + def build_entry_points(self) -> "EsbuildCommandBuilder": """ Build the entry points to the command @@ -227,50 +287,6 @@ def build_with_no_dependencies(self) -> "EsbuildCommandBuilder": self._command.extend(args) return self - def _get_boolean_args(self) -> List[str]: - """ - Get a list of all the boolean value flag types (e.g. --minify) - - :rtype: List[str] - :return: Arguments to be appended to the command list - """ - args = [] - for param in SUPPORTED_ESBUILD_APIS_BOOLEAN: - if param in self._bundler_config and self._bundler_config[param] is True: - args.append(f"--{self._convert_snake_to_kebab_case(param)}") - return args - - def _get_single_value_args(self) -> List[str]: - """ - Get a list of all the single value flag types (e.g. --target=es2020) - - :rtype: List[str] - :return: Arguments to be appended to the command list - """ - args = [] - for param in SUPPORTED_ESBUILD_APIS_SINGLE_VALUE: - if param in self._bundler_config: - value = self._bundler_config.get(param) - args.append(f"--{self._convert_snake_to_kebab_case(param)}={value}") - return args - - def _get_multi_value_args(self) -> List[str]: - """ - Get a list of all the multi-value flag types (e.g. --external:aws-sdk) - - :rtype: List[str] - :return: Arguments to be appended to the command list - """ - args = [] - for param in SUPPORTED_ESBUILD_APIS_MULTI_VALUE: - if param in self._bundler_config: - values = self._bundler_config.get(param) - if not isinstance(values, list): - raise EsbuildCommandError(f"Invalid type for property {param}, must be a dict.") - for param_item in values: - args.append(f"--{self._convert_snake_to_kebab_case(param)}:{param_item}") - return args - def _get_explicit_file_type(self, entry_point, entry_path): """ Get an entry point with an explicit .ts or .js suffix. diff --git a/tests/unit/workflows/nodejs_npm_esbuild/test_esbuild.py b/tests/unit/workflows/nodejs_npm_esbuild/test_esbuild.py index 624cef36e..e928282c9 100644 --- a/tests/unit/workflows/nodejs_npm_esbuild/test_esbuild.py +++ b/tests/unit/workflows/nodejs_npm_esbuild/test_esbuild.py @@ -209,19 +209,19 @@ def test_builds_args_from_config(self, osutils_mock): .get_command() ) self.assertEqual( - args, - [ + set(args), + { "--minify", "--target=node14", "--format=esm", "--main-fields=module,main", - "--sources-content=false", "--external:aws-sdk", "--external:axios", "--loader:.proto=text", "--loader:.json=js", "--out-extension:.js=.mjs", - ], + "--sources-content=false", + }, ) @patch("aws_lambda_builders.workflows.nodejs_npm.utils.OSUtils") @@ -235,8 +235,8 @@ def test_combined_builder_with_dependencies(self, osutils_mock): .get_command() ) self.assertEqual( - args, - [ + set(args), + { "x.js", "--bundle", "--platform=node", @@ -246,7 +246,7 @@ def test_combined_builder_with_dependencies(self, osutils_mock): "--format=esm", "--loader:.proto=text", "--loader:.json=js", - ], + }, ) @parameterized.expand( From 297094eaeda9550fdff23c82e914e3789d50c8cd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 23 May 2023 11:46:33 -0700 Subject: [PATCH 07/10] chore(deps-dev): bump ruff from 0.0.265 to 0.0.269 in /requirements (#505) Bumps [ruff](https://github.com/charliermarsh/ruff) from 0.0.265 to 0.0.269. - [Release notes](https://github.com/charliermarsh/ruff/releases) - [Changelog](https://github.com/charliermarsh/ruff/blob/main/BREAKING_CHANGES.md) - [Commits](https://github.com/charliermarsh/ruff/compare/v0.0.265...v0.0.269) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements/dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/dev.txt b/requirements/dev.txt index 5b9ce1023..a5e6f885d 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -12,4 +12,4 @@ pyelftools~=0.29 # Used to verify the generated Go binary architecture in integr # formatter black==23.3.0 -ruff==0.0.265 \ No newline at end of file +ruff==0.0.269 \ No newline at end of file From f784a5e315d102b838018a130dc1a7001f0ec9dd Mon Sep 17 00:00:00 2001 From: Mehmet Nuri Deveci <5735811+mndeveci@users.noreply.github.com> Date: Wed, 24 May 2023 17:45:26 -0700 Subject: [PATCH 08/10] feat: add ruby3.2 support (#40) (#504) * Onboarded ruby3.2 * Add Ruby3.2 to build.yml. * parameterize ruby test cases with ruby versions * fix black issues * add concurrency property * fix ruby testing --------- Co-authored-by: trivenay Co-authored-by: Sean O Brien Co-authored-by: Sean O Brien Co-authored-by: Mohamed ElAsmar --- .github/workflows/build.yml | 14 +++++++++----- aws_lambda_builders/validator.py | 1 + .../workflows/ruby_bundler/test_ruby.py | 12 +++++++++++- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 686b86669..9948fe50d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,6 +11,10 @@ on: - develop - "feat*" +concurrency: + group: ${{ github.ref }} + cancel-in-progress: true + jobs: run-workflow: name: PR Workflow @@ -264,7 +268,7 @@ jobs: - run: pytest -vv tests/integration/workflows/python_pip ruby-integration: - name: ${{ matrix.os }} / ${{ matrix.python }} / ruby-${{ matrix.ruby }} + name: ${{ matrix.os }} / ${{ matrix.python }} / ruby if: github.repository_owner == 'aws' runs-on: ${{ matrix.os }} strategy: @@ -278,9 +282,6 @@ jobs: - "3.8" - "3.9" - "3.10" - ruby: - - "3.1" - - "2.7" steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 @@ -288,7 +289,10 @@ jobs: python-version: ${{ matrix.python }} - uses: ruby/setup-ruby@v1 with: - ruby-version: ${{ matrix.ruby }} + ruby-version: "3.2" + - uses: ruby/setup-ruby@v1 + with: + ruby-version: "2.7" - run: make init - run: pytest -vv tests/integration/workflows/ruby_bundler diff --git a/aws_lambda_builders/validator.py b/aws_lambda_builders/validator.py index de9d44a8c..86b720e13 100644 --- a/aws_lambda_builders/validator.py +++ b/aws_lambda_builders/validator.py @@ -19,6 +19,7 @@ "python3.9": [ARM64, X86_64], "python3.10": [ARM64, X86_64], "ruby2.7": [ARM64, X86_64], + "ruby3.2": [ARM64, X86_64], "java8": [ARM64, X86_64], "java11": [ARM64, X86_64], "java17": [ARM64, X86_64], diff --git a/tests/integration/workflows/ruby_bundler/test_ruby.py b/tests/integration/workflows/ruby_bundler/test_ruby.py index 9648cd6b6..072e92e94 100644 --- a/tests/integration/workflows/ruby_bundler/test_ruby.py +++ b/tests/integration/workflows/ruby_bundler/test_ruby.py @@ -4,6 +4,8 @@ from unittest import TestCase, mock +from parameterized import parameterized_class + from aws_lambda_builders.builder import LambdaBuilder from aws_lambda_builders.exceptions import WorkflowFailedError @@ -13,11 +15,20 @@ workflow_logger = logging.getLogger("aws_lambda_builders.workflows.ruby_bundler.workflow") +@parameterized_class( + ("runtime",), + [ + ("ruby2.7",), + ("ruby3.2",), + ], +) class TestRubyWorkflow(TestCase): """ Verifies that `ruby` workflow works by building a Lambda using Bundler """ + runtime = "" + TEST_DATA_FOLDER = os.path.join(os.path.dirname(__file__), "testdata") def setUp(self): @@ -26,7 +37,6 @@ def setUp(self): self.dependencies_dir = tempfile.mkdtemp() self.no_deps = os.path.join(self.TEST_DATA_FOLDER, "no-deps") self.builder = LambdaBuilder(language="ruby", dependency_manager="bundler", application_framework=None) - self.runtime = "ruby2.7" def tearDown(self): shutil.rmtree(self.artifacts_dir) From fb506254d19a956e346524b70086f76d54581038 Mon Sep 17 00:00:00 2001 From: Ke Deng <39106214+mrkdeng@users.noreply.github.com> Date: Wed, 24 May 2023 18:04:22 -0700 Subject: [PATCH 09/10] Add function architecture argument when building dotnet function (#501) * add func architecture and unit tests * Update aws-lambda-tools-defaults.json in test project self contained is not necessary for dotnet6 functions, since the runtime has been provided by Lambda * Revert "Update aws-lambda-tools-defaults.json in test project" This reverts commit 2b120d88a6c9e50f83bb7bbbbffe3c3615b0ef93. * Revert "add func architecture and unit tests" This reverts commit ed6cf43ee588d4703b029e61a866fc640fc4d7d9. * provide function architecture --------- Co-authored-by: Mehmet Nuri Deveci <5735811+mndeveci@users.noreply.github.com> --- .../workflows/dotnet_clipackage/actions.py | 29 ++++++++++++++- .../dotnet_clipackage/test_actions.py | 37 +++++++++++++++++-- 2 files changed, 61 insertions(+), 5 deletions(-) diff --git a/aws_lambda_builders/workflows/dotnet_clipackage/actions.py b/aws_lambda_builders/workflows/dotnet_clipackage/actions.py index 5a3907a32..2f9f31601 100644 --- a/aws_lambda_builders/workflows/dotnet_clipackage/actions.py +++ b/aws_lambda_builders/workflows/dotnet_clipackage/actions.py @@ -7,7 +7,7 @@ import threading from aws_lambda_builders.actions import ActionFailedError, BaseAction, Purpose -from aws_lambda_builders.architecture import ARM64 +from aws_lambda_builders.architecture import ARM64, X86_64 from aws_lambda_builders.workflow import BuildMode from .dotnetcli import DotnetCLIExecutionError @@ -62,13 +62,35 @@ def execute(self): class RunPackageAction(BaseAction): """ A Lambda Builder Action which builds the .NET Core project using the Amazon.Lambda.Tools .NET Core Global Tool + + :param source_dir: str + Path to a folder containing the source code + + :param subprocess_dotnet: + An instance of the dotnet process wrapper + + :param artifacts_dir: str + Path to a folder where the built artifacts should be placed + + :param options: + Dictionary of options ot pass to build action + + :param mode: str + Mode the build should produce + + :param architecture: str + Architecture to build for. Default value is X86_64 which is consistent with Amazon Lambda Tools + + :param os_utils: + Optional, OS utils + """ NAME = "RunPackageAction" DESCRIPTION = "Execute the `dotnet lambda package` command." PURPOSE = Purpose.COMPILE_SOURCE - def __init__(self, source_dir, subprocess_dotnet, artifacts_dir, options, mode, architecture=None, os_utils=None): + def __init__(self, source_dir, subprocess_dotnet, artifacts_dir, options, mode, architecture=X86_64, os_utils=None): super(RunPackageAction, self).__init__() self.source_dir = source_dir self.subprocess_dotnet = subprocess_dotnet @@ -90,6 +112,9 @@ def execute(self): "package", "--output-package", zipfullpath, + # Pass function architecture to Amazon Lambda Tools. + "--function-architecture", + self.architecture, # Specify the architecture with the --runtime MSBuild parameter "--msbuild-parameters", "--runtime " + self._get_runtime(), diff --git a/tests/unit/workflows/dotnet_clipackage/test_actions.py b/tests/unit/workflows/dotnet_clipackage/test_actions.py index 34045d8cb..d4f3380c4 100644 --- a/tests/unit/workflows/dotnet_clipackage/test_actions.py +++ b/tests/unit/workflows/dotnet_clipackage/test_actions.py @@ -89,7 +89,16 @@ def test_build_package(self): zip_path = os.path.join(self.artifacts_dir, "source_dir.zip") self.subprocess_dotnet.run.assert_called_once_with( - ["lambda", "package", "--output-package", zip_path, "--msbuild-parameters", "--runtime linux-x64"], + [ + "lambda", + "package", + "--output-package", + zip_path, + "--function-architecture", + X86_64, + "--msbuild-parameters", + "--runtime linux-x64", + ], cwd="/source_dir", ) @@ -106,7 +115,16 @@ def test_build_package_x86(self): zip_path = os.path.join(self.artifacts_dir, "source_dir.zip") self.subprocess_dotnet.run.assert_called_once_with( - ["lambda", "package", "--output-package", zip_path, "--msbuild-parameters", "--runtime linux-x64"], + [ + "lambda", + "package", + "--output-package", + zip_path, + "--function-architecture", + X86_64, + "--msbuild-parameters", + "--runtime linux-x64", + ], cwd="/source_dir", ) @@ -123,7 +141,16 @@ def test_build_package_arm64(self): zip_path = os.path.join(self.artifacts_dir, "source_dir.zip") self.subprocess_dotnet.run.assert_called_once_with( - ["lambda", "package", "--output-package", zip_path, "--msbuild-parameters", "--runtime linux-arm64"], + [ + "lambda", + "package", + "--output-package", + zip_path, + "--function-architecture", + ARM64, + "--msbuild-parameters", + "--runtime linux-arm64", + ], cwd="/source_dir", ) @@ -144,6 +171,8 @@ def test_build_package_arguments(self): "package", "--output-package", zip_path, + "--function-architecture", + X86_64, "--msbuild-parameters", "--runtime linux-x64", "--framework", @@ -180,6 +209,8 @@ def test_debug_configuration_set(self): "package", "--output-package", zip_path, + "--function-architecture", + X86_64, "--msbuild-parameters", "--runtime linux-x64", "--configuration", From 4e128b2dae8d6304b26cfe2c354e1ff085c69529 Mon Sep 17 00:00:00 2001 From: Mohamed Elasmar <71043312+moelasmar@users.noreply.github.com> Date: Thu, 25 May 2023 13:55:52 -0700 Subject: [PATCH 10/10] chore: version bump to 1.32.0 (#506) --- aws_lambda_builders/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws_lambda_builders/__init__.py b/aws_lambda_builders/__init__.py index 1e8296342..7417d9161 100644 --- a/aws_lambda_builders/__init__.py +++ b/aws_lambda_builders/__init__.py @@ -4,5 +4,5 @@ # Changing version will trigger a new release! # Please make the version change as the last step of your development. -__version__ = "1.31.0" +__version__ = "1.32.0" RPC_PROTOCOL_VERSION = "0.3"