This repository has been archived by the owner on Aug 14, 2020. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In da56c93 we introduced an optimization to avoid going through all the
layers every time we need the index of a specific one.
However, this resulted in incorrect Image Manifests being generated.
In f8e82fa we attempted to fix this. We assumed that the mistake was
that the index we used was supposed to be reversed (from the end instead
of from the beginning of the layer list). This assumption was wrong. and
was probably motivated by the name of the map (
reverseLayers
).The problem was that there can be several layers with the same BlobSum
(layerID) but different manifest and when we populated the map, we were
storing the last one for a given BlobSum. This is not what we were doing
previously, instead we were returning the first match.
Fix this by storing the first appearance of a BlobSum. Also, change the
name of
reverseLayers
tolayersIndex
.