Closed rgdeen closed 3 months ago
@rgdeen the intended functionality for the requirement was strict matching with the name
value. I will create a new requirement to support less strict matching (Aliases, additional whitespace/dashes/etc.)
I'm somewhat ambivalent about things like dashes not matching, but matching aliases would be greatly appreciated. Thanks!
Since this is a new requirement, not a bug, closing for #970
Checked for duplicates
Yes - I've already checked
🐛 Describe the bug
I was running some m20 validations for testing, with the latest validate (3.5.1) and there is a new warning type, warning.label.context_ref_mismatch, which is problematic.
The warnings look like this:
Now, we have a problem because for m20 ecam, we specifically use the "instrument:mars2020.ecam" context product, which covers a whole bunch of individual cameras, and then use under Observing_System_Component to say exactly which camera it is. (BTW, this is another good use case for the instrument-host-hierarchy SCR (#20)).
This could be solved by adding a bunch of Aliases to the context product. However... validate seems to ignore these. I found that the InSight spacecraft context product has an alias (nsyt). So I hacked up a sample label to use it:
Validates fine with name=InSight. But if I put in name=nsyt, which is an alias in the context product, it fails. From the context product:
🕵️ Expected behavior
I expected context-product aliases to be honored in this new warning. If it doesn't, what is the purpose of an Alias?
I realize this warning can be turned off by --disable-context-mismatch-warnings ... but we should not have to do that.
I also realize that the m20 context products all need to be updated to include the relevant aliases, but there's not much point in that until validate is fixed.
📜 To Reproduce
Take just about any label and add the OSC paragraph shown above, for insight. Change name to 'nsyt' instead of 'InSight' to show that the aliases are not honored. (note, it does not have to be an insight product to do this).
🖥 Environment Info
linux
📚 Version of Software Used
validate 3.5.1
🩺 Test Data / Additional context
No response
🦄 Related requirements
🦄 #xyz
⚙️ Engineering Details
No response
🎉 Integration & Test
No response