Skip to content

feat(cli): add warning for direct updates without delta uploads - #3369

Open
riderx wants to merge 1 commit into
mainfrom
add-warning-cli-rollout2
Open

riderx wants to merge 1 commit into
mainfrom
add-warning-cli-rollout2

Conversation

@riderx

@riderx riderx commented Sep 17, 2026 •

Copy link
Copy Markdown
Member
  • Implemented a warning mechanism in the CLI for cases where direct updates are enabled but the upload does not use delta, prompting users to utilize the --delta option.
  • Introduced new functions to handle direct update detection and warning logic.
  • Updated documentation to reflect the new warning behavior.
  • Enhanced unit tests to cover the new functionality and ensure proper event tracking for direct updates without delta.

Summary

Test plan

Screenshots

Checklist

  • My code follows the code style of this project and passes
    bun run lint:backend && bun run lint.
  • My change requires a change to the documentation.
  • I have updated the documentation
    accordingly.
  • My change has adequate E2E test coverage.
  • I have tested my code manually, and I have provided steps how to reproduce
    my tests

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Review in cubic

- Implemented a warning mechanism in the CLI for cases where direct updates are enabled but the upload does not use delta, prompting users to utilize the `--delta` option.
- Introduced new functions to handle direct update detection and warning logic.
- Updated documentation to reflect the new warning behavior.
- Enhanced unit tests to cover the new functionality and ensure proper event tracking for direct updates without delta.
@riderx
riderx deployed to deepsec-pr September 17, 2026 12:56 — with GitHub Actions Active
@coderabbitai

coderabbitai Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Next included review available in 57 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 229f8eb8-1089-4719-8eb5-b4ea0b8a0b71

📥 Commits

Reviewing files that changed from the base of the PR and between afdf688 and ac4a26a.

📒 Files selected for processing (12)
  • cli/skills/release-management/SKILL.md
  • cli/src/bundle/upload.ts
  • cli/src/updaterConfig.ts
  • cli/test/test-init-guardrails.mjs
  • supabase/functions/_backend/plugin_runtime/utils/org_email_notifications.ts
  • supabase/functions/_backend/private/email_preferences.ts
  • supabase/functions/_backend/private/events.ts
  • supabase/functions/_backend/utils/direct_update_without_delta_tracking.ts
  • supabase/functions/_backend/utils/org_email_notifications.ts
  • supabase/functions/_backend/utils/user_preferences.ts
  • tests/direct-update-without-delta-tracking.unit.test.ts
  • tests/events.test.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codspeed

codspeed Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 43 untouched benchmarks
⏩ 2 skipped benchmarks1


Comparing add-warning-cli-rollout2 (ac4a26a) with main (afdf688)

Open in CodSpeed

Footnotes

  1. 2 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@sonarqubecloud

Copy link
Copy Markdown

@rihoarvutikonto rihoarvutikonto left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unique: direct-update-without-delta warn fires for --external uploads where --delta is forced off and cannot be used.

Comment thread cli/src/bundle/upload.ts
log.info(`[Verbose] Delta updates: ${options.delta ? 'enabled' : 'disabled'}`)
}

if (shouldWarnDirectUpdateWithoutDelta({

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

options.external forces options.delta = false just above (line 1734–1735: "not available with external URLs"), then this still warns and tells the operator to bundle upload --delta.

That advice cannot work for --external / S3 uploads. The Bento/PostHog event (Direct Update Without Delta, channel: 'app-error') will also fire on every external upload of a direct-update app, including CI.

Skip the warn when delta is impossible (options.external or !fileConfig.partialUpload), e.g. pass that into shouldWarnDirectUpdateWithoutDelta.

warnDirectUpdateWithoutDelta also await sendEvent(...) with no try/catch. Other upload telemetry is best-effort; if this throw lands, a warning aborts the bundle. Swallow sendEvent errors here.

This branch was successfully deployed

1 active deployment
deepsec-pr — ac4a26af Deployed Sep 17, 2026 by riderx via Scan PR changes #7227
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.

2 participants