-
Notifications
You must be signed in to change notification settings - Fork 1.2k
chore(ci): setup automated stainless builds #3557
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
base: main
Are you sure you want to change the base?
chore(ci): setup automated stainless builds #3557
Conversation
|
||
# 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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The 2 options are:
- 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).
- 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?
Just added the |
There was a problem hiding this 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!
What does this PR do?
This pull request adds a new workflow that does 2 things:
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