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

Staging Subgraph Deployments on Each Pull Request #5

Open
0xferit opened this issue Feb 12, 2023 · 2 comments
Open

Staging Subgraph Deployments on Each Pull Request #5

0xferit opened this issue Feb 12, 2023 · 2 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@0xferit
Copy link
Member

0xferit commented Feb 12, 2023

Currently, we don't let pushes to the master branch, and only pull requests can be merged. Whenever a merge happens into master, this workflow runs and deploys a subgraph to production.

However, it would be great to see a staging deployment during a pull request, so reviewers can verify the data on staging deployment before merging to master. Ideally, each pull request should create its own staging environment.

A similar example would be Netlify deploy previews.

@0xferit 0xferit added the help wanted Extra attention is needed label Feb 12, 2023
@gratestas gratestas self-assigned this Mar 14, 2023
@gratestas
Copy link
Contributor

@0xferit we can design this process by splitting the workflow into two separate modules

Staging environment

  • 1 PR = 1 staging environment.
  • docker-compose.yml file specifies the configuration for the Graph Node, IPFS, and a testnet network.
  • Ethereum node provider endpoint is kept as a secret and passed to the config file as an environment variable.
  • Subgraph is deployed to a local instance of Graph node running in a Docker container.
  • The new deployment can be accessed via a URL endpoint provided in a comment on the PR
  • Requester tests and validates new changes, and opens a request for review

Production environment
The existing workflow will be slightly modified by using the workflow_dispatch event.

  • PR is reviewed and merged into the master by a repo maintainer.
  • The maintainer triggers the workflow manually by providing a network to which the subgraph should be deployed as input.

@0xferit
Copy link
Member Author

0xferit commented Mar 17, 2023

This looks good to me. Feel free to proceed if you want to implement this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants