Skip to content

E2E workflow: CloudWatch through the Lambda into a fresh source - #14

Merged
PetrHeinz merged 5 commits into
mainfrom
claude/t-3853-e2e
Oct 16, 2026
Merged

PetrHeinz merged 5 commits into
mainfrom
claude/t-3853-e2e

Conversation

@PetrHeinz

@PetrHeinz PetrHeinz commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

A new E2E workflow runs the CloudWatch → Lambda → Better Stack setup from the docs in a throwaway AWS account. Pull requests and pushes to main build the ZIP from the checkout with npm run build and deploy that, so a change is tested before it is released; the daily schedule deploys the released ZIP the docs link to, which is what customers download.

What a run does:

  • reads the docs article and takes the ZIP link, runtime (Node.js 22.x → nodejs22.x), architecture and environment variable names from it, failing when the article changes in a way this test does not follow
  • creates an aws_cloudwatch source in the E2E testing team, warms it up until the ingesters accept its token, creates the Lambda with the documented settings, and subscribes a fresh log group to it the way the docs describe
  • writes 20 lines, 5 with an [ERROR] prefix, and reads them back through the team's SQL API connection: 20 rows, 5 error and 15 info, and every row compared field by field with its CloudWatch event (message with the prefix stripped, level, event timestamp as dt, and the exact context the parser builds: owner, log group, log stream, log id, Lambda name and ARN)
  • fails if the Lambda's own log group contains an error or a timeout
  • deletes the source, the Lambda and both log groups, plus leftovers of earlier runs older than two hours, and fails if it cannot list or delete something

The job summary names the release tag or commit that ran and the bundled @logtail/node version.

The account is better-stack-e2e-lambda (352333568934), a member of the Better Stack organization that holds nothing else. AWS access is GitHub OIDC through the github-actions-e2e role of a one-time stack that is already deployed in the account, together with the e2e-lambda-exec execution role. No AWS keys live in GitHub. Pull requests from forks are skipped, since they get no OIDC token.

Secrets TEST_TEAM_TELEMETRY_API, TEST_TEAM_CONNECTION_USERNAME and TEST_TEAM_CONNECTION_PASSWORD are set. The LINEAR_* secrets are set as well: a failure on main or on the schedule opens a High-priority issue in the Telemetry team's Plan state, in the Ingestion for everything project, assigned to Petr.

🤖 Generated with Claude Code

PetrHeinz and others added 2 commits October 15, 2026 18:55
Pull requests and pushes to main build the ZIP from the checkout and
deploy it into a throwaway AWS account with the runtime, architecture
and environment variables the docs article names; the daily schedule
deploys the released ZIP the docs link to. A fresh log group is
subscribed to the Lambda the way the docs describe, 20 lines are
written, and every stored row is compared with its CloudWatch event
through the team's SQL API connection. Everything is deleted
afterwards, plus leftovers older than two hours. AWS access is OIDC
through the role in e2e/bootstrap.yaml.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@PetrHeinz
PetrHeinz marked this pull request as ready for review October 15, 2026 17:02
PetrHeinz and others added 3 commits October 15, 2026 19:08
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This workflow only ever assigns Petr, so the assignee input, the Pawel and
Collectors secrets and the branch choosing between them go. The issue lands
in the Telemetry team, state Plan, project Ingestion for everything, priority
High, assigned to Petr.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The bootstrap stack is deployed once per account and already exists, so the
template does not need to live in this repository; the header still names
the standing e2e-bootstrap stack.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@PetrHeinz
PetrHeinz merged commit 55fa8fc into main Oct 16, 2026
5 checks passed
@PetrHeinz
PetrHeinz deleted the claude/t-3853-e2e branch October 16, 2026 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant