Skip to content

feat(push): cf push --https for direct-to-S3 upload (2.5.0)#18

Merged
jeffdi merged 4 commits intomainfrom
feature/push-https-s3
Apr 21, 2026
Merged

feat(push): cf push --https for direct-to-S3 upload (2.5.0)#18
jeffdi merged 4 commits intomainfrom
feature/push-https-s3

Conversation

@jeffdi
Copy link
Copy Markdown
Contributor

@jeffdi jeffdi commented Apr 21, 2026

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

  1. CLI picks the wrapper GDS (and `verilog/rtl/user_defines.v` when non-openframe) and computes SHA-256 locally for each file.
  2. `POST /projects/{id}/https-push/init` returns one pre-signed S3 PUT URL per file.
  3. CLI PUTs each file directly to S3 over HTTPS (single PUT per file, no compression or splitting).
  4. `POST /projects/{id}/https-push/complete` tells the platform to commit the uploaded files to EFS; the staging Lambda re-verifies SHA-256, synthesizes `.cf/project.json` from authoritative platform data, and deletes the staged S3 objects.

`--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

  • Install branch CLI: `pip install --force-reinstall 'git+https://github.com/chipfoundry/cf-cli@feature/push-https-s3'\`
  • `cf push --https --dry-run` from a linked project — verify file list and total size
  • `cf push --https` from a linked project — verify S3 upload progress, then `Files staged on the platform:`
  • Confirm shuttle import picks up the project on the platform

Made with Cursor

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
@jeffdi jeffdi merged commit e5e5a9b into main Apr 21, 2026
12 checks passed
@jeffdi jeffdi deleted the feature/push-https-s3 branch April 21, 2026 04:39
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.

2 participants