Repository navigation
Add resumable device login and Python/Node.js preflight - #859
Open
mconflitti-pbc wants to merge 2 commits into
Open
mconflitti-pbc wants to merge 2 commits into
mconflitti-pbc wants to merge 2 commits into
Conversation
Keep resumable login and preflight scoped to POSIX while preserving legacy commands, credential writes and stored deployment URL keys. Limit private diagnostics and strict metadata reads to the new flows. Retain pending-state locks, checkpoints and deadlines, and isolate terminal Cloud account errors from the existing public API.
|
☂️ Python Coverage
Overall Coverage
New Files
Modified Files
|
3 of 6 tasks
This branch has not been deployed
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
Let headless clients start device authentication, return control while a user approves, and finish in a later process. Add native runtime preflight so deployment workflows can use CLI instructions without bundling login or Python/Node.js runtime-check scripts.
Type of Change
Approach
--no-wait,--finish, and--timeoutto Connectloginand Connect Cloudadd. Start prints approval details as JSON; finish selects pending state by nickname. State uses private POSIX files, process locking, polling intervals, token checkpoints, and bounded requests. Transient failures retain resumable state; permanent authorization/account failures remove it.rsconnect preflightfor Python and Node.js on self-hosted Connect and SPCS. Checks consider installed/publishable runtimes, project constraints, and deployment history, including file deployments. Node.js checks use npm's own semver implementation. Python--fixcan create a missing.python-versiononly for new, unconstrained content.ok,incompatible,unknown, and operationalerror. Incompatibility exits 3; operational errors exit 1; unresolved checks exit 0 with suggested actions.Resumable login and preflight require POSIX. Pending state contains plaintext device codes and token checkpoints, protected by owner-only permissions; same-user processes and backups can still read it. Preflight checks runtime availability, not application or dependency compatibility, and does not support Connect Cloud.
Automated Tests
The full suite was not rerun after the last compatibility fixes. Live Connect and native Windows execution were not performed.
Directions for Reviewers
On POSIX, start a Connect login and show the returned approval URL/code to the user:
After Cloud approval, the equivalent flow is:
Check a new Python project with
rsconnect preflight --name review ./project --new --fix, and Node.js withrsconnect preflight --name review ./node-app --runtime nodejs. Also verify a redeployment retains its content ID and that incompatible/unresolved runtimes produce the documented JSON and exit codes. Existing blocking login should continue working without the new flags.Running with deploy to connect skill that relies on these new features for testing:
Checklist
rsconnect-python-tests-at-nightworkflow in Connect against this feature branch.