Conversation
…ds (2.4.1) Users without an SFTP account (not yet eligible: no paid/waived/sponsored project or no SSH key on profile) could not run cf init, because the command aborted with "No SFTP account linked to your platform account. Please run 'cf login' first." The SFTP account is only used as a label in .cf/project.json, which the backend stores as an opaque blob and the CLI never reads back, so blocking init on it was incorrect. - cf init: fall back to user_email (or "unknown") for the proj['user'] metadata field; only refresh sftp_username from /auth/cli/whoami when an api_key is present, and never abort. - cf status: SFTP listing becomes a best-effort extra. When no SFTP account is linked, print the platform status, skip SFTP with a soft hint, and exit cleanly. - cf push (SFTP), cf pull, cf tapeouts, cf confirm: keep the SFTP gate but replace the "Contact support" message with one that explains the eligibility path (deposit paid/waived/sponsored + SSH key on profile). - Bump version to 2.4.1 in pyproject.toml and align __init__.py which had drifted at 2.3.2. cf precheck (local), cf precheck --remote, and cf push --remote already worked without SFTP and are unchanged. Made-with: Cursor
2c07da7 to
e9fc548
Compare
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.
Summary
A user reported that after
cf loginthecf initcommand aborted withThe message is misleading: login had already succeeded, but the user's account had no SFTP account provisioned yet (SFTP accounts are auto-provisioned server-side only after a project deposit is paid/waived/sponsored and an SSH key is on the user's profile — see
_auto_provision_sftp_if_eligibleinchipignite-backend-services/src/user_service/routes.py). A user evaluating the tooling before committing to a shuttle had no way past init.The
sftp_usernameis only needed for commands that actually talk to SFTP. Everywhere else it was used only as a label in.cf/project.jsonthat the backend stores as an opaque blob and the CLI never reads back. This PR loosens the gating so new users can onboard end-to-end without an SFTP account and only hit the gate when they actually need SFTP.Behavior matrix after the fix
cf login,cf logout,cf whoami,cf keygen,cf configcf init,cf link,cf unlinkcf gpio-config,cf precheck(local),cf precheck --remote,cf push --remotecf status(platform half)cf push(SFTP),cf pull,cf tapeouts,cf confirmChanges
cf init: no longer aborts whensftp_usernameis missing. Refreshes from/auth/cli/whoamionly when an API key is present; falls back touser_email(or"unknown") for theproj['user']metadata field. The rest of the init flow is already API-key driven.cf status: the SFTP listing becomes a best-effort extra. When no SFTP account is linked, the command prints the platform status, emits a soft hint, and exits cleanly instead of aborting after already showing useful output.cf push(SFTP path),cf pull,cf tapeouts,cf confirm: the four legitimate SFTP gates keep blocking, but the message now explains the auto-provisioning rules ("provisioned once a project deposit is paid/waived/sponsored and an SSH public key is on your profile") instead of telling users to contact support.pyproject.toml. Also alignschipfoundry_cli/__init__.pywhich had drifted at 2.3.2.Test plan
pytestfull suite: 125 passed, 1 skippedcf loginwith a brand-new account (no SFTP linked), thencf initin an empty project directory — expect success (previously aborted).cf status— expect platform status to print, followed by the SFTP-skipped hint, exit 0.cf push(SFTP) andcf pull— expect the new eligibility-aware error message and non-zero exit.cf init,cf push, andcf pullbehave as before.cf precheck --remoteandcf push --remotecontinue to work for eligible users (no regressions from reorder ofapi_key/usernameincf init).