feat(push): cf push --https for direct-to-S3 upload (2.5.0)#18
Merged
Conversation
Adds a third push option alongside SFTP and `cf push --remote`. Use when both port 22 and GitHub are blocked by a corporate firewall but outbound HTTPS to AWS S3 is allowed. - New _push_https flow: picks wrapper GDS (+ user_defines.v when non-openframe), SHA-256s each file locally, asks the platform for pre-signed PUT URLs, PUTs each file directly to S3, then asks the platform to commit them. - Mutually exclusive with --remote. - No Git involvement — the platform synthesizes .cf/project.json server-side and the Lambda re-verifies sha256 byte-for-byte before staging on EFS. - README + portal docs updated to describe all three push modes. Made-with: Cursor
_api_get/_api_post/_api_put were printing the raw
`Client error '409 Conflict' for url ...` message from httpx when the
backend returned a 4xx/5xx. That dropped the useful bit — FastAPI's
`{"detail": "..."}` payload — so users saw no actionable reason.
Now extracts `detail` (string or validation-list form) and prints
`HTTP 409: <detail>`. Applies to every CLI command that goes through
the shared _api_* helpers (push --remote, push --https, link, etc.).
Made-with: Cursor
cf push --https is a transport variant of the existing push command, not a standalone new capability — same manifest/sync flow as --remote, which also shipped as a patch under 2.3.x. Rolling back the earlier jump to 2.5.0 so the --https work ships as 2.4.3 alongside the error-surfacing fix on the same feature branch. Made-with: Cursor
Matches the rich progress UX of the SFTP push path (utils.upload_with_progress): percent, bytes, transfer speed and elapsed time per file. We stream the body with a generator so httpx can drive bar updates on every chunk, and set Content-Length explicitly so S3 doesn't fall back to chunked encoding (pre-signed PUTs don't allow it). Made-with: Cursor
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
Adds `cf push --https`, a third push option alongside SFTP (default) and `cf push --remote`. Use when a corporate firewall blocks both port 22 and GitHub but outbound HTTPS to AWS S3 is allowed.
How it works
`--https` and `--remote` are mutually exclusive.
Version
`2.4.1` → `2.5.0`.
Docs
README section updated with preconditions, flow, and the firewall-tier fallback order (SFTP → --remote → --https). Portal docs updated separately in `chipignite-portal-frontend`.
Test plan
Made with Cursor