-
Notifications
You must be signed in to change notification settings - Fork 20
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
Return 404 for versioned I-D xml2rfc-style paths #157
Comments
Specification: Correct and should continue working:
In the following cases, the path should return 404:
This change ONLY applies to I-Ds. |
Yes, that’s the understanding |
For the sake of posterity, the existing logic was based on this requirement:
and was intentionally designed to handle any combination of identifier with/without |
New behavior (in effect after next version is deployed) described below. The path is used as a general example of any I-D path. No change:
Changed:
Conflict:
To make the last instance return 404, ideally bibxml-data-archive repository should not contain a versioned reference (the basic requirement is “any preexisting path must resolve to maintain backwards consistency”, and bibxml-data-archive is used as a snapshot of preexisting paths). If the above is OK, this can be closed. |
This is correct.
Correct.
This should not be marked as a conflict, and should be marked as correct. As described earlier, the versioned I-D has path pattern |
Fully understand. It's just that @TonyLHansen has clarified, after the resolver was completed, that the implementation should now only accept the two described patterns and treat the others as unacceptable. So we have to adjust the resolving mechanism. Thanks! |
@ronaldtse I see, apparently I have failed to read the spec carefully. Updated behavior is this:
|
There is an additional fix to be implemented, let me update this issue before closing. |
Nope, all good. Logic for validating given path: https://github.com/ietf-ribose/bibxml-service/blob/5a069257321652b8acd810e8ff28a89d1a4829d1/xml2rfc_compat/fetchers.py#L85-L94
If given ref has the version, PostgreSQL JSON lookup will only match the document with given version, otherwise it will retrieve all documents reverse-sorted by draft version number of which we’ll use the first one (largest version number): |
Looks like it’s working as expected now, closing. |
Thanks @strogonoff ! |
I have a problem with one of the examples above that doesn't match the agreed-to patterns: /public/rfc/bibxml-ids/reference.draft-weis-gdoi-iec62351-9.xml This doesn't have the "I-D" in it. It also has "draft-" without the "-nn" at the end. Is this example being accepted erroneously? I may have just gotten confused by all the back and forth. |
@TonyLHansen sorry for the confusion in general with this issue. I believe as @strogonoff stated:
This path is not accepted. |
Thanks for confirming, @ronaldtse |
Thank you @TonyLHansen for the patience! |
Based on https://github.com/ietf-ribose/relaton-data-ids/issues/6#issuecomment-1047774208
The text was updated successfully, but these errors were encountered: