Skip to content

Commit b4d6a42

Browse files
authored
Remove experimental flag from Rust Cargo Lambda workflow (#833)
The Rust Cargo Lambda workflow no longer requires the experimentalCargoLambda feature flag to be enabled. This promotes the workflow to a stable, generally available builder. - Remove experimental flag check from RustCargoLambdaWorkflow.__init__ - Delete feature_flag.py module - Update unit and integration tests to remove flag usage
1 parent 4fdac4b commit b4d6a42

4 files changed

Lines changed: 0 additions & 32 deletions

File tree

aws_lambda_builders/workflows/rust_cargo/feature_flag.py

Lines changed: 0 additions & 12 deletions
This file was deleted.

aws_lambda_builders/workflows/rust_cargo/workflow.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88

99
from .actions import RustCargoLambdaBuildAction, RustCopyAndRenameAction
1010
from .cargo_lambda import SubprocessCargoLambda
11-
from .exceptions import CargoLambdaExecutionException
12-
from .feature_flag import is_experimental_cargo_lambda_scope
1311

1412

1513
class RustCargoLambdaWorkflow(BaseWorkflow):
@@ -36,11 +34,6 @@ def __init__(
3634
super(RustCargoLambdaWorkflow, self).__init__(
3735
source_dir, artifacts_dir, scratch_dir, manifest_path, runtime=runtime, **kwargs
3836
)
39-
if not is_experimental_cargo_lambda_scope(self.experimental_flags):
40-
raise CargoLambdaExecutionException(
41-
message="Feature flag `experimentalCargoLambda` must be enabled to use this workflow"
42-
)
43-
4437
# we utilize the handler identifier to
4538
# select the binary to build
4639
options = kwargs.get("options") or {}

tests/integration/workflows/rust_cargo/test_rust_cargo.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
from aws_lambda_builders.builder import LambdaBuilder
88
from aws_lambda_builders.exceptions import WorkflowFailedError
9-
from aws_lambda_builders.workflows.rust_cargo.feature_flag import EXPERIMENTAL_FLAG_CARGO_LAMBDA
109

1110

1211
def rm_target(base):
@@ -43,7 +42,6 @@ def test_failed_build_project(self):
4342
os.path.join(source_dir, "Cargo.toml"),
4443
runtime=self.runtime,
4544
options={"artifact_executable_name": "fail"},
46-
experimental_flags=[EXPERIMENTAL_FLAG_CARGO_LAMBDA],
4745
)
4846
self.assertTrue(
4947
raised.exception.args[0].startswith("RustCargoLambdaBuilder:CargoLambdaBuild - Cargo Lambda failed"),
@@ -60,7 +58,6 @@ def test_builds_hello_project(self):
6058
self.scratch_dir,
6159
os.path.join(source_dir, "Cargo.toml"),
6260
runtime=self.runtime,
63-
experimental_flags=[EXPERIMENTAL_FLAG_CARGO_LAMBDA],
6461
)
6562

6663
expected_files = {"bootstrap"}
@@ -79,7 +76,6 @@ def test_builds_hello_project_with_artifact_name(self):
7976
os.path.join(source_dir, "Cargo.toml"),
8077
runtime=self.runtime,
8178
options={"artifact_executable_name": "hello"},
82-
experimental_flags=[EXPERIMENTAL_FLAG_CARGO_LAMBDA],
8379
)
8480

8581
expected_files = {"bootstrap"}
@@ -99,7 +95,6 @@ def test_builds_hello_project_for_arm64(self):
9995
architecture="arm64",
10096
runtime=self.runtime,
10197
options={"artifact_executable_name": "hello"},
102-
experimental_flags=[EXPERIMENTAL_FLAG_CARGO_LAMBDA],
10398
)
10499

105100
expected_files = {"bootstrap"}
@@ -118,7 +113,6 @@ def test_builds_workspaces_project_with_bin_name(self):
118113
os.path.join(source_dir, "Cargo.toml"),
119114
runtime=self.runtime,
120115
options={"artifact_executable_name": "foo"},
121-
experimental_flags=[EXPERIMENTAL_FLAG_CARGO_LAMBDA],
122116
)
123117

124118
expected_files = {"bootstrap"}
@@ -137,7 +131,6 @@ def test_builds_workspace_member(self):
137131
self.scratch_dir,
138132
os.path.join(source_dir, "Cargo.toml"),
139133
runtime=self.runtime,
140-
experimental_flags=[EXPERIMENTAL_FLAG_CARGO_LAMBDA],
141134
)
142135

143136
expected_files = {"bootstrap"}
@@ -157,7 +150,6 @@ def test_builds_workspaces_project_with_package_option(self):
157150
os.path.join(source_dir, "Cargo.toml"),
158151
runtime=self.runtime,
159152
options={"cargo_lambda_flags": ["--package", "foo"]},
160-
experimental_flags=[EXPERIMENTAL_FLAG_CARGO_LAMBDA],
161153
)
162154

163155
expected_files = {"bootstrap"}
@@ -176,7 +168,6 @@ def test_builds_multi_function_project_with_function_a(self):
176168
os.path.join(source_dir, "Cargo.toml"),
177169
runtime=self.runtime,
178170
options={"artifact_executable_name": "function_a"},
179-
experimental_flags=[EXPERIMENTAL_FLAG_CARGO_LAMBDA],
180171
)
181172

182173
expected_files = {"bootstrap"}
@@ -195,7 +186,6 @@ def test_builds_multi_function_project_with_function_b(self):
195186
os.path.join(source_dir, "Cargo.toml"),
196187
runtime=self.runtime,
197188
options={"artifact_executable_name": "function_b"},
198-
experimental_flags=[EXPERIMENTAL_FLAG_CARGO_LAMBDA],
199189
)
200190

201191
expected_files = {"bootstrap"}

tests/unit/workflows/rust_cargo/test_workflow.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
RustCargoLambdaBuildAction,
77
RustCopyAndRenameAction,
88
)
9-
from aws_lambda_builders.workflows.rust_cargo.feature_flag import EXPERIMENTAL_FLAG_CARGO_LAMBDA
109

1110

1211
class TestRustCargoLambdaWorkflow(TestCase):
@@ -21,7 +20,6 @@ def test_workflow_sets_up_builder_actions(self):
2120
"scratch_dir",
2221
"manifest",
2322
runtime="provided",
24-
experimental_flags=[EXPERIMENTAL_FLAG_CARGO_LAMBDA],
2523
)
2624
self.assertEqual(len(workflow.actions), 2)
2725
self.assertIsInstance(workflow.actions[0], RustCargoLambdaBuildAction)
@@ -34,7 +32,6 @@ def test_workflow_configures_path_resolver_for_cargo(self):
3432
"scratch_dir",
3533
"manifest",
3634
runtime="provided",
37-
experimental_flags=[EXPERIMENTAL_FLAG_CARGO_LAMBDA],
3835
)
3936
resolvers = workflow.get_resolvers()
4037
self.assertEqual(len(resolvers), 2)

0 commit comments

Comments
 (0)