Skip to content
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

Switch to schema-push model (rather than schema-pull) #195

Open
nickcampbell18 opened this issue Jan 18, 2022 · 5 comments
Open

Switch to schema-push model (rather than schema-pull) #195

nickcampbell18 opened this issue Jan 18, 2022 · 5 comments

Comments

@nickcampbell18
Copy link
Contributor

nickcampbell18 commented Jan 18, 2022

Currently, the docs site pulls schema from different URLs at build time. This has a few consequences:

  1. Occasionally it fails - Fail deployment when fetching of external documentation fails #157
  2. I can't go back in Git history on this repo to see when a docs change was made
  3. The GitHub action does not seem to rebuild the slug if the source sha has not changed (this might be a recent thing, but if you run the action it doesn't seem to do anything now)

I propose we switch to a schema-push model. I've used this successfully in the past - it's a more explicit workflow that allows better auditing of behaviour. It looks like this:

  • Every repo which contributes schema has a GitHub action or CI job on the main branch.
  • If their main branch passes, it pushes the relevant schema files into this repo (either directly onto the main branch or opening a PR, like this).
  • When this repo build is green, it autodeploys.

Benefits of this approach:

  1. If a build fails, we get a notification - the developer can then proactively fix their schema/docs
  2. I can go back through Git history to see what the docs looked like at a particular time
  3. Deployment is automatic - developers know that their schema will eventually be deployed (we could even have a Slack notification when it happens)

Downsides:

  1. Main branch is very noisy with lots of automatic schema file changes
@nickcampbell18
Copy link
Contributor Author

@jalyna thoughts? These are some reflections from explaining to @psteininger how the current system works

@jalyna
Copy link
Member

jalyna commented Jan 18, 2022

@nickcampbell18 This is a really nice suggestion. This was the very first approach, when we only had one 2 Apps. So I think we should invest some time to improve this.

@nickcampbell18
Copy link
Contributor Author

Do you have a preference for GitHub action vs CircleCI orb? I can probably bring across some of the code I wrote before to do this...

@psteininger
Copy link
Contributor

No preference whatsoever. I think that whichever looks less complex to comprehend.

@jalyna
Copy link
Member

jalyna commented Jan 18, 2022

I would believe that github actions might be easier here but just an assumption.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants