Skip to content

test: add generated example checks and e2e#6

Merged
BloggerBust merged 1 commit into
mainfrom
test/4107-generated-example-e2e
Jun 18, 2026
Merged

test: add generated example checks and e2e#6
BloggerBust merged 1 commit into
mainfrom
test/4107-generated-example-e2e

Conversation

@BloggerBust

Copy link
Copy Markdown
Collaborator

Description

This PR adds two test layers for the generated examples. It is stacked on #5.

examples-check is a fast layer that runs on every pull request. It does not start an engine, so it proves the examples compile, not that they run.

examples-e2e is the runtime layer. It installs the Hatchet CLI, starts a real local engine via Docker, and for each example starts the generated worker, triggers the workflow, and asserts the expected output.

The engine tag defaults to latest rather than a pinned version, so the e2e is not yet reproducible against a fixed engine. Pinning is deferred until a tag compatible with the examples' pinned SDKs is chosen. examples-e2e runs on pull_request for now so CI exercises it on this PR. If it proves flaky, it can move to workflow_dispatch and a schedule before merge.

Refs hatchet-dev/hatchet#4107

Type of change

  • Test changes (add, refactor, improve or change a test)

What's Changed

  • Add the examples-check workflow and hack/check-examples.sh: build and vet Go, install and typecheck TypeScript, install and byte-compile Python
  • Add the examples-e2e workflow and hack/e2e-examples.sh: start a real engine, run each generated worker, trigger its workflow, assert the expected output, then remove the workers and containers

Checklist

Changes have been:

  • Tested (unit, integration, or manually with steps specified)
  • Linted and formatted

Testing

  • Ran the e2e locally for all three examples on Node 24, with a CLI built from the sibling hatchet repo. Each started the worker, triggered the workflow, and printed its expected output. Workers and containers were cleaned up.
  • The compile-level checks pass: build and vet Go, typecheck TypeScript, byte-compile Python, plus the existing dependency sync and generation drift checks.
  • Running TypeScript surfaced a pnpm version bug. The example's pnpm-workspace.yaml uses pnpm 10 settings that pnpm 9 rejects, so both workflows now install pnpm@10, which reads the committed lockfile.
  • Not yet exercised, and first run in CI on this PR: the public CLI install script and the pull_request e2e run.

🤖 AI Disclosure
  • I acknowledge that an LLM was used in the creation of this Pull Request, in accordance with Hatchet's AI_POLICY.md.
  • Details: Claude Code wrote the initial test scaffolding.

@mrkaye97 mrkaye97 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't look through this one very closely since it's a lot of bash 😅 looks fine to me though, although I wonder if there's a way to simplify more

@BloggerBust BloggerBust force-pushed the chore/4107-dependabot branch from 37efe32 to db93c4a Compare June 17, 2026 21:36
Base automatically changed from chore/4107-dependabot to main June 18, 2026 15:07
@BloggerBust BloggerBust force-pushed the test/4107-generated-example-e2e branch from 343de03 to 6c5fb58 Compare June 18, 2026 15:07
@BloggerBust

Copy link
Copy Markdown
Collaborator Author

Hey @mrkaye97, I took another look to see if there was a way to simplify this. I think it is about as simple it can be while still keeping the checks and retries. For now, I am going to merge this as is. Thanks for the review.

@BloggerBust BloggerBust merged commit 7eb8078 into main Jun 18, 2026
3 checks passed
@BloggerBust BloggerBust deleted the test/4107-generated-example-e2e branch June 18, 2026 15:16
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.

2 participants