Repository navigation
feat: add --force to cf deploy for CI conflict overrides - #163
Conversation
commit: |
|
| mean | stddev | min | max | |
|---|---|---|---|---|
| PR | 174.8 ms | 3.1 ms | 169.5 ms | 180.7 ms |
| base | 180.0 ms | 8.7 ms | 171.2 ms | 211.4 ms |
Δ (PR vs base): ↓ -5.2 ms (-2.9%)
Measured with hyperfine on ubuntu-latest (3 warmup runs, 20 timed runs). CI numbers carry ±a few ms of runner jitter; treat small deltas as noise.
|
🤖 I've done a thorough review of your PR. Adds
|
|
🤖 I've done a thorough review of your PR. Adds
|
|
🤖 I've done a thorough review of your PR. Adds
|
7eae8ac to
67e9976
Compare
|
No new concerns since the last review |
67e9976 to
7dda200
Compare
|
No new concerns since the last review |
7dda200 to
c616bc5
Compare
|
No new concerns since the last review |
c616bc5 to
0d833f8
Compare
|
LGTM |
0d833f8 to
b3ea652
Compare
|
LGTM |
There was a problem hiding this comment.
Superseded by the review of
1d1c4ca5.
This review, of b3ea6520
💬 Approved with comments — The --force flag is wired in correctly and covered by tests. There are only two INFO notes: abort detection reads process.exitCode, and deploy-helpers comes from a commit-pinned preview build.
Findings: 2 info (2 are inline comments on the diff)
The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.
🔒 Security: 💬 1 info
Low risk. --force is an explicit opt-in that prints a warning. A production dependency now comes from a preview build.
Recommendation: 💬 Optional Nits
- [INFO] The production dependency
@cloudflare/deploy-helpersnow comes from a commit-pinned pkg.pr.new preview build instead of the npm registry. (packages/cli/package.json:87)
View full review
strict: !argv.forcekeeps deploys strict by default, and a forced real upload warns on stderr. I found no auth bypass or injection.@cloudflare/deploy-helpersmoves from an npm release to a pkg.pr.new tarball. The tarball is pinned to a commit and the lockfile carries its integrity hash, the same approach the repository already uses for Forge. Overrides inpnpm-workspace.yamlkeep the sibling packages on their registry releases.
📋 Code Quality: 💬 1 info
The flag is wired in consistently. Strict-abort detection reads process.exitCode, a process-global value, instead of a return value.
Recommendation: 💬 Optional Nits
- [INFO] Strict-abort detection depends on deploy-helpers setting
process.exitCode = 1as a side effect. (packages/cli/src/commands/deploy/shared.ts:233)
View full review
- Abort detection uses a global (
packages/cli/src/commands/deploy/shared.ts:233): the code treatsversionId === null && process.exitCode === 1as a strict-mode abort. IfexitCodeis already 1 before the upload, a successful upload that returns no version ID would be reported as a failure, andDeploy completewould not be printed.
Checked and found fine:
-fdoes not clash with any reserved global alias.forceexists only oncf deploy.- The warning is skipped for
--dry-runand still printed with--quiet. - The metadata sidecar and the generated catalogs match.
✅ All other checks passed
🚀 Release: ✅ LGTM
Risk: Low. The minor changeset fits a new flag.
📖 AGENTS.md: ✅ LGTM
No issues found.
⚡ Performance: ✅ LGTM
No performance concerns.
📝 Documentation: ✅ LGTM
No documentation issues.
Reviewed commit: b3ea6520
|
LGTM! |
There was a problem hiding this comment.
Superseded by the review of
a722ab54.
This review, of 1d1c4ca5
✅ Approved — No findings. The --force flag is wired in correctly, and both earlier notes are settled: the exit-code fix in 1d1c4ca resolves the first, and the commit-pinned preview dependency is intentional and documented.
The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.
✅ All checks passed
🚀 Release: ✅ LGTM
Risk: Low. The minor changeset fits a new flag.
🔒 Security: ✅ LGTM
Deploys stay strict by default, and turning strict mode off requires an explicit --force. The commit-pinned preview dependency is pinned by commit SHA and lockfile integrity, and its removal is documented.
📖 AGENTS.md: ✅ LGTM
No issues found.
📋 Code Quality: ✅ LGTM
Strict-abort detection now uses only the exit code set during the helper call. The earlier exit code is saved and cleared before the call and restored in finally, and CliExit(1) is thrown after the finally block, so Deploy complete is not printed on an abort.
⚡ Performance: ✅ LGTM
No performance concerns.
📝 Documentation: ✅ LGTM
No documentation issues.
Reviewed commit: 1d1c4ca5
1d1c4ca to
a722ab5
Compare
There was a problem hiding this comment.
Superseded by the review of
5141199a.
This review, of a722ab54
✅ Approved — No findings. Since the last approval only the dependency pin changed, and it is pinned by commit SHA and lockfile integrity. The --force behaviour, abort handling and exit-code handling are still correct.
The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.
✅ All checks passed
🚀 Release: ✅ LGTM
Risk: Low. A minor changeset is the right level for a new flag.
🔒 Security: ✅ LGTM
--force is opt-in and only applies to cf deploy, and a forced upload prints a warning to stderr. The preview dependency is pinned by commit SHA and lockfile integrity, and the scoped overrides keep the sibling packages on their released npm versions.
📖 AGENTS.md: ✅ LGTM
No issues found.
📋 Code Quality: ✅ LGTM
The deploy-helpers preview is pinned by full commit SHA and lockfile integrity, and the existing patch is still applied to it. Strict-abort detection uses only the exit code set during the helper call, restores any earlier exit code, and throws CliExit(1) without printing Deploy complete. --force is wired through the builder, the metadata, the generated catalogs and deploy-input.ts.
⚡ Performance: ✅ LGTM
No performance concerns.
📝 Documentation: ✅ LGTM
No documentation issues in the changed files. The flag is published in the command metadata and the generated catalogs, and docs/architecture.md records when the temporary overrides will be removed.
Reviewed commit: a722ab54
|
LGTM |
There was a problem hiding this comment.
✅ Approved — No findings. Since the last approval, the only change is the switch from the preview build to the released deploy-helpers 0.26.0, and the forced-deploy, abort and exit-code handling are still correct.
The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.
✅ All checks passed
🚀 Release: ✅ LGTM
Risk: Low. A minor changeset is the right level for a new flag.
🔒 Security: ✅ LGTM
--force is opt-in, applies only to cf deploy, and a forced upload prints a warning to stderr. The runtime dependency now comes from a released npm version.
📖 AGENTS.md: ✅ LGTM
No issues found.
📋 Code Quality: ✅ LGTM
--force/-f is wired through the builder, the metadata, the generated catalogs and deploy-input.ts. Abort detection clears and then restores the earlier exit code, so an upload that succeeds without a version ID is still a success, and a real abort is still caught when the exit code was already 1. Tests cover these cases.
⚡ Performance: ✅ LGTM
No performance concerns.
📝 Documentation: ✅ LGTM
The flag appears in the command metadata and in the generated catalogs.
Reviewed commit: 5141199a
|
LGTM! |
Summary
Add
--force(-f) tocf deployso CI deployments can proceed despite conflicting remote Worker changes. Deployments stay strict by default, and aborted uploads recommendcf deploy --forcewithout printing a success message.Forced real uploads warn on stderr, including with
--quiet; dry runs omit the warning. Successful uploads without a version ID remain successful, and abort detection isolates pre-existing process exit codes. Version creation remains strict. Typed metadata, generated command catalogs, regression tests, and a minor changeset are included.Addresses #69.
Dependencies
Updated onto current main and replaced the deploy-helpers preview with the released
@cloudflare/deploy-helpers@0.26.0, which includesstrictModeAbortMessagefrom cloudflare/workers-sdk#16020. Removed the temporary sibling overrides and preview documentation. All dependency manifests, the lockfile, and cleanup patches now match main.Validation
pnpm checkpasses: generation, builds, workspace type checks, lint, and formatting.git diff --checkpasses.