Subgraph Compositions: Validations#5770
Subgraph Compositions: Validations#5770incrypto32 merged 1 commit intokrishna/sgc-multiple-sg-sources-fixfrom
Conversation
| type TestEntity @entity { id: ID! } | ||
| "#; | ||
| const GQL_SCHEMA_FULLTEXT: &str = include_str!("full-text.graphql"); | ||
| // const SOURCE_SUBGRAPH_MANIFEST: &str = include_str!("source.yaml"); |
There was a problem hiding this comment.
minor thing - remove the comment.
b6f7492 to
640e7d1
Compare
ee37a70 to
3944111
Compare
14671db to
640e7d1
Compare
| ); | ||
| } | ||
|
|
||
| #[tokio::test] |
There was a problem hiding this comment.
Taking a second look at this PR, why is this test removed?
There was a problem hiding this comment.
Two reasons:
- The test is redudant - Everything this test does is done by the integraiton test
- The test keeps failing because it requires an actual source subgraph.. and some refactoring of the code is required to actually deploy a dummy source subgraph just for the validation to work. But in reality in runner test we mock the triggers and push the triggers directly and no source subgraph is actually needed.
SO i felt its just better to remove this test since, everything this test does is already done by the integration test and the work required to just make the new valdiations work with runner tests is probably unneccessary considering 1.
There was a problem hiding this comment.
Nice! Thanks for the explanation!
ae35584 to
799a3e9
Compare
06edc2b to
f38680e
Compare
799a3e9 to
b98760f
Compare
b98760f to
04a8e95
Compare
| .map(Arc::new) | ||
| } | ||
|
|
||
| #[allow(dead_code)] |
| )); | ||
| } | ||
|
|
||
| let pruning_enabled = match source_manifest.indexer_hints.as_ref() { |
There was a problem hiding this comment.
pruning can also be set outside of the manifest right? Is there are a way we check that too?
| } | ||
|
|
||
| impl UnresolvedDataSource { | ||
| fn validate_mapping_entities<C: Blockchain>( |
There was a problem hiding this comment.
Could you add some tests for this as well?
mangas
left a comment
There was a problem hiding this comment.
Approve to unblock. As discussed, there are a few considerations:
- Pruning can also be run through graphman so we should try and avoid running composition if a subgraph was pruned (while not having that hint on manifest)
- The manifest hints, are hints. Therefore, it could (maybe should?) be possible to deploy the source subgraph WITHOUT pruning even though it has an indexing hint that suggests it be used.
- As this is a corner case I think it would be ok to document the issues and get back to them once we have the bulk of the work merged and working for the general case.
197b18d to
2a45671
Compare
04a8e95 to
18410ef
Compare
e28ab16 to
4a290bf
Compare
18410ef to
cb0f57e
Compare
4a290bf to
432ba56
Compare
cb0f57e to
5d2e3c8
Compare
c82c6cf
into
krishna/sgc-multiple-sg-sources-fix
No description provided.