-
Notifications
You must be signed in to change notification settings - Fork 44
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
Automate external API versioning #8908
Conversation
We might be able to get this diff without having to run the server. The spec can be generated by utils in /trpc/middleware via scripts. Maybe we can maintain the current master spec as a code artifact, and generate the diff by generating and comparing to the branch we are trying to merge, then update versions and spec with new spec. |
I think updating the branch with what we are trying to merge will lead to inflating our version numbering because it will basically bump the version numbering each time we make a new PR that changes the external API. I think it would be better to compare with the server. I also see no reason not to run the server end to end. Not only is it easier it also guarantees we are comparing the same spec. Anyways maybe we can discuss during platform hours |
What's the hold-up on this PR - can we get it out of draft or close it? |
# Conflicts: # packages/commonwealth/server/api/external-router.ts # pnpm-lock.yaml
One thing to note is that without the |
# Conflicts: # pnpm-lock.yaml
Link to Issue
Closes: #8890
Closes: #9500
Description of Changes
external-api-config.json
(used as OpenAPI spec version)DYNO=web.1
in production, dispatch the SDK publishing workflow in thehicommonwealth/api-client
repo if the latest version of the@commonxyz/api-client
package is not equal to the current OpenAPI spec version.api-client/package.json
versions if necessarylibs/api-client
since all of that configuration is moved to https://github.com/hicommonwealth/api-clientTest Plan
Versioning (Versioning.yml)
Publish workflow
Hope it works it on the next deployment. If it fails due to the commonwealth side function, dispatch the workflow manually from the api-client repository and fix the dispatch function in a PR.
- I tested everything in the
dispatchSDKPublishWorkflow
function except the API call to dispatch the workflowDeployment Plan
API_CLIENT_REPO_TOKEN
-> use the Common Workflow Dispatcher GitHub app token (@timolegros)