repro-lambda 0.2.2__tar.gz → 0.2.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. {repro_lambda-0.2.2 → repro_lambda-0.2.3}/.github/workflows/build.yml +4 -4
  2. {repro_lambda-0.2.2 → repro_lambda-0.2.3}/CHANGELOG.md +8 -0
  3. {repro_lambda-0.2.2 → repro_lambda-0.2.3}/PKG-INFO +1 -1
  4. {repro_lambda-0.2.2 → repro_lambda-0.2.3}/pyproject.toml +1 -1
  5. {repro_lambda-0.2.2 → repro_lambda-0.2.3}/src/repro_lambda/__init__.py +1 -1
  6. {repro_lambda-0.2.2 → repro_lambda-0.2.3}/src/repro_lambda/cli.py +12 -0
  7. {repro_lambda-0.2.2 → repro_lambda-0.2.3}/src/repro_lambda/docker_runner.py +1 -1
  8. {repro_lambda-0.2.2 → repro_lambda-0.2.3}/tests/test_cli_build.py +20 -0
  9. {repro_lambda-0.2.2 → repro_lambda-0.2.3}/tests/test_cli_smoke.py +2 -1
  10. {repro_lambda-0.2.2 → repro_lambda-0.2.3}/uv.lock +1 -1
  11. {repro_lambda-0.2.2 → repro_lambda-0.2.3}/.github/workflows/ci.yml +0 -0
  12. {repro_lambda-0.2.2 → repro_lambda-0.2.3}/.github/workflows/publish.yml +0 -0
  13. {repro_lambda-0.2.2 → repro_lambda-0.2.3}/.gitignore +0 -0
  14. {repro_lambda-0.2.2 → repro_lambda-0.2.3}/.pre-commit-config.yaml +0 -0
  15. {repro_lambda-0.2.2 → repro_lambda-0.2.3}/LICENSE +0 -0
  16. {repro_lambda-0.2.2 → repro_lambda-0.2.3}/README.md +0 -0
  17. {repro_lambda-0.2.2 → repro_lambda-0.2.3}/SETUP.md +0 -0
  18. {repro_lambda-0.2.2 → repro_lambda-0.2.3}/src/repro_lambda/__main__.py +0 -0
  19. {repro_lambda-0.2.2 → repro_lambda-0.2.3}/src/repro_lambda/build.py +0 -0
  20. {repro_lambda-0.2.2 → repro_lambda-0.2.3}/src/repro_lambda/catalog.py +0 -0
  21. {repro_lambda-0.2.2 → repro_lambda-0.2.3}/src/repro_lambda/git_guard.py +0 -0
  22. {repro_lambda-0.2.2 → repro_lambda-0.2.3}/src/repro_lambda/hasher.py +0 -0
  23. {repro_lambda-0.2.2 → repro_lambda-0.2.3}/src/repro_lambda/manifest.py +0 -0
  24. {repro_lambda-0.2.2 → repro_lambda-0.2.3}/src/repro_lambda/s3_uploader.py +0 -0
  25. {repro_lambda-0.2.2 → repro_lambda-0.2.3}/src/repro_lambda/source_stager.py +0 -0
  26. {repro_lambda-0.2.2 → repro_lambda-0.2.3}/src/repro_lambda/verify.py +0 -0
  27. {repro_lambda-0.2.2 → repro_lambda-0.2.3}/src/repro_lambda/zip_packager.py +0 -0
  28. {repro_lambda-0.2.2 → repro_lambda-0.2.3}/tests/__init__.py +0 -0
  29. {repro_lambda-0.2.2 → repro_lambda-0.2.3}/tests/conftest.py +0 -0
  30. {repro_lambda-0.2.2 → repro_lambda-0.2.3}/tests/fixtures/sample_nodejs_lambda/handler/index.js +0 -0
  31. {repro_lambda-0.2.2 → repro_lambda-0.2.3}/tests/fixtures/sample_nodejs_lambda/handler/package-lock.json +0 -0
  32. {repro_lambda-0.2.2 → repro_lambda-0.2.3}/tests/fixtures/sample_nodejs_lambda/handler/package.json +0 -0
  33. {repro_lambda-0.2.2 → repro_lambda-0.2.3}/tests/fixtures/sample_nodejs_lambda/lambdas.toml +0 -0
  34. {repro_lambda-0.2.2 → repro_lambda-0.2.3}/tests/fixtures/sample_python_lambda/handler/app.py +0 -0
  35. {repro_lambda-0.2.2 → repro_lambda-0.2.3}/tests/fixtures/sample_python_lambda/handler/requirements.arm64.lock +0 -0
  36. {repro_lambda-0.2.2 → repro_lambda-0.2.3}/tests/fixtures/sample_python_lambda/handler/requirements.in +0 -0
  37. {repro_lambda-0.2.2 → repro_lambda-0.2.3}/tests/fixtures/sample_python_lambda/lambdas.toml +0 -0
  38. {repro_lambda-0.2.2 → repro_lambda-0.2.3}/tests/test_build_integration.py +0 -0
  39. {repro_lambda-0.2.2 → repro_lambda-0.2.3}/tests/test_build_nodejs.py +0 -0
  40. {repro_lambda-0.2.2 → repro_lambda-0.2.3}/tests/test_catalog.py +0 -0
  41. {repro_lambda-0.2.2 → repro_lambda-0.2.3}/tests/test_cli_lock.py +0 -0
  42. {repro_lambda-0.2.2 → repro_lambda-0.2.3}/tests/test_docker_runner.py +0 -0
  43. {repro_lambda-0.2.2 → repro_lambda-0.2.3}/tests/test_docker_runner_nodejs.py +0 -0
  44. {repro_lambda-0.2.2 → repro_lambda-0.2.3}/tests/test_e2e_nodejs_lambda.py +0 -0
  45. {repro_lambda-0.2.2 → repro_lambda-0.2.3}/tests/test_e2e_python_lambda.py +0 -0
  46. {repro_lambda-0.2.2 → repro_lambda-0.2.3}/tests/test_git_guard.py +0 -0
  47. {repro_lambda-0.2.2 → repro_lambda-0.2.3}/tests/test_hasher.py +0 -0
  48. {repro_lambda-0.2.2 → repro_lambda-0.2.3}/tests/test_manifest.py +0 -0
  49. {repro_lambda-0.2.2 → repro_lambda-0.2.3}/tests/test_python_byte_compat_regression.py +0 -0
  50. {repro_lambda-0.2.2 → repro_lambda-0.2.3}/tests/test_s3_uploader.py +0 -0
  51. {repro_lambda-0.2.2 → repro_lambda-0.2.3}/tests/test_source_stager.py +0 -0
  52. {repro_lambda-0.2.2 → repro_lambda-0.2.3}/tests/test_verify.py +0 -0
  53. {repro_lambda-0.2.2 → repro_lambda-0.2.3}/tests/test_zip_packager.py +0 -0
