datopian / datahub-qa

:package: Bugs, issues and suggestions for datahub.io
https://datahub.io/
32 stars 6 forks source link

Showcase page has 5 identical graphs instead of 1 #94

Closed Mikanebu closed 6 years ago

Mikanebu commented 6 years ago

Showcase page has an identical 5 views. Please see https://datahub.io/Mikanebu/push-speed-62-1mb

How to reproduce

Expected behaviour

zelima commented 6 years ago

Should be fixed as soon as datasets are re pushed

AcckiyGerman commented 6 years ago

TESTED:

Will test again tomorrow ...

AcckiyGerman commented 6 years ago

TESTED:

Bug is FIXED.

rufuspollock commented 6 years ago

@zelima @AcckiyGerman please could briefly explain what the source of this bug was.

zelima commented 6 years ago

@rufuspollock it's explained here in details https://github.com/datahq/assembler/issues/82 + pasting here as well

The reason behind this was the latest change in getting the dp.json for original data. Since we wanted to include datapackage.json with original metadata (description, licence etc...) in ZIP resource, we decided to load original dp.json instead of creating it from the scratch see for derived resources https://github.com/datahq/assembler/issues/81.

So on the final step when we are loading derived resources to create final datapackage.json we were grabbing views for each derived resource and adding it to list of existing views - leading having as many views as many resources there were.

Now we are checking if view already exists and adding it only in case it does not https://github.com/datahq/assembler/commit/1032c55787cda11336c67a031f853d1b1bae20f0#diff-ff3afcb0e6f9707e861b766e1ff1494dR29