feat: Allow setting a default server#777
Open
atheriel wants to merge 2 commits into
Open
Conversation
With more than one entry in the `servers.json` file, the `-s` or `-n` would previously have become mandatory. This commit allows a server to be marked as the default, in which case it is assumed to be the target. Specifically, `rsconnect add` now has a `--set-default` flag to mark a server as the default. For backwards compatibility we do not do this automatically. For `rsconnect login`, on the other hand, we don't need to be backwards compatible -- it hasn't been released yet -- and so that command will make the server the default automatically (unless `--no-set-default` is passed). Some care has been taken to keep precendence of flags and environment variables intact and ensure that only one server is the default at a time. Unit tests are included. Closes #214. Signed-off-by: Aaron Jacobs <[email protected]>
|
…s deploys When shinyapps credentials (token/secret/account) are provided without -n or -s, don't resolve the default Connect server — the user is targeting shinyapps.io, not a stored server. Also fixes black formatting that CI flagged. Co-Authored-By: Claude Opus 4.6 <[email protected]>
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified Files
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
With more than one entry in the
servers.jsonfile, the-sor-nwould previously have become mandatory. This commit allows a server to be marked as the default, in which case it is assumed to be the target.Closes #214.
Type of Change
Approach
Specifically,
rsconnect addnow has a--set-defaultflag to mark a server as the default. For backwards compatibility we do not do this automatically.For
rsconnect login, on the other hand, we don't need to be backwards compatible -- it hasn't been released yet -- and so that command will make the server the default automatically (unless--no-set-defaultis passed).Some care has been taken to keep precendence of flags and environment variables intact and ensure that only one server is the default at a time.
Automated Tests
Unit tests are included.
Directions for Reviewers
Please advise.
Checklist
rsconnect-python-tests-at-nightworkflow in Connect against this feature branch.