Two streams with matching NSVCA

@leziri I think you confirmed our suspicion about the quoted stream values. It seems there was a yaml change from a string to an integer for the stream value:

-[ RECORD 1 ]--+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
content_ptr_id | 0cdb36bc-fc83-4557-8f5d-cbb482e7ec23
name           | scala
stream         | 2.1
version        | 820181213143541
context        | 2b79a98f
arch           | x86_64
dependencies   | [{"requires": {"platform": []}, "buildrequires": {"scala": [2.1], "platform": ["el8"], "javapackages-tools": [201801]}}]
artifacts      | ["hawtjni-runtime-0:1.16-1.module+el8+2477+516cbbff.noarch", "jansi-0:1.17.1-1.module+el8+2477+516cbbff.noarch", "jansi-native-0:1.7-5.module+el8+2477+516cbbff.x86_64", "jline-0:2.14.6-2.module+el8+2477+516cbbff.noarch", "scala-0:2.10.6-14.module+el8+2477+516cbbff.noarch", "scala-apidoc-0:2.10.6-14.module+el8+2477+516cbbff.noarch", "scala-swing-0:2.10.6-14.module+el8+2477+516cbbff.noarch"]
static_context |
snippet        | ---                                                                                                                                                                                                                                                                                                                                                                                                     +
               | document: modulemd                                                                                                                                                                                                                                                                                                                                                                                      +
               | version: 2                                                                                                                                                                                                                                                                                                                                                                                              +
               | data:                                                                                                                                                                                                                                                                                                                                                                                                   +
               |   name: scala                                                                                                                                                                                                                                                                                                                                                                                           +
               |   stream: 2.10                                                                                                                                                                                                                                                           

versus

-[ RECORD 2 ]--+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
content_ptr_id | 9ff2d9c8-ee0e-4016-9fdf-346a3091316f
name           | scala
stream         | 2.10
version        | 820181213143541
context        | 2b79a98f
arch           | x86_64
dependencies   | [{"requires": {"platform": []}, "buildrequires": {"scala": [2.1], "platform": ["el8"], "javapackages-tools": [201801]}}]
artifacts      | ["hawtjni-runtime-0:1.16-1.module+el8+2477+516cbbff.noarch", "jansi-0:1.17.1-1.module+el8+2477+516cbbff.noarch", "jansi-native-0:1.7-5.module+el8+2477+516cbbff.x86_64", "jline-0:2.14.6-2.module+el8+2477+516cbbff.noarch", "scala-0:2.10.6-14.module+el8+2477+516cbbff.noarch", "scala-apidoc-0:2.10.6-14.module+el8+2477+516cbbff.noarch", "scala-swing-0:2.10.6-14.module+el8+2477+516cbbff.noarch"]
static_context | f
snippet        | ---                                                                                                                                                                                                                                                                                                                                                                                                     +
               | document: modulemd                                                                                                                                                                                                                                                                                                                                                                                      +
               | version: 2                                                                                                                                                                                                                                                                                                                                                                                              +
               | data:                                                                                                                                                                                                                                                                                                                                                                                                   +
               |   name: scala                                                                                                                                                                                                                                                                                                                                                                                           +
               |   stream: "2.10"                                     

The only difference is the “stream” in the snippet.


To fix this, I see two options.

First, the workaround without database tinkering would be to change your repository mirroring policy to be “mirror complete”. For RHEL repositories you shouldn’t need to use additive – the Red Hat CDN keeps all versions of old RPMs around.

This would require republishing your content views though.

The second option would be to try deleting these duplicate entries out of the database. This may end up being unsafe, though. It’s also unclear if the quoted or unquoted stream is the correct one, so I suppose we could just pick the latest version.
@dralley would it be safe to delete the duplicate rpm_modulemd entries? Or are there too many related associations?