fix: clear error when triggering job on undeployed scheduled task#203
Merged
Conversation
ignacioboud
approved these changes
Jul 17, 2026
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.
Summary
Dedicated PR for the scheduled-task trigger fix, split out from #202 (which also carries the unrelated kill-job-execution work). No overlap with that work — this touches only trigger files.
Triggering the
Trigger jobaction on a scope with no active deployment previously produced an opaque error: with no deployment there is noCronJob, so the script rankubectl create job --from="cronjob/"(no name) and surfaced a cryptic kubectl failure.Changes
.scope.current_active_deployment— if empty/null, fail early (before anykubectlcall) with a clear "deploy the scope first" message. Also guards the empty-CronJob case with its own actionable message.set -euo pipefailadded (was missing), aligning with the repo's scope-script conventions.logfunction via workflow step —trigger-job.yamlnow has aload loggingstep importing$OVERRIDES_PATH/logging(a scheduled-task copy ofk8s/logging); the script assumeslogexists rather than sourcing it, matchingrestart-pods.yaml.include: $SERVICE_PATH/values.yamlintrigger-job.yamlsoK8S_NAMESPACE(andLOG_LEVEL) are provided, plus a script-level${K8S_NAMESPACE:-nullplatform}guard as defense-in-depth (the missing include caused anunbound variablecrash underset -u).Test plan
New
scheduled_task/scope/tests/trigger.bats— 10/10 passing:K8S_NAMESPACEunset /nullplatformfallback)values.yamlinclude present,load loggingstep present