You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I am afraid to say this was my doing, and it may be cold comfort when i say that i'm doing more to both fix this and prevent it from happening again. I'm sorry. there is a good ending here though.
The problem with that version is that python doesn't allow you to have an enum with duplicate values, and the location information was split across two enums so it was a bit error prone.
in linkml-runtime#310 I refactored that so Source and Format are contentless enums, and both the path and suffix information is stored in _Path. SOMEHOW i managed to update all the functions there except for URL_FOR. so now it is incorrectly using the enum rather than _Path.
THE BRIGHT SIDE: I caught this bug before it was release in linkml-runtime because i just got the action to run upstream tests against linkml-runtime to work - https://github.com/sneakers-the-rat/linkml-runtime/actions/runs/8531019215
and it correctly failed because RDFGenerator tries to resolve the metamodel context URI.
so while i am sorry to have caused this one, i will now work on fixing this one and making bugs like harder to cause in the future
The text was updated successfully, but these errors were encountered:
Thanks for the explanation and for catching it! And it's on us in the core to watch out for these, I am the one who approved it!
I have some ideas about how we can be strategic in our refactoring to avoid this kind of thing, if you want to join one of our Friday 1pm dev calls we can discuss...
Describe the bug
I am afraid to say this was my doing, and it may be cold comfort when i say that i'm doing more to both fix this and prevent it from happening again. I'm sorry. there is a good ending here though.
linkml_runtime.linkml_model.linkml_files
recently got a revamp: linkml/linkml-runtime#310That module is the source for a lot of top-level constants in
linkml
- notable for this bug islinkml.METAMODEL_CONTEXT_URI
.Currently it evaluates to https://w3id.org/linkml/meta.jsonld
you may notice that doesn't resolve. the correct URL is https://w3id.org/linkml/meta.context.jsonld
Our journey starts here:
linkml/linkml/__init__.py
Line 60 in 43e4feb
up through the latest release, 1.7.5, this would have given us the correct url using the
Source
andFormat
enums: https://github.com/linkml/linkml-runtime/blob/b01abb4a4f29b5433a4c0ed3575ac3f607542bbc/linkml_runtime/linkml_model/linkml_files.py#L92The problem with that version is that python doesn't allow you to have an enum with duplicate values, and the location information was split across two enums so it was a bit error prone.
in linkml-runtime#310 I refactored that so
Source
andFormat
are contentless enums, and both the path and suffix information is stored in_Path
. SOMEHOW i managed to update all the functions there except forURL_FOR
. so now it is incorrectly using the enum rather than_Path
.I actually added a test to ensure that all these URLs resolve: https://github.com/linkml/linkml-runtime/blob/e5d1886e827d7d9d4814535683276546d60abe18/tests/test_linkml_model/test_linkml_files.py#L114-L122 but marked it as skip until we are able to cache network requests, and didn't want to add that there bc i didn't want to do too much in one PR.
THE BRIGHT SIDE: I caught this bug before it was release in linkml-runtime because i just got the action to run upstream tests against linkml-runtime to work - https://github.com/sneakers-the-rat/linkml-runtime/actions/runs/8531019215
and it correctly failed because RDFGenerator tries to resolve the metamodel context URI.
so while i am sorry to have caused this one, i will now work on fixing this one and making bugs like harder to cause in the future
The text was updated successfully, but these errors were encountered: