Skip to content

chore(ci): build a dedicated experiments recalculation worker image#67261

Merged
rodrigoi merged 1 commit into
masterfrom
experiments/recalculation-workflow-container-image
Jul 3, 2026
Merged

chore(ci): build a dedicated experiments recalculation worker image#67261
rodrigoi merged 1 commit into
masterfrom
experiments/recalculation-workflow-container-image

Conversation

@rodrigoi

@rodrigoi rodrigoi commented Jul 1, 2026

Copy link
Copy Markdown
Member

Problem

The stacked PR routes experiment metrics recalculation to a dedicated experiments-recalculation-task-queue served by its own worker. That worker needs its image state kept current in PostHog/charts, but the CD pipeline has no dispatch for it, so its deploy state would never advance past the seeded value.

Changes

Wires the new temporal-worker-experiments-recalculation release into the container-images CD pipeline. There is no new image build; every temporal worker shares the posthog-cloud image, and each worker just gets a repository-dispatch to PostHog/charts that writes the freshly built digest into its own release state.

Adds a change-detection step scoped to the recalc worker's paths and a matching dispatch for its release. The recalc temporal path moves off the general-purpose worker's change filter, since recalc no longer runs on that worker.

  • .github/workflows/container-images-cd.yml

Rollback

Revert this PR. The worker keeps running on whatever image its charts state already points at; only automatic image tracking for this release stops.

Deploy order

Stacked on top of the queue-routing PR. Order within the stack does not matter for correctness: until the dedicated worker exists in charts, this dispatch simply updates a release nothing consumes yet. It becomes load-bearing once the charts worker is live.

How did you test this code?

Agent-run: validated that the workflow YAML parses and that the new change-detection step, its if gate, and the release dispatch are consistent. CI exercises the dispatch on merge.

python3 -c "import yaml; yaml.safe_load(open('.github/workflows/container-images-cd.yml'))"

cat-type-small

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

Docs update

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

Model: Opus 4.8
Manually refactored: no

Skills used:

  • /writing-pull-requests (local)

Relevant decisions:

  • Cloned the existing single-worker dispatch pattern (change-detection step, if gate, repository-dispatch with a per-release name) rather than introducing a new image build, since all temporal workers share the posthog-cloud image and differ only by dispatched release.
  • Removed products/experiments/backend/temporal/ from the general-purpose worker's change filter; recalc was the only general-registered code under that path, so leaving it would rebuild the general image on every recalc change for no reason.

rodrigoi commented Jul 1, 2026

Copy link
Copy Markdown
Member Author

@greptile-apps

greptile-apps Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "chore(experiments): update container ima..." | Re-trigger Greptile

@rodrigoi rodrigoi added the skip-agent-review Save $$$, skip auto agent reviews (Greptile) — use for trivial or chore PRs label Jul 1, 2026
@rodrigoi rodrigoi changed the title chore(experiments): update container images workflow to build the experiments temporal worker` chore(ci): build a dedicated experiments recalculation worker image Jul 1, 2026
@rodrigoi rodrigoi force-pushed the experiments/recalculation-workflow-container-image branch from 979b719 to d2df627 Compare July 1, 2026 17:46
@rodrigoi rodrigoi force-pushed the experiments/recalculation-workflow-experiments-tasks-queue branch from 305b12a to 9d166a7 Compare July 1, 2026 17:48
@rodrigoi rodrigoi force-pushed the experiments/recalculation-workflow-container-image branch from d2df627 to 792af5f Compare July 1, 2026 17:48
@rodrigoi rodrigoi marked this pull request as ready for review July 2, 2026 21:55
@assign-reviewers-posthog assign-reviewers-posthog Bot requested a review from a team July 2, 2026 21:55
@greptile-apps

greptile-apps Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Reviews (2): Last reviewed commit: "chore(experiments): update container ima..." | Re-trigger Greptile

@rodrigoi rodrigoi requested a review from a team July 2, 2026 21:57
@rodrigoi rodrigoi force-pushed the experiments/recalculation-workflow-experiments-tasks-queue branch from 9d166a7 to a2a9cf2 Compare July 2, 2026 22:30
@rodrigoi rodrigoi force-pushed the experiments/recalculation-workflow-container-image branch from 792af5f to 4853846 Compare July 2, 2026 22:30
Base automatically changed from experiments/recalculation-workflow-experiments-tasks-queue to master July 3, 2026 16:25
@rodrigoi rodrigoi force-pushed the experiments/recalculation-workflow-container-image branch from 4853846 to 75c577f Compare July 3, 2026 16:39
@rodrigoi rodrigoi merged commit 33d5ff0 into master Jul 3, 2026
176 checks passed
@rodrigoi rodrigoi deleted the experiments/recalculation-workflow-container-image branch July 3, 2026 16:54
@deployment-status-posthog

deployment-status-posthog Bot commented Jul 3, 2026

Copy link
Copy Markdown

Deploy status

Environment Status Deployed At Workflow
dev ✅ Deployed 2026-07-03 17:20 UTC Run
prod-us ✅ Deployed 2026-07-03 17:35 UTC Run
prod-eu ✅ Deployed 2026-07-03 17:36 UTC Run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-agent-review Save $$$, skip auto agent reviews (Greptile) — use for trivial or chore PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants