Skip to content

Add rsconnect server set-default and a server command group#818

Merged
edavidaja merged 6 commits into
mainfrom
enable-setting-default-server
Jul 14, 2026
Merged

Add rsconnect server set-default and a server command group#818
edavidaja merged 6 commits into
mainfrom
enable-setting-default-server

Conversation

@edavidaja

@edavidaja edavidaja commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

What

Adds rsconnect server set-default -n <name> | -s <url> to mark an already-saved server as the default without re-adding it, and introduces a rsconnect server command group as the home for server management.

The server command group

A single Click Command object can belong to multiple groups, so the group reuses the existing add/list/remove/details/bootstrap command objects — no duplication; the top-level commands are unchanged and keep working. set-default is new and registered only under the group.

  • rsconnect server add|list|remove|details|bootstrap — aliases of the existing top-level commands
  • rsconnect server set-default — new; the only entry point for this command

login/logout are intentionally not in the group — they stay top-level (common publisher commands). bootstrap (rare server-provisioning) is grouped.

Behavior notes

  • set-default is local only — no server contact/re-validation; use rsconnect details -n <name> to re-check.
  • -s matches the stored, normalized URL exactly (like remove -s); prefer -n. Reports the resolved nickname.
  • Exactly one of -n/-s required.

Tests & docs

Coverage in tests/test_main.py for set-default (name/URL, errors, both/neither, idempotency, shinyapps.io, no top-level set-default), group help, and the alias wiring. New docs/commands/set-default.md + CHANGELOG entry. Suite green, lint clean.

@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-07-14 14:03 UTC

@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
7635 6350 83% 0% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
rsconnect/main.py 81% 🟢
TOTAL 81% 🟢

updated for commit: f4d4f0c by action🐍

@karawoo karawoo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nice, I like the addition of the server group

Comment thread rsconnect/main.py Outdated
Comment on lines +999 to +1000
These subcommands are aliases for the top-level add, list, remove, and
details commands, grouped under a single namespace.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I feel like this implies that set-default also exists as a top-level command. There's nothing in the docstring that suggests set-default is different from the rest of the server commands.

@edavidaja edavidaja force-pushed the enable-setting-default-server branch from 817b528 to b169f69 Compare July 14, 2026 13:43
Comment thread rsconnect/main.py Outdated
@edavidaja edavidaja enabled auto-merge (squash) July 14, 2026 13:55
@edavidaja edavidaja merged commit d4e5823 into main Jul 14, 2026
22 checks passed
@edavidaja edavidaja deleted the enable-setting-default-server branch July 14, 2026 14:03
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.

enable setting existing saved server as default

2 participants