Skip to content

Are you watching closely?

Latest

Choose a tag to compare

@github-actions github-actions released this 23 Aug 11:31
· 3 commits to master since this release

The v2 emulator is a ground-up overhaul

Breaking changes

  • The Go module path is now github.com/aertje/cloud-tasks-emulator/v2. The v1 root package is gone; embedding is done through the new emulator package and everything else lives under internal.
  • The -queue startup flag is renamed to -initial-queue.
  • Requests that production Cloud Tasks rejects are now rejected by the emulator too. Code that relied on the v1 emulator being lenient (invalid names, out-of-range queue settings, oversized tasks, malformed target URLs) will now get the same errors it would get in production.

Embed the emulator in Go tests

Import github.com/aertje/cloud-tasks-emulator/v2/emulator to run the emulator in-process, no Docker required. Options cover initial queues, OIDC issuer and signing key, and App Engine routing. See EXAMPLES.md.

Configuration

  • Every flag can equivalently be set via an environment variable, no wrapper script needed. See the configuration table.
  • New options: a user-supplied OIDC signing key (-openid-signing-key), skipping TLS verification for self-signed HTTPS targets (-insecure-skip-tls-verify), and App Engine routing (-app-engine-emulator-host to point tasks at a local server, -app-engine-region-id for the regional r.appspot.com host format).

Validated against real Cloud Tasks

  • A new conformance harness runs the same scenarios against production Cloud Tasks and records the responses as goldens; the emulator is tested against those goldens.
  • Validation at CreateQueue and CreateTask mirrors production: queue and task names, rate limits, retry configuration, dispatch deadlines, schedule horizons, HTTP target URLs and the task size limit, with matching error codes, messages and details.
  • Dispatch fidelity: production request headers (including the optional retry headers), BASIC/FULL response views, retry backoff anchored the way production anchors it, and tombstoning so deleted queue and task names behave as they do in production.