fix(k8s): register the update-scope action so scope edits run the update workflow - #239
Open
pablovilas wants to merge 1 commit into
Open
fix(k8s): register the update-scope action so scope edits run the update workflow#239pablovilas wants to merge 1 commit into
pablovilas wants to merge 1 commit into
Conversation
…ate workflow The k8s provider ships scope/workflows/update.yaml (create minus domain generation, traced as "Update scope" / job k8s-scope-update) and the entrypoint routes an action of type `update` to it, but specs/actions never declared one. The orchestrator treats update as optional: with no action of type `update` on the service it marks the scope active at once, so an edit never reached the cluster and the dashboard had nothing to show for it.
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.
What
Editing a k8s scope did nothing on the cluster. The provider ships
k8s/scope/workflows/update.yaml(the create workflow minus domain generation, traced as Update scope / jobk8s-scope-update) andservice/scope/entrypointroutes an action of typeupdateto it — butk8s/specs/actions/never declared such an action, andavailable_actionsin the service spec did not list it.The orchestrator treats update as an optional action (
OPTIONAL_ACTIONSinmain-scope-workflow-manager/services/custom/custom_scope_service.js): finding no action of typeupdateon the service it adds an INFO message to the scope and moves it straight toactive. So an edit was "done" immediately, the cluster kept the old ingress/IAM/DNS, and the scope page had no operation to show — while the 1.16.0 changelog promises step-by-step progress "when a scope is created, updated or deleted".How
k8s/specs/actions/update-scope.json.tpl— same shape ascreate-scope,type: "update",retryable: false, parameters{ scope_id }(what the orchestrator sends:triggerAction(service.id, spec.id, { scope_id })).k8s/specs/service-spec.json.tpl—update-scopeadded toavailable_actions.[Unreleased], user-facing, with the one-time registration for existing providers).Nothing else changes:
./configureregisters everyspecs/actions/*.tpl, and the orchestrator already handles theUPDATINGcycle for a repeatable update action (it always triggers a fresh action and moves the scope toactivewhen it succeeds).Rollout
./configurepicks the action up.Please validate before releasing
This enables a code path that has never run against a real cluster from the platform: the update workflow exists and is unit-tested (
service/scope/tests/entrypoint.batscovers theupdate-scoperouting), but no service has ever had the action to trigger it. Register it on a stage provider first and edit a throwaway scope: expect the IAM role / service account / ingress / DNS steps to re-apply idempotently and the scope page to show Update scope with its steps.Same gap, not touched here:
scheduled_taskalso ships ascope/workflows/update.yamloverride and has noupdate-scopespec either.Tests
bats service/scope/tests/entrypoint.bats— 7 passing. Both templates render to valid JSON (jq) withtype: update/update-scopelisted.