Skip to content
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

feat: set up interruptible generation with progress updates #1250

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

2ynn
Copy link
Contributor

@2ynn 2ynn commented Feb 5, 2025

SPE-4642

WARNING relies on openapi-generation PR#2212

This PR sets up the scaffolding to allow streaming progress updates from the generator:j

  • a progress channel is set up and passed to the generator to allow receiving updates concurrently
  • a OnProgressUpdate callback is made available on the workflow runner to process the updates
  • for now the updates are simply logged (only when w.Debug = true)
  • a progressUpdate.ID is made available (document checksum) to allow grouping updates
  • the POST /run route now accepts compile=false and progress=false query parameters to allow skipping compilation and/or progress updates
  • a new /cancel route is added to allow halting the generation before is it fully completed

@2ynn 2ynn changed the title feat/ set up interruptible generation with progress updates feat: set up interruptible generation with progress updates Feb 5, 2025
"github.com/speakeasy-api/speakeasy/internal/studio/sdk/models/components"
"github.com/speakeasy-api/speakeasy/internal/studio/sdk/models/operations"
"github.com/speakeasy-api/speakeasy/internal/suggest"
"github.com/speakeasy-api/speakeasy/internal/utils"
"gopkg.in/yaml.v3"
)

type reRunOptions struct {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should come from request ?

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