repro-lambda 0.5.0__tar.gz → 0.5.1__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.
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/CHANGELOG.md +5 -0
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/PKG-INFO +1 -1
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/pyproject.toml +1 -1
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/src/repro_lambda/__init__.py +1 -1
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/src/repro_lambda/sources.py +9 -1
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/tests/test_sources.py +7 -0
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/uv.lock +1 -1
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/.github/workflows/build.yml +0 -0
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/.github/workflows/ci.yml +0 -0
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/.github/workflows/move-major-tag.yml +0 -0
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/.github/workflows/promote.yml +0 -0
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/.github/workflows/publish.yml +0 -0
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/.gitignore +0 -0
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/.pre-commit-config.yaml +0 -0
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/LICENSE +0 -0
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/README.md +0 -0
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/SETUP.md +0 -0
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/src/repro_lambda/__main__.py +0 -0
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/src/repro_lambda/build.py +0 -0
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/src/repro_lambda/catalog.py +0 -0
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/src/repro_lambda/cli.py +0 -0
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/src/repro_lambda/docker_runner.py +0 -0
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/src/repro_lambda/git_guard.py +0 -0
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/src/repro_lambda/hasher.py +0 -0
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/src/repro_lambda/manifest.py +0 -0
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/src/repro_lambda/promote.py +0 -0
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/src/repro_lambda/s3_uploader.py +0 -0
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/src/repro_lambda/source_locker.py +0 -0
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/src/repro_lambda/source_stager.py +0 -0
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/src/repro_lambda/verify.py +0 -0
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/src/repro_lambda/zip_packager.py +0 -0
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/tests/__init__.py +0 -0
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/tests/conftest.py +0 -0
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/tests/fixtures/sample_nodejs_lambda/handler/index.js +0 -0
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/tests/fixtures/sample_nodejs_lambda/handler/package-lock.json +0 -0
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/tests/fixtures/sample_nodejs_lambda/handler/package.json +0 -0
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/tests/fixtures/sample_nodejs_lambda/lambdas.toml +0 -0
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/tests/fixtures/sample_python_lambda/handler/app.py +0 -0
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/tests/fixtures/sample_python_lambda/handler/requirements.arm64.lock +0 -0
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/tests/fixtures/sample_python_lambda/handler/requirements.in +0 -0
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/tests/fixtures/sample_python_lambda/lambdas.toml +0 -0
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/tests/test_build_integration.py +0 -0
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/tests/test_build_nodejs.py +0 -0
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/tests/test_catalog.py +0 -0
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/tests/test_cli_build.py +0 -0
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/tests/test_cli_lock.py +0 -0
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/tests/test_cli_smoke.py +0 -0
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/tests/test_docker_runner.py +0 -0
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/tests/test_docker_runner_nodejs.py +0 -0
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/tests/test_e2e_nodejs_lambda.py +0 -0
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/tests/test_e2e_python_lambda.py +0 -0
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/tests/test_extra_files.py +0 -0
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/tests/test_git_guard.py +0 -0
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/tests/test_hasher.py +0 -0
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/tests/test_manifest.py +0 -0
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/tests/test_per_lambda_builder.py +0 -0
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/tests/test_promote.py +0 -0
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/tests/test_python_byte_compat_regression.py +0 -0
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/tests/test_s3_uploader.py +0 -0
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/tests/test_source_locker.py +0 -0
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/tests/test_source_stager.py +0 -0
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/tests/test_sources_hash.py +0 -0
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/tests/test_sources_schema.py +0 -0
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/tests/test_verify.py +0 -0
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/tests/test_zip_excludes.py +0 -0
- {repro_lambda-0.5.0 → repro_lambda-0.5.1}/tests/test_zip_packager.py +0 -0
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v0.5.1 - 2026-06-21
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
- Send a `User-Agent` header on every source fetch. The GitHub REST API rejects requests with no User-Agent (HTTP 403), which broke `github_release` source resolution (the asset lookup against `api.github.com`). The header is now `repro-lambda/<version>` on all requests (harmless for plain `https` sources, required for the API). Does not affect any content hash (request headers are not part of artifact identity).
|
|
7
|
+
|
|
3
8
|
## v0.5.0 - 2026-06-21
|
|
4
9
|
|
|
5
10
|
### Added
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: repro-lambda
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.1
|
|
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
|
|
@@ -36,6 +36,7 @@ from http.client import HTTPSConnection
|
|
|
36
36
|
from pathlib import Path
|
|
37
37
|
from urllib.parse import urljoin, urlsplit, urlunsplit
|
|
38
38
|
|
|
39
|
+
from repro_lambda import __version__
|
|
39
40
|
from repro_lambda.manifest import Source
|
|
40
41
|
|
|
41
42
|
# Limits (decompression-bomb + DoS bounds). Generous enough for real release artifacts.
|
|
@@ -48,6 +49,9 @@ HTTP_TIMEOUT = 60 # seconds per hop
|
|
|
48
49
|
_GITHUB_API = "https://api.github.com"
|
|
49
50
|
_JSON_MAX_BYTES = 16 * 1024 * 1024
|
|
50
51
|
_CHUNK = 64 * 1024
|
|
52
|
+
# The GitHub REST API rejects requests with no User-Agent (HTTP 403); send one on every
|
|
53
|
+
# request (harmless for the plain https sources, required for github_release resolution).
|
|
54
|
+
_USER_AGENT = f"repro-lambda/{__version__}"
|
|
51
55
|
|
|
52
56
|
|
|
53
57
|
class SourceFetchError(RuntimeError):
|
|
@@ -143,7 +147,11 @@ def _http_request(
|
|
|
143
147
|
conn.context = context
|
|
144
148
|
try:
|
|
145
149
|
target = parts.path + (f"?{parts.query}" if parts.query else "")
|
|
146
|
-
conn.request(
|
|
150
|
+
conn.request(
|
|
151
|
+
"GET",
|
|
152
|
+
target or "/",
|
|
153
|
+
headers={"User-Agent": _USER_AGENT, **req_headers, "Host": host},
|
|
154
|
+
)
|
|
147
155
|
resp = conn.getresponse()
|
|
148
156
|
if resp.status in (301, 302, 303, 307, 308):
|
|
149
157
|
location = resp.getheader("Location")
|
|
@@ -162,6 +162,13 @@ def test_authorization_kept_on_same_host_redirect(fake_https):
|
|
|
162
162
|
assert fake_https.calls[1].sent_headers["Authorization"] == "Bearer SECRET"
|
|
163
163
|
|
|
164
164
|
|
|
165
|
+
def test_user_agent_header_is_sent(fake_https):
|
|
166
|
+
# GitHub's REST API 403s requests with no User-Agent; we must always send one.
|
|
167
|
+
fake_https.responses = [_FakeResp(200, body=b"X")]
|
|
168
|
+
sources._http_request("https://api.github.com/x", {}, io.BytesIO(), 1 << 20)
|
|
169
|
+
assert fake_https.calls[0].sent_headers.get("User-Agent", "").startswith("repro-lambda/")
|
|
170
|
+
|
|
171
|
+
|
|
165
172
|
def test_non_https_refused():
|
|
166
173
|
with pytest.raises(SourceSecurityError, match="non-https"):
|
|
167
174
|
sources._http_request("http://x.example/a", {}, io.BytesIO(), 1 << 20)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{repro_lambda-0.5.0 → repro_lambda-0.5.1}/tests/fixtures/sample_nodejs_lambda/handler/index.js
RENAMED
|
File without changes
|
|
File without changes
|
{repro_lambda-0.5.0 → repro_lambda-0.5.1}/tests/fixtures/sample_nodejs_lambda/handler/package.json
RENAMED
|
File without changes
|
|
File without changes
|
{repro_lambda-0.5.0 → repro_lambda-0.5.1}/tests/fixtures/sample_python_lambda/handler/app.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|