Repository navigation
ci: manual workflow to turn error tracking on or off in prod (CLEAN-218) - #183
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
kubectlcommand for whoever has cluster access. This adds Ops - error tracking (prod), aworkflow_dispatchworkflow 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 theranch-error-trackingsecret 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
kubectlthrough 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/deploymanifests, ArgoCD does not sync, and the release workflow only restarts deployments (see the header ofops-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.tspasses, 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.