diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index eac766b..bd1d6a2 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 @@ -98,7 +103,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: @@ -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(): @@ -529,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: 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 ```