@@ -9,7 +9,7 @@ on:
9
9
  description: Path to lambdas.toml in the caller repo.
10
10
  repro_lambda_version:
11
11
  type: string
12
- default: "0.2.2"
12
+ default: "0.2.3"
13
13
  description: Pinned repro-lambda PyPI version.
14
14
  aws-dev-role-arn:
15
15
  type: string
@@ -77,11 +77,11 @@ jobs:
77
77
  - name: Build (dev bucket)
78
78
  env:
79
79
  REPRO_LAMBDA_BUCKET: ${{ inputs.dev-bucket }}
80
- run: uvx --from "repro-lambda==${{ inputs.repro_lambda_version }}" repro-lambda build --manifest "${{ inputs.manifest_path }}"
80
+ run: uvx --from "repro-lambda==${{ inputs.repro_lambda_version }}" repro-lambda build --manifest "${{ inputs.manifest_path }}" --arch "${{ matrix.arch }}"
81
81
 
82
82
  - name: Verify reproducible (PR only)
83
83
  if: github.event_name == 'pull_request'
84
- run: uvx --from "repro-lambda==${{ inputs.repro_lambda_version }}" repro-lambda build --manifest "${{ inputs.manifest_path }}" --verify --dry-run
84
+ run: uvx --from "repro-lambda==${{ inputs.repro_lambda_version }}" repro-lambda build --manifest "${{ inputs.manifest_path }}" --arch "${{ matrix.arch }}" --verify --dry-run
85
85
 
86
86
  - name: Configure AWS credentials (prod)
87
87
  if: github.ref == 'refs/heads/master' && inputs.aws-prod-role-arn != ''
@@ -94,7 +94,7 @@ jobs:
94
94
  if: github.ref == 'refs/heads/master' && inputs.aws-prod-role-arn != ''
95
95
  env:
96
96
  REPRO_LAMBDA_BUCKET: ${{ inputs.prod-bucket }}
97
- run: uvx --from "repro-lambda==${{ inputs.repro_lambda_version }}" repro-lambda build --manifest "${{ inputs.manifest_path }}"
97
+ run: uvx --from "repro-lambda==${{ inputs.repro_lambda_version }}" repro-lambda build --manifest "${{ inputs.manifest_path }}" --arch "${{ matrix.arch }}"
98
98
 
99
99
  - name: Commit catalog drift (master only, dev bot)
100
100
  if: github.ref == 'refs/heads/master'
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## v0.2.3 - 2026-06-20
4
+
5
+ ### Fixed
6
+ - Python build container staged dependencies under `/build` (root-owned), which failed with `mkdir: Permission denied` when the container runs as a non-root `--user` (e.g. GitHub-hosted runners, uid 1001). Staging moved to `/tmp/build` (world-writable).
7
+
8
+ ### Added
9
+ - `build --arch <arm64|x86_64>` filters the manifest to lambdas of that arch, so a per-arch CI matrix builds each arch natively on its own runner. This avoids cross-arch `docker run` (which fails without emulation, and emulated builds would break byte-reproducibility). The reusable `build.yml` passes `--arch ${{ matrix.arch }}`.
10
+
3
11
  ## v0.2.2 - 2026-06-20
