Skip to content

Conversation

dgellow
Copy link

@dgellow dgellow commented Sep 26, 2025

What does this PR do?

This pull request adds a new workflow that does 2 things:

  1. generate SDK preview builds whenever the OpenAPI spec file is modified in a PR
  2. on PR merge, generate SDK builds that will be pushed to the different SDK repos (i.e start the release process)

Important

A llama-stack admin will need to add a new secret STAINLESS_API_KEY. The API key can be created in the Stainless org dashboard.

Test Plan

I tested in my fork: stainless-api#3

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Sep 26, 2025

# Path to your Stainless config. Optional; only provide this if you prefer
# to maintain the ground truth Stainless config in your own repo.
CONFIG_PATH: ./docs/static/stainless-config.yaml
Copy link
Contributor

Choose a reason for hiding this comment

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

what would other option be? is this maintained in the stainless-sdk repo?

Copy link
Author

@dgellow dgellow Oct 6, 2025

Choose a reason for hiding this comment

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

The 2 options are:

  1. what this PR does — have the config file in this repo, along the spec file, both will be the source of truth that you upload together to Stainless to update your project. That makes it possible to iterate on both files in the context of the same PR, and lets you use your standard editor (side note: if you're using vscode there is a Stainless extension to get quick diagnostics, similar to the web SDK Studio).
  2. only upload the spec file, and keep the config file on Stainless' side. In this case the file in the stainless-sdks/*-config repo is the source of truth, and the SDK Studio is the expected way to edit it.

The option 1 gives you the most control and lets you use the tooling you prefer. I would recommend it if you expect multiple teams/people to work on the files at the same time, having the config in your PRs makes it simpler to coordinate concurrent work. On the other hand, the option 2 expects that you're using the web editor which is tightly integrated in the rest of the web app.

In both cases files will eventually find their way into the stainless-sdks/*-config repo, which is used as inputs for the codegen process.

Does that make sense?

@leseb
Copy link
Collaborator

leseb commented Oct 3, 2025

Just added the STAINLESS_API_KEY key to the repo :)

Copy link
Collaborator

@leseb leseb left a comment

Choose a reason for hiding this comment

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

I just realized that this can only work when NOT submitting a PR from fork given Github security model on passing secrets to workflow.

@dgellow I'm wondering how this is used elsewhere in practice and how other projects overcome that? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants