Skip to content

Conversation

@amol-
Copy link
Collaborator

@amol- amol- commented Jun 11, 2025

When drafts are available, we need to tell the users where to see the launched content.

Intent

Always oputput as "Direct URL" the url where the currently deployed content is visible.
When it's an active application we show the application url, when it's a draft we output the draft url.

Type of Change

  • New Feature

Approach

Expand RSConnectClientDeployResult with a new "preview_url" field which has the url where the deployed bundle is served. If the bundle was activated, we will set this to None as the content is visibile on the app_url, if the bundle wasn't activate instead we set this so that it can be printed to user.

Automated Tests

test_deploy_draft test now also tests for the right URL to be printed

Directions for Reviewers

This depends on #679

Checklist

I think we can avoid updating the CHANGELOG further as #679 already added the concept of deploying drafts as a new feature.

@github-actions
Copy link

github-actions bot commented Jun 11, 2025

PR Preview Action v1.6.1
Preview removed because the pull request was closed.
2025-06-11 20:17 UTC

@amol-
Copy link
Collaborator Author

amol- commented Jun 11, 2025

rebased on main, will fix failures

@github-actions
Copy link

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
5117 3979 78% 0% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
rsconnect/api.py 77% 🟢
rsconnect/http_support.py 80% 🟢
TOTAL 79% 🟢

updated for commit: 2b26f9c by action🐍

except json.JSONDecodeError:
logger.debug("--> <invalid JSON>")
else:
logger.debug("--> <non-json-response>")
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Unrelated, but. printing the whole body always lead to the full application home page being dumped on every deploy. I chose to only dump JSON responses as those are the ones usually coming from the APIs and thus that are more valuable when debugging.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thank you for this — you're totally right that the whole body is too much in most (many? all?) cases

@amol- amol- marked this pull request as ready for review June 11, 2025 16:58
Copy link
Contributor

@marcosnav marcosnav left a comment

Choose a reason for hiding this comment

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

🚀

@amol- amol- merged commit 1dd0e7a into main Jun 11, 2025
15 checks passed
@amol- amol- deleted the drafts-url branch June 11, 2025 20:17
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.

4 participants