Skip to content

ci: manual workflow to turn error tracking on or off in prod (CLEAN-218) - #183

Merged
maksymhryzodub-prog merged 1 commit into
mainfrom
ci/CLEAN-218-error-tracking-rollout
Nov 11, 2026
Merged

maksymhryzodub-prog merged 1 commit into
mainfrom
ci/CLEAN-218-error-tracking-rollout

Conversation

@maksymhryzodub-prog

@maksymhryzodub-prog maksymhryzodub-prog commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Ticket: CLEAN-218. Follows #182.

#182 shipped error tracking switched off: the DSNs are kept out of the repository so the Mazda fork cannot inherit them, which left "turn it on" as a kubectl command for whoever has cluster access. This adds Ops - error tracking (prod), a workflow_dispatch workflow with one input:

  • status — looks only: which keys the cluster secret has, whether each deployment references it, which image and version it runs.
  • enable — writes the ranch-error-tracking secret from three repository secrets (API_SENTRY_DSN, ADMIN_SENTRY_DSN, APP_SENTRY_DSN), adds the optional reference to the deployments if the cluster lacks it, restarts them.
  • disable — deletes the secret and restarts.

It never prints a value, passes the DSNs to kubectl through files in a private temp dir, and refuses a value that does not look like a DSN before anything in the cluster changes.

Why it patches the deployments. The cluster runs the k8s/deploy manifests, ArgoCD does not sync, and the release workflow only restarts deployments (see the header of ops-set-user-role.yaml). So the reference merged in #182 would not have reached the cluster on its own. The patch adds exactly what the manifests declare and is a no-op once it is there.

Nothing runs on merge: the workflow is manual.

Checked locally: the YAML parses; the DSN shape check accepts two valid DSNs and refuses three invalid ones, one of them carrying a shell command; bun test scripts/sentry-twin.test.ts passes, so no DSN is in the file. Not checked: a run against the cluster, which needs the three repository secrets and is the next step.

No console is touched, so there is no twin check to make.

…EAN-218)

The DSNs are kept out of the repository so the Mazda fork cannot inherit them, which left turning reporting on as a kubectl command somebody has to type. The workflow takes the three DSNs from repository secrets, writes the ranch-error-tracking cluster secret, and restarts the three deployments; it never prints a value and refuses one that does not look like a DSN. It also adds the optional secret reference to the deployments when the cluster lacks it: the cluster runs the k8s/deploy manifests, ArgoCD does not sync, and the release workflow only restarts, so the reference merged with the feature would not have arrived on its own. status only reports; disable deletes the secret.
@maksymhryzodub-prog
maksymhryzodub-prog merged commit 2e55ed2 into main Nov 11, 2026
1 check passed
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