Fix for "Extracting compiled package archive failed" bug when uploading release with compiled packages #2446
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.
This situation exists if the bosh director already has a compiled package with a fingerprint and the cli is trying to upload a release that has two different copies of that same package with the same fingerprint using two different names. The current package matching logic only uses fingerprints to match, so the cli ends up removing both packages from the release before uploading it, but the director doesn't actually have compiled versions of both packages.
So instead, we now do not send the fingerprint in the matching response if there is a package in the release manifest that includes that fingerprint but was not successfully matched.
Reproduction steps:
Two compiled releases that share a common package name and fingerprint.
The second release contains a second copy of the package with a different name
Upload the first release
Upload the second release (with two packages)