From de439f6ca92345a88ca4164b44b490e52209d14d Mon Sep 17 00:00:00 2001 From: Petr Heinz Date: Tue, 1 Dec 2026 18:24:29 +0100 Subject: [PATCH 1/3] Add support for the nodejs26.x runtime Run the unit tests on Node.js 26 and add a runtimes input to the E2E workflow, so a manual run can test runtimes before the docs list them. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/e2e.yml | 8 ++++++++ .github/workflows/test.yml | 2 +- README.md | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index eac766b..03d83c3 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -46,6 +46,10 @@ on: schedule: - cron: '45 5 * * *' workflow_dispatch: + inputs: + runtimes: + description: 'Node.js runtimes to test instead of the ones the article lists (e.g. nodejs24.x nodejs26.x)' + type: string permissions: id-token: write @@ -58,6 +62,7 @@ env: LAMBDA_ROLE_ARN: arn:aws:iam::352333568934:role/e2e-lambda-exec API: https://telemetry.betterstack.com DOCS_URL: https://betterstack.com/docs/logs/aws-lambda/ + RUNTIMES_OVERRIDE: ${{ inputs.runtimes }} RUN_ID: gh${{ github.run_id }}a${{ github.run_attempt }} # The article asks for Python 3.7 or higher; these are the oldest and the newest Python runtimes Lambda supports. PYTHON_RUNTIMES: python3.11 python3.14 @@ -142,6 +147,9 @@ jobs: if install == 'download' and options['--zip-file'][0].removeprefix('fileb://').removeprefix('./') != zip_name: problems.append(f"the layer publish command uploads {options['--zip-file'][0]}, the article downloads {zip_name}") + if os.environ['RUNTIMES_OVERRIDE']: + options['--compatible-runtimes'] = os.environ['RUNTIMES_OVERRIDE'].split() + # Node.js environment variables: "NAME: value" lines, values may carry the article's placeholders. environment = {} for line in node_env.splitlines(): diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5b5448f..cf2a900 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,7 +12,7 @@ jobs: strategy: fail-fast: false matrix: - node-version: [22, 24] + node-version: [22, 24, 26] steps: - name: Checkout from repository uses: actions/checkout@v4 diff --git a/README.md b/README.md index c4500f6..e087de7 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ $ curl -fsSLO https://github.com/logtail/logtail-lambda-extension/releases/lates $ aws lambda publish-layer-version \ --layer-name "logtail-lambda-extension" \ --zip-file "fileb://logtail-lambda-extension.zip" \ - --compatible-runtimes nodejs22.x nodejs24.x \ + --compatible-runtimes nodejs22.x nodejs24.x nodejs26.x \ --compatible-architectures x86_64 arm64 ``` From 7b1d3129ea94f050f44ea02a94c285b9dae052d9 Mon Sep 17 00:00:00 2001 From: Petr Heinz Date: Tue, 1 Dec 2026 18:26:42 +0100 Subject: [PATCH 2/3] [CI] Find the docs article's code blocks in its new markup Co-Authored-By: Claude Opus 5.5 --- .github/workflows/e2e.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index eac766b..0d2f1bb 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -98,7 +98,7 @@ jobs: repository = os.environ['GITHUB_REPOSITORY'] page = open('docs.html', encoding='utf-8').read() blocks = [(language, html.unescape(re.sub(r'<[^>]+>', '', code)).strip()) - for language, code in re.findall(r"
(.*?)
", page, re.S)] + for language, code in re.findall(r"
]*>(.*?)
", page, re.S)] ROLES = ['Node.js install', 'Node.js environment variables', 'Node.js logging', 'Python install', 'Python setup', 'Python logging'] LANGUAGES = ['bash', 'text', 'js', 'bash', 'python', 'python'] if [language for language, _ in blocks] != LANGUAGES: From 9b8cbcb78bc51d97f63f11fe8618bf1abaa7f466 Mon Sep 17 00:00:00 2001 From: Petr Heinz Date: Tue, 1 Dec 2026 18:36:16 +0100 Subject: [PATCH 3/3] [CI] Leave the nodejs26.x runtime's own startup line out of the E2E rows Co-Authored-By: Claude Opus 5.5 --- .github/workflows/e2e.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 22f32d0..bd1d6a2 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -537,8 +537,10 @@ jobs: sys.exit(f"::error::SQL API on {env['CONNECT_HOST']} answered HTTP {error.code}: {body[:300]}") # The collection belongs to this job's source alone, so apart from the warm-up lines every row is the function's. + # The nodejs26.x runtime itself logs one "[tls-profile] applied …" line on a cold start, which is left out too. QUERY = (f"SELECT toUnixTimestamp64Milli(dt) AS dt_ms, toUnixTimestamp64Milli(ingest_time) AS ingest_ms, raw " - f"FROM remote({env['COLLECTION']}_logs) WHERE position(raw, 'e2e warm-up run_id=') = 0 ORDER BY dt, _insert_index") + f"FROM remote({env['COLLECTION']}_logs) WHERE position(raw, 'e2e warm-up run_id=') = 0 " + f"AND position(raw, '[tls-profile] applied ') = 0 ORDER BY dt, _insert_index") last_returned = invocations[-1]['returned_at'] deadline = time.time() + int(env['READBACK_SECONDS']) while True: