Skip to content

feat(config): reject an owner-prefixed deployment.name and add --validate-config - #49

Merged
lucataco merged 1 commit into
mainfrom
lcatacora/validate-deployment-name
Nov 5, 2026
Merged

lucataco merged 1 commit into
mainfrom
lcatacora/validate-deployment-name

Conversation

@lucataco

@lucataco lucataco commented Nov 5, 2026

Copy link
Copy Markdown
Member

Why

Three configs set deployment.name: replicate/<name> together with deployment.owner: replicate. cog-safe-push then builds replicate/replicate/<name>, which 404s at the Push step of full deploys only. One of them failed every full deploy for months without anyone noticing.

Reject the config when it loads, and let CI validate configs without pushing.

What changed

  • DeploymentConfig.name now rejects a value that contains /. The error tells you which deployment.owner and deployment.name to set. It does not strip the prefix.
  • New --validate-config flag. It loads the config, applies CLI overrides, prints one OK line, and exits 0. An invalid config exits 1 with the error.
  • README documents the flag and the name rule.

Scope

  • Covers deployment.name only. Other config fields are unchanged.
  • --validate-config needs no REPLICATE_API_TOKEN, cog, or network.
  • Fixing the affected configs happens in their own repos.

Blast Radius

CI installs cog-safe-push from git main. After merge, any config with an owner-prefixed name fails at load on its next deploy. Known affected configs: replicate/cog-bytedance-proxy seedance-1.5-pro.yaml, replicate/cog-clarity-proxy crystal-video-upscaler.yaml and philz1337x-crystal-upscaler.yaml. Those deploys already fail today at Push, and fix PRs are being opened separately.

Verification

  • script/unit-test: 141 passed. script/lint: ruff and pyright clean.
  • New tests cover a rejected owner-prefixed name, an accepted plain name, and --validate-config exit codes with no token and sockets blocked.
  • Ran --validate-config on every models/*/cog-safe-push-configs/*.yaml. Only seedance-1.5-pro.yaml fails on the new rule. seedance-1-pro.yaml passes.

…date-config

A name such as replicate/foo made the deployment path replicate/replicate/foo, which 404s at the Push step.
@lucataco
lucataco force-pushed the lcatacora/validate-deployment-name branch from 0d20458 to a5e5d59 Compare November 5, 2026 18:56
@lucataco
lucataco merged commit c923949 into main Nov 5, 2026
4 checks passed
@lucataco
lucataco deleted the lcatacora/validate-deployment-name branch November 5, 2026 19:14
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