4
12
 
5
13
  ### Changed
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: repro-lambda
3
- Version: 0.2.2
3
+ Version: 0.2.3
4
4
  Summary: Build reproducible AWS Lambda packages outside Terraform, optimized for terraform-aws-lambda by serverless.tf.
5
5
  Project-URL: Homepage, https://github.com/antonbabenko/repro-lambda
6
6
  Project-URL: Repository, https://github.com/antonbabenko/repro-lambda
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "repro-lambda"
3
- version = "0.2.2"
3
+ version = "0.2.3"
4
4
  description = "Build reproducible AWS Lambda packages outside Terraform, optimized for terraform-aws-lambda by serverless.tf."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
@@ -1,3 +1,3 @@
1
1
  """repro-lambda — reproducible AWS Lambda packaging outside Terraform."""
2
2
 
3
- __version__ = "0.2.2"
3
+ __version__ = "0.2.3"
@@ -63,6 +63,12 @@ def build(
63
63
  verify: Annotated[bool, typer.Option("--verify")] = False,
64
64
  dry_run: Annotated[bool, typer.Option("--dry-run")] = False,
65
65
  allow_dirty: Annotated[bool, typer.Option("--allow-dirty")] = False,
66
+ arch: Annotated[
67
+ str,
68
+ typer.Option(
69
+ "--arch", help="Only build lambdas with this arch (e.g. arm64, x86_64). Empty = all."
70
+ ),
71
+ ] = "",
66
72
  ) -> None:
67
73
  """Build one lambda (or all) per manifest and upload to S3."""
68
74
  import json
@@ -84,6 +90,12 @@ def build(
84
90
  typer.echo(f"no lambda named {target!r} in {manifest}", err=True)
85
91
  raise typer.Exit(2)
86
92
 
93
+ if arch:
94
+ selected = [s for s in selected if s.arch == arch]
95
+ if not selected:
96
+ typer.echo(f"no lambdas with arch {arch!r} in {manifest}; nothing to build")
97
+ raise typer.Exit(0)
98
+
87
99
  if not dry_run and not bucket:
88
100
  typer.echo(
89
101
  "--bucket or REPRO_LAMBDA_BUCKET env var is required for non-dry-run",
@@ -37,7 +37,7 @@ class DockerRunError(RuntimeError):
37
37
 
38
38
  _PYTHON_INSTALL_SCRIPT = r"""
39
39
  set -euxo pipefail
40
- PKG=/build/pkg
40
+ PKG=/tmp/build/pkg
41
41
  mkdir -p "$PKG"
42
42
  cp -R /src/source/. "$PKG/"
43
43
 
@@ -109,3 +109,23 @@ def test_cli_build_allow_dirty_bypasses_guard(consumer_repo: Path, mocker):
109
109
  ],
110
110
  )
111
111
  assert result.exit_code == 0, result.stdout
112
+
113
+
114
+ def test_cli_build_arch_filter_skips_nonmatching(consumer_repo: Path, mocker):
115
+ mock_docker = mocker.patch("repro_lambda.build.build_python_lambda")
116
+ result = runner.invoke(
117
+ app,
118
+ [
119
+ "build",
120
+ "app",
121
+ "--manifest",
122
+ str(consumer_repo / "lambdas.toml"),
123
+ "--arch",
124
+ "x86_64",
125
+ "--dry-run",
126
+ ],
127
+ )
128
+ # consumer_repo's only lambda 'app' is arm64; an x86_64 filter -> nothing to build.
129
+ assert result.exit_code == 0, result.stdout
130
+ assert "nothing to build" in result.stdout
131
+ mock_docker.assert_not_called()
@@ -1,5 +1,6 @@
1
1
  from typer.testing import CliRunner
2
2
 
3
+ from repro_lambda import __version__
3
4
  from repro_lambda.cli import app
4
5
 
5
6
  runner = CliRunner()
@@ -8,7 +9,7 @@ runner = CliRunner()
8
9
  def test_cli_version_shows_package_version():
9
10
  result = runner.invoke(app, ["--version"])
10
11
  assert result.exit_code == 0
11
- assert "0.2.1" in result.stdout
12
+ assert __version__ in result.stdout
12
13
 
13
14
 
14
15
  def test_cli_build_subcommand_exists():
@@ -646,7 +646,7 @@ wheels = [
646
646
 
647
647
  [[package]]
648
648
  name = "repro-lambda"
649
- version = "0.2.2"
649
+ version = "0.2.3"
650
650
  source = { editable = "." }
651
651
  dependencies = [
652
652
  { name = "boto3" },
File without changes
File without changes
File without changes
File without changes