[SUBGRAPH WORKFLOWS] Use matrix for multi-vendor|network deployment
d10r opened this issue · 3 comments
What
If deploying to multiple networks and/or vendors via GH workflow, a matrix (ideally 2-dimensional) is used to map each deployment (vendor & network) to a job
AC
- When running the workflow to deploy a subgraph, with network set to "all", the actual deploy step for each network is run as its own job
- no manually maintained redundant list of networks per vendor which could get out of sync
- it's still possible to deploy to all networks for a given vendor without using a GH workflow
How
The workflow https://github.com/superfluid-finance/protocol-monorepo/blob/dev/.github/workflows/handler.deploy-production-subgraphs.yml currently just forwards the job of iterating through "all" networks to https://github.com/superfluid-finance/protocol-monorepo/blob/dev/packages/subgraph/tasks/deploy.sh.
That script contains then figures out what "all" means for the given vendor and iterates through them.
We instead want to dynamically create a matrix of networks to be used if "all" networks are selected, and map the deployment step to a job for each. The dynamic part is needed in order to avoid having to maintain redundant mappings in the subgraph package and in a workflow file.
@mmd-afegbua is it still done; if not, it still worth doing?
Implementation of this was de-priotized because of the switch to Goldsky as we needed to perfect how to deploy and promote new subgraphs there. I've done that, we can now start working on this.
Pull request ready for review: #2003