Skip to content

Commit 2ea3c97

Browse files
authored
Merge branch 'develop' into tmp-disallow-relative-imports
2 parents a5954fb + 841aeb9 commit 2ea3c97

26 files changed

Lines changed: 1103 additions & 451 deletions

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ jobs:
6868
- uses: actions/setup-python@v6
6969
with:
7070
python-version: ${{ matrix.python }}
71+
- uses: astral-sh/setup-uv@v7
7172
- run: test -f "./.github/ISSUE_TEMPLATE/Bug_report.md" # prevent Bug_report.md from being renamed or deleted
7273
- run: make pr
7374

.github/workflows/integration-tests.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ jobs:
105105
fi
106106
107107
- name: Configure AWS credentials via OIDC
108-
uses: aws-actions/configure-aws-credentials@v5
108+
uses: aws-actions/configure-aws-credentials@v6
109109
with:
110110
role-to-assume: ${{ secrets.OIDC_ROLE_ARN }}
111111
aws-region: us-east-1
@@ -121,6 +121,9 @@ jobs:
121121
3.13
122122
3.14
123123
124+
- name: Install uv
125+
uses: astral-sh/setup-uv@v7
126+
124127
- name: Set up Node.js
125128
if: contains(fromJSON('["build-integ", "build-integ-java-python-provided", "build-integ-dotnet-node-ruby", "build-integ-arm64"]'), matrix.test_suite) && matrix.container_runtime == 'no-container'
126129
uses: actions/setup-node@v6

.github/workflows/notify-slack.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,11 @@ jobs:
1212
permissions:
1313
contents: read
1414
steps:
15+
- name: Wait for label to be applied
16+
run: sleep 10s
17+
shell: bash
1518
- name: Send External PR Notification
16-
if: github.event_name == 'pull_request' && github.event.label.name == 'pr/external'
19+
if: github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'pr/external')
1720
uses: rtCamp/action-slack-notify@e31e87e03dd19038e411e38ae27cbad084a90661 # v2
1821
env:
1922
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}

requirements/base.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ click==8.1.8
33
Flask<3.2
44
boto3[crt]==1.42.26
55
jmespath~=1.0.1
6-
ruamel_yaml~=0.18.16
6+
ruamel_yaml~=0.19.1
77
PyYAML~=6.0
88
cookiecutter~=2.6.0
99
aws-sam-translator==1.107.0

requirements/reproducible-linux.txt

Lines changed: 59 additions & 127 deletions
Large diffs are not rendered by default.

requirements/reproducible-mac.txt

Lines changed: 59 additions & 127 deletions
Large diffs are not rendered by default.

requirements/reproducible-win.txt

Lines changed: 59 additions & 127 deletions
Large diffs are not rendered by default.

samcli/cli/main.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,11 @@ def cli(ctx):
134134
import atexit
135135

136136
from samcli.lib.telemetry.metric import emit_all_metrics, send_installed_metric
137+
from samcli.lib.utils.subprocess_utils import isolate_library_paths_for_subprocess
138+
139+
# When running from PyInstaller bundle, isolate library paths so external processes
140+
# (npm, node, pip, etc.) use system libraries instead of bundled ones
141+
isolate_library_paths_for_subprocess()
137142

138143
# if development version of SAM CLI is used, attach module proxy
139144
# to catch missing configuration for dynamic/hidden imports

samcli/commands/_utils/experimental.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ class ExperimentalFlag:
5555
)
5656
}
5757
RustCargoLambda = ExperimentalEntry("experimentalCargoLambda", EXPERIMENTAL_ENV_VAR_PREFIX + "RUST_CARGO_LAMBDA")
58+
UvPackageManager = ExperimentalEntry(
59+
"experimentalUvPackageManager", EXPERIMENTAL_ENV_VAR_PREFIX + "UV_PACKAGE_MANAGER"
60+
)
5861

5962

6063
def is_experimental_enabled(config_entry: ExperimentalEntry) -> bool:

samcli/commands/build/build_context.py

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ def run(self) -> None:
281281
)
282282

283283
self._check_exclude_warning()
284-
self._check_rust_cargo_experimental_flag()
284+
self._check_build_method_experimental_flag()
285285

286286
for f in self.get_resources_to_build().functions:
287287
EventTracker.track_event(EventName.BUILD_FUNCTION_RUNTIME.value, f.runtime)
@@ -696,24 +696,26 @@ def _check_exclude_warning(self) -> None:
696696
if self._resource_identifier in excludes:
697697
LOG.warning(self._EXCLUDE_WARNING_MESSAGE)
698698

699-
def _check_rust_cargo_experimental_flag(self) -> None:
699+
def _check_build_method_experimental_flag(self) -> None:
700700
"""
701701
Prints warning message and confirms if user wants to use beta feature
702702
"""
703-
WARNING_MESSAGE = (
704-
'Build method "rust-cargolambda" is a beta feature.\n'
705-
"Please confirm if you would like to proceed\n"
706-
'You can also enable this beta feature with "sam build --beta-features".'
707-
)
703+
EXPERIMENTAL_BUILD_METHODS = {
704+
"rust-cargolambda": ExperimentalFlag.RustCargoLambda,
705+
"python-uv": ExperimentalFlag.UvPackageManager,
706+
}
707+
708708
resources_to_build = self.get_resources_to_build()
709-
is_building_rust = False
710709
for function in resources_to_build.functions:
711-
if function.metadata and function.metadata.get("BuildMethod", "") == "rust-cargolambda":
712-
is_building_rust = True
713-
break
710+
if function.metadata and function.metadata.get("BuildMethod", "") in EXPERIMENTAL_BUILD_METHODS:
711+
build_method = function.metadata.get("BuildMethod", "")
712+
WARNING_MESSAGE = (
713+
f'Build method "{build_method}" is a beta feature.\n'
714+
"Please confirm if you would like to proceed\n"
715+
'You can also enable this beta feature with "sam build --beta-features".'
716+
)
714717

715-
if is_building_rust:
716-
prompt_experimental(ExperimentalFlag.RustCargoLambda, WARNING_MESSAGE)
718+
prompt_experimental(EXPERIMENTAL_BUILD_METHODS[build_method], WARNING_MESSAGE)
717719

718720
@property
719721
def build_in_source(self) -> Optional[bool]:

0 commit comments

Comments
 (0)