Skip to content

feat: use SSE in forc-publish for long-running uploads #7178

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
May 20, 2025

Conversation

sdankel
Copy link
Contributor

@sdankel sdankel commented May 16, 2025

This pull request introduces changes to enhance the functionality of the forc-publish plugin, including improvements to error handling, support for streaming server responses, and updates to dependencies. The most significant changes include adding a new error variant, updating the upload method to handle streaming responses, and modifying dependencies to include futures-util and additional features for reqwest.

Enhancements to Error Handling:

  • Added a new ServerError variant to the Error enum in forc-plugins/forc-publish/src/error.rs to handle server-related errors.

Improvements to upload Method:

  • Updated the upload method in forc-publish/src/forc_pub_client.rs to process streaming server responses using futures-util::StreamExt. This includes handling chunked data, parsing JSON responses, and printing event updates. [1] [2]

Dependency Updates:

  • Added futures-util as a dependency in Cargo.toml and forc-plugins/forc-publish/Cargo.toml to support streaming operations. [1] [2]
  • Enabled the stream feature for reqwest in forc-plugins/forc-publish/Cargo.toml to facilitate streaming server responses.

Minor Adjustments:

  • Added empty println! calls in main.rs to improve output formatting during error handling and publishing operations. [1] [2]

May-16-2025 03-56-49

@sdankel sdankel temporarily deployed to fuel-sway-bot May 16, 2025 08:11 — with GitHub Actions Inactive
@sdankel sdankel temporarily deployed to fuel-sway-bot May 16, 2025 08:14 — with GitHub Actions Inactive
@sdankel sdankel marked this pull request as ready for review May 16, 2025 08:15
@sdankel sdankel requested review from a team as code owners May 16, 2025 08:15
@sdankel sdankel temporarily deployed to fuel-sway-bot May 16, 2025 17:16 — with GitHub Actions Inactive
@sdankel sdankel temporarily deployed to fuel-sway-bot May 16, 2025 17:28 — with GitHub Actions Inactive
@sdankel sdankel changed the title feat: use SSE for long-running uploads feat: use SSE in forc-publish for long-running uploads May 16, 2025
@sdankel sdankel temporarily deployed to fuel-sway-bot May 16, 2025 19:30 — with GitHub Actions Inactive
@sdankel sdankel requested a review from kayagokalp May 17, 2025 00:36
zees-dev
zees-dev previously approved these changes May 17, 2025
@sdankel sdankel temporarily deployed to fuel-sway-bot May 18, 2025 15:14 — with GitHub Actions Inactive
@sdankel sdankel enabled auto-merge (squash) May 19, 2025 17:34
@sdankel sdankel temporarily deployed to fuel-sway-bot May 19, 2025 17:34 — with GitHub Actions Inactive
@sdankel sdankel merged commit e3eab78 into master May 20, 2025
41 checks passed
@sdankel sdankel deleted the sophie/forcpub-keepalive branch May 20, 2025 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants