-
Notifications
You must be signed in to change notification settings - Fork 147
DEVPROD-27645 Add workflow to sync GraphQL schema to UI repo #9788
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?
Conversation
When changes to graphql/schema are pushed to main, this workflow clones evergreen-ci/ui, symlinks the schema, runs pnpm codegen, and opens a PR with the updated generated types. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extract DEVPROD ticket from the triggering commit message and use it in the downstream PR title and body instead of [TEST] labeling. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
hadjri
left a comment
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.
LGTM, was this workflow verified / tested?
Its kind of hard to test the workflow since it involves creating prs on merges to main where only a diff on graphql schemas from opposite repos but according to my top agent and all of his friends (opus 4.6) It is supposed to work |
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.
This does feel like the idealized solution but I'm not 100% sure that it addresses the problems with our workflow. Imo the main issues are:
- Slow signal on updating generated types when a PR touches GraphQL
- Irrelevant signal when a PR does not
This seems to mostly solve for a third problem, "generated types are out of date and breaking things." We encounter that occasionally, mostly when non-UI engineers make changes (e.g. admin settings), but not too often. We've also been delinquent with automated PRs lately and I fear would be yet another chore that is tough to stay on top of.
Interested in your thoughts! Definitely not opposed to trying this out 😇
I think it might at least reduce the signal if not eliminate it when paired with the other pr.
The change in the other pr should still require regenerating types if graphql changes in the UI so we should still get signal but only when its relevant. If there are no graphql changes this pr ensure the types in the UI repo are up to date.
This change ensures that the UI always has the latest types (assuming the engineer started their branch off of a recent main branch rebase. So there will never be a codegen needed signal since the types should always be up to date
I encounter this a bunch :( I needed to bump types a few times in a few of my open prs last week which is what motivated this. |
Summary
evergreen-ci/uiwhen GraphQL schema files (graphql/schema/**) change onmainsdlschemasymlinks, runspnpm codegen, and opens a PR with the updated generated TypeScript typesTest plan
EVERGREEN_UI_TOKENsecret in repo settings with appropriate permissions onevergreen-ci/uimainand verify the workflow triggersevergreen-ci/uiwith updatedtypes.tsfiles🤖 Generated with Claude Code