Skip to content

Conversation

Jannis
Copy link
Contributor

@Jannis Jannis commented Sep 2, 2019

This PR fixes a couple of things:

  1. Existing apiVersion migrations are updated to replace all apiVersion occurrences. Before, only the first would be replaced.

  2. --skip-migrations is now properly passed on to the compiler. For some time, it wasn't.

These fixes are necessary for daostack/subgraph#318 to work.

Another change made in this PR is that during a graph build --ipfs ... and graph deploy, files are only uploaded to IPFS once. Any repeated upload attempts simply pick the IPFS hash from a short-lived cache. This speeds up build/deploy for subgraphs that reuse ABIs or mappings across many data sources (like DAOstack).

The previous implementation of the migrations only replaced the first
occurrence, which is obviously not correct.
This caused migrations to run even when `--skip-migrations` was passed
to commands on the command-line.
This speeds up uploading subgraphs that reuse the same mappings and ABIs
across many data sources.
@Jannis Jannis requested a review from a team September 2, 2019 13:07
@Jannis Jannis self-assigned this Sep 2, 2019
@Jannis
Copy link
Contributor Author

Jannis commented Sep 2, 2019

I'm going to take the liberty and merge this.

@Jannis Jannis merged commit 4c29d86 into master Sep 2, 2019
@Jannis Jannis deleted the jannis/daostack-fixes branch September 2, 2019 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant