-
Notifications
You must be signed in to change notification settings - Fork 85
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
Better support for local dev and CI workflows, so I can more easily test with a live gateway using the output of Managed Federation #695
Comments
--config supergraph.yaml
support for new supergraph check
, supergraph publish
and supergraph delete
commands
I'm a bit confused by the ask here. It seems there are maybe two asks?
|
(Btw I renamed the repo to multi-check-publish to avoid any branding confusion.) I agree with @EverlastingBugstopper 's breakdown above. And I'm not as convinced that point 1 is all that necessary—I'm exploring the ability to skip variants entirely for development workflows: https://github.com/lennyburdette/development-gateway |
Cool, sounds good. 👍 For (1) - reworded this issue to address better support for dev and CI workflows in general with some ideas. If there are underlying API changes needed to provide a better UX, let's sync with the Studio folks on what's needed. For (2) - split out #698 to support use of supergraph.yaml across multiple rover commands like docker-compose.
@EverlastingBugstopper Agree, a batch/atomic check makes sense for |
@lennyburdette https://github.com/lennyburdette/development-gateway seems to have similar goals to #479 that @ndintenfass suggested a while back. @abernix suggested: It would be really nice for a local dev gateway to simply watch a local
In https://github.com/lennyburdette/development-gateway it's doing a |
I was focused on making shared gateway development in a remote dev environment easier—especially the ability to share links or header values with QA or mobile teams so they can test against in-progress schema changes. I'm not super interested in solving the local gateway development story. I don't think it's common for teams to be able to proxy traffic to subgraph servers running in a remote cluster (or to run all the subgraphs locally). But if you did want a decent local story before "scripts": {
"watch:rover": "nodemon --exec 'rover supergraph compose --config supergraph.yaml > supergraph.graphql' --watch ./schemas -e .graphql",
"watch:server": "nodemon src/index.js -e .graphql --ignore ./schemas",
"watch": "concurrently 'yarn watch:server' 'yarn watch:rover'"
} and running |
This is along the lines of thinking we've had for Apollo Server. And similarly, the Router. |
Oh, and you can get hot-reloads of a supergraph.yaml already today. I have it enabled by default in my container experiment: |
Ah, that's pretty good. At some point, I could see us taking a file path as the |
@lennyburdette for shared gateway dev, wonder if Granted not everyone is using k8s, but for those who are you mentioned skaffold the other day and that might work well with https://skaffold.dev/docs/pipeline-stages/deployers/kustomize/. Then for the dev headers you could just setup your ingress to route to the appropriate dev gateway. Not as dynamic / ephemeral as what you have going in devgateway, but might work for many use cases. |
^ This feels like something that should maybe be solved w/the new router implementation
I think I'd want to be able to run another native Rover command rather than have to curl a random URL. That makes me think we'd want to be able to run Today, As part of
One problem here is that I think we would want To fit the graph ref extension elsewhere:
I think we need Gravity's expertise on this one - aanndd it might honestly just be #698 in a trench coat? |
closing this as there is much more recent internal discussion on this topic, and #1190 is WIP |
Problem
Doing smoke tests on a real live gateway during local dev and in CI workflows is helpful to ensure things are working end-to-end beyond just schema checks.
This is easy to do on your local laptop with
rover supergraph compose
or in a CI workflow by passing thesupergraphSDL
directly to the Gateway e.g. via docker volume mount.However, doing e2e tests in local dev or in CI with managed federation requires obtaining and then publishing all subgraphs to the Apollo Registry and then spinning up a gateway in a CI workflow that pulls the resulting supergraph from the Apollo Uplink. There are some issues with this approach, where managed federation build delays could result in the gateway accidentally picking up an older supergraph schema (and passing tests incorrectly), unless you're starting with a fresh dev/CI variant.
Alternate Solutions / Workarounds
Try to get a fresh dev/CI variant using something like:
The supergraph-demo has a set of scripts for CI:
supergraph.yaml
config from subgraphs.sh variables@lennyburdette has created a helper https://github.com/apollosolutions/roverx that makes it easier to:
roverx supergraph publish --config supergraph.yaml
- publish all subgraphsTry to skip variants entirely for dev workflows
Along these lines: https://github.com/lennyburdette/development-gateway
What can we do to help?
Support a clean way to do e2e tests with the results of managed federation in:
on.pull_request
andon.push
, to run e2e smoke tests on a live gateway using managed federation build resultsSome ideas:
subgraph check
returns a url to download a supergraph built using managed federationThe text was updated successfully, but these errors were encountered: