Skip to content

fix: Skip draft verification for rendered and static content - #883

Merged
nealrichardson merged 2 commits into
mainfrom
npr-872
Nov 5, 2026
Merged

nealrichardson merged 2 commits into
mainfrom
npr-872

Conversation

@nealrichardson

@nealrichardson nealrichardson commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Closes #872.

What

Since #805, rsconnect deploy of rendered content renders twice by default: once when the draft is deployed, and again when the draft is activated. The verify request in between can't catch anything the first render didn't.

Rendered and static content (rmd-static, quarto-static, jupyter-static, static) is now deployed and activated in one step, the same as with --no-verify. This is safe because Connect reverts to the previous bundle if an activating render fails. --draft still deploys a draft, but doesn't verify it: the draft URL only serves what the deploy task already rendered. Apps and APIs keep the draft → verify → activate flow.

Changes

  • api.py:
    • RSConnectExecutor.is_rendered_content reads the app mode from the bundle's manifest, not the mode passed on the command line. The command-line mode can be wrong here: deploy notebook --static produces a static bundle, and deploy quarto passes quarto-static even for Shiny documents.
    • New should_verify(), which should_deploy_as_draft() now uses. It returns false for rendered content, with or without --draft.
    • New verify_and_activate() replaces the verify/activate block that was duplicated across 10 deploy commands in main.py. It activates only when a draft was actually deployed.
  • main.py: the deploy commands call verify_and_activate(), and the --no-verify and --draft help text mention the rendered-content behavior.
  • Tests:
    • New test_deploy_rendered_content_without_verifying, which runs with and without --draft.
    • The quiet verify-failure test now deploys a Shiny manifest, since notebooks are no longer verified.

Promoting the preview render on activation (option 2 in the issue) would need a Connect change. It would also fix the UI's "Activate Draft" button, which this PR doesn't affect.

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-11-05 17:26 UTC

@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
11014 9738 88% 0% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
rsconnect/api.py 89% 🟢
rsconnect/main.py 87% 🟢
TOTAL 88% 🟢

updated for commit: f465c4e by action🐍

Comment thread rsconnect/api.py Resolved
nealrichardson and others added 2 commits November 4, 2026 19:01
Activating a draft makes Connect render it again, so verify-before-activate
rendered documents twice. Rendered and static content is deployed and
activated in one step, as with --no-verify; Connect reverts to the previous
bundle if the activating render fails. --draft still verifies the draft.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The draft preview URL only serves what the deploy task already rendered,
so verifying it can't catch anything. Rendered and static content is
deployed as a draft with --draft but never verified.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nealrichardson nealrichardson changed the title Skip draft verification for rendered and static content fix: Skip draft verification for rendered and static content Nov 5, 2026
@nealrichardson
nealrichardson merged commit 57ebe7b into main Nov 5, 2026
27 checks passed
@nealrichardson
nealrichardson deleted the npr-872 branch November 5, 2026 17:25
nealrichardson added a commit that referenced this pull request Nov 5, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
nealrichardson added a commit that referenced this pull request Nov 5, 2026
…#915)

* Require GUIDs for Connect content; add --guid to deploy and preflight

Remove the legacy numeric content ID path (app_get, get_content_by_id,
ContentItemV0) and use content_get directly. An explicit --app-id for a
Connect target must be a content GUID.

Add --guid to the deploy commands and preflight as the Connect-specific
way to target existing content. It conflicts with --app-id and --new, and
is rejected for Connect Cloud and shinyapps.io targets.

Fixes #881
Fixes #885

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix: isolate shinyapps --guid test from CONNECT_API_KEY env

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* review: clarify deploy git error when the given content GUID is not found

The GUID may come from --guid or --app-id, and --new cannot be combined
with either, so suggest omitting the ID instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* review: cover and document the SPCS --app-id/--guid fix

Deploying to Connect in SPCS with an explicit content GUID failed on main
with "Unable to infer Connect client." because validate_app_mode() did not
treat SPCSConnectServer as Connect. Add tests for the GUID lookup, the
app-mode mismatch check, and numeric-ID rejection on SPCS, plus a
CHANGELOG entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test: use the content GUID from the shared deploy routes in #883's test

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.

Don't verify content running for rendered content

2 participants