-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check full stream equality when deduplicating #304
Check full stream equality when deduplicating #304
Conversation
Comparison of the XMDs were accidentally returning the opposite truth value. Signed-off-by: Stephen Gallagher <[email protected]>
Previously, we assumed that any two streams having the same NSVCA were identical. Now we can actually test for full equality before dropping one while deduplicating. Note that this will result in a hard failure if they aren't identical, because this means that the enabled repositories are providing conflicting data. Fixes: fedora-modularity#188 Signed-off-by: Stephen Gallagher <[email protected]>
@sgallagher My understanding is that the behavior you want to break is why we're even using YAML in the first place? The free-form merging to allow a module to grow with multiple sources was one of the points brought up against changing the output format to XML. What changed your mind about disabling that behavior? |
@Conan-Kudo I think you misunderstand. The NSVCA ( The problem is if you have two different repos both claiming to define |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this makes sense, and makes it easier to reason modules. However, now I want XML modulemd for repodata again... :)
@sgallagher It was previously explained to me that it was intentionally possible to do that, and that the intent was that the documents would be merged on the fly to create a module superset (which is incredibly difficult to reason out!) that could be installed with content from both repositories. |
@Conan-Kudo Who said that to you? This has never been true (or intended) so far as I'm aware. |
@sgallagher You and @contyk two months ago. |
@Conan-Kudo It's possible that you misunderstood when I was talking about merging content into the ModuleIndex. It is supported that different streams might come from different repos, but never that the YAML for a specific NSVCA would come from two different places. That would be madness! |
Previously, we assumed that any two streams having the same NSVCA
were identical. Now we can actually test for full equality before
dropping one while deduplicating. Note that this will result in a
hard failure if they aren't identical, because this means that the
enabled repositories are providing conflicting data.
Fixes: #188
Signed-off-by: Stephen Gallagher [email protected]
@Conan-Kudo Can I get your opinion on whether it's acceptable to treat this as a hard failure? In the unlikely event that two repositories (or the same repository) are providing two
modulemd
documents with the same NSVCA but different content elsewhere, I don't think there's any fail-safe way to pick one over another, so I think our only option is to return an error.Also includes a dependent fix being tracked and reviewed in #303