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 PR fixes a problem with the new system of building Flatpaks directly with on the builders, rather than using OSBS. The new koji-flatpak plugin doesn't set 'container_koji_task_id' in the extra metadata for the build, which broke content type detection.
See https://pagure.io/releng/issue/11697
There would be more simple ways of fixing things, but I tried to clean up a bit, rather than just leaving things broken so that unknown image types (all images aren't containers or Flatpaks...) were detected as RPM packages.
The cleanup only goes so far - I've left the test case for the new error catching a 500, rather than trying to cleanly catch this in the validatators. This was because I was pretty stumped at how to fit it in - there are multiple code paths that directly or indirectly call infer_content_class() (at least validate_acls and validate_build_uniqueness).
I've also switched the code from extra['image'] to extra['typeinfo']['image'], since that's been the preferred location for the metadata for quite some time.