Skip to content

fix: deploy.sh updates an existing scheduled scan (--update-headers) - #23

Merged
prateekgsingh merged 1 commit into
mainfrom
fix/deploy-scheduler-update-headers
Nov 20, 2026
Merged

prateekgsingh merged 1 commit into
mainfrom
fix/deploy-scheduler-update-headers

Conversation

@prateekgsingh

Copy link
Copy Markdown
Collaborator

What

`gcloud scheduler jobs update http` has no `--headers` — its name there is `--update-headers`. `tools/deploy.sh` used the `create` spelling for both verbs, so the second run of a deployment with `SCHEDULES` (the documented upgrade: the same command again) stopped at step 7:

```
ERROR: (gcloud.scheduler.jobs.update.http) unrecognized arguments: --headers=Content-Type=application/json (did you mean '--clear-headers'?)
```

Present since the schedules of v17; met on the rc.2 finalize of the reference deployment, the first run there that carried `SCHEDULES`. The services were already deployed when it stopped and the jobs kept their earlier definition, so nothing was half-done.

Fix

  • The verb and the flag are chosen together: `create` → `--headers`, `update` → `--update-headers`; every other flag is the same for both (checked against `gcloud scheduler jobs update http --help`, SDK 594).
  • The fixed update command was run by hand against the two existing jobs with their current values: accepted, job definition unchanged.
  • Test `test_the_scheduler_job_update_spells_the_headers_flag_as_update_takes_it` holds the verb and the flag together and checks the command carries the variable.
  • Release notes: a Fixed entry in the top section (ships with v20.0.0).

Suite: 1,348 passed + 1 skipped.

`gcloud scheduler jobs update http` has no `--headers`; its name there is
`--update-headers`. The script used the `create` spelling for both verbs, so
the second run of a deployment with SCHEDULES — the documented upgrade, the
same command again — stopped at step 7 with `unrecognized arguments`. Present
since the schedules of v17; met on the rc.2 finalize, the first deployment of
the reference installation that carried SCHEDULES. The services were already
deployed when it stopped and the jobs kept their earlier definition, so nothing
was half-done.

The verb and the flag are now chosen together; a test holds them together and
the command carries the variable. The fixed update command was run against the
existing jobs: accepted, definition unchanged.
@prateekgsingh
prateekgsingh merged commit 3ea1db5 into main Nov 20, 2026
14 checks passed
@prateekgsingh
prateekgsingh deleted the fix/deploy-scheduler-update-headers branch November 20, 2026 04:52
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