Skip to content
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

Reference-listing path for draft-arkko-farrell-arch-model-t steers to XML instead of document in output files #378

Open
1 task done
lbartholomew-rpc opened this issue Nov 2, 2023 · 20 comments
Labels
bug Something isn't working

Comments

@lbartholomew-rpc
Copy link

Describe the issue

Path in the XML file is typical:
https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.arkko-farrell-arch-model-t.xml

but for draft-arkko-farrell-arch-model-t, the link is unusual -- includes "api/v1/":
Output for
https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.arkko-farrell-arch-model-t.xml
on https://www.rfc-editor.org/authors/rfc9464.html is
https://datatracker.ietf.org/api/v1/doc/document/draft-arkko-farrell-arch-model-t/

as compared to output for
https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-tls-esni.xml on
https://www.rfc-editor.org/authors/rfc9462.html
which is as it should be:
https://datatracker.ietf.org/doc/html/draft-ietf-tls-esni-17

Code of Conduct

@lbartholomew-rpc lbartholomew-rpc added the bug Something isn't working label Nov 2, 2023
@lbartholomew-rpc
Copy link
Author

Forgot to add that the file that contains the problem draft link is RFC-to-be 9464, which is otherwise ready to be published as an RFC, so publication will have to be delayed until (1) this issue is fixed or (2) we ask the authors if they want to remove draft-arkko-farrell-arch-model-t from the references list and they decide to do so.

@rjsparks
Copy link
Member

rjsparks commented Nov 2, 2023

The source of truth at https://datatracker.ietf.org/doc/bibxml3/reference.I-D.arkko-farrell-arch-model-t.xml points to the correct place.

@rjsparks
Copy link
Member

rjsparks commented Nov 2, 2023

@lbartholomew-rpc - consider changing the source document to point to https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.draft-arkko-farrell-arch-model-t-04.xml instead

@lbartholomew-rpc
Copy link
Author

Hi, Robert.
Re. "The source of truth at https://datatracker.ietf.org/doc/bibxml3/reference.I-D.arkko-farrell-arch-model-t.xml points to the correct place." -- this didn't work for me.

Re. pointing to https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.draft-arkko-farrell-arch-model-t-04.xml instead -- this worked. Is there something special that we need to know re. whether or not to include "draft-" and/or the version number? Thanks.

@rjsparks
Copy link
Member

rjsparks commented Nov 2, 2023

leaving out both draft- and the version number gives you a pointer to a pronoun that will resolve to whatever the current version is at the time you reference it. Providing draft- and the version number will always resolve to that specific version.

@lbartholomew-rpc
Copy link
Author

lbartholomew-rpc commented Nov 2, 2023 via email

@kesara
Copy link
Member

kesara commented Nov 3, 2023

@stefanomunarini Do you have any insight into the target in https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.arkko-farrell-arch-model-t.xml has the API call URL?

@stefanomunarini
Copy link
Collaborator

@kesara I guess this question should be asked to the Datatracker team, instead.

The bibxml-service simply sends a request to the Datatracker APIs and extracts this piece of data from the response without any sort of manipulation whatsoever (see here).

@kesara
Copy link
Member

kesara commented Nov 4, 2023

@stefanomunarini there must be somewhere else in the BibXML service which manipulates this URL.
For example, https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.cuiling-dnsop-sm2-alg.xml has recent drafts. This has the correct target URL.

https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.arkko-farrell-arch-model-t.xml has the following in the header:

x-resolution-outcomes: ;InternetDraftsAdapter: using query (@.type == "Internet-Draft") && (@.id like_regex "draft\-arkko\-farrell\-arch\-model\-t\-[[:digit:]]{2}") -> returning Datatracker version 04,;

While https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.cuiling-dnsop-sm2-alg.xml has

x-resolution-outcomes: ;InternetDraftsAdapter: using query (@.type == "Internet-Draft") && (@.id like_regex "draft\-cuiling\-dnsop\-sm2\-alg\-[[:digit:]]{2}"),;

For some reason, BibXML thinks there's a newer version in datatracker. See https://github.com/ietf-tools/bibxml-service/blob/main/bibxml/xml2rfc_adapters.py#L295

BTW if BibXML thinks there's a newer version, BibXML shouldn't return the API URL rather use the data from API call to get the latest URL.

@rjsparks
Copy link
Member

rjsparks commented Nov 4, 2023

@stefanomunarini Read further up issue. The datatracker is NOT returning the api as the target as the links already above show.

@stefanomunarini
Copy link
Collaborator

For some reason, BibXML thinks there's a newer version in datatracker. See https://github.com/ietf-tools/bibxml-service/blob/main/bibxml/xml2rfc_adapters.py#L295

BTW if BibXML thinks there's a newer version, BibXML shouldn't return the API URL rather use the data from API call to get the latest URL.

You're right, In fact the bibxml-service is returning this warning when retrieving this draft:

Returning Datatracker result for xml2rfc bibxml3 path. If unversioned I-D was requested, then Datatracker may have a newer I-D version than indexed sources. Alternatively, indexed version could not be used for some reason. Requested version None, indexed sources have version 02, returning Datatracker’s version 04.

bibxml-service does not manipulate the value itself, however it uses a callback to retrieve the most recent version of an ID document, using the Datatracker APIs.

In this particular case, Datatracker has version 4 of this Internet Draft, while the service is only indexing version 2 of the same draft.

I am investigating why this is happening, and also why the Datatracker API URL is used in these cases.

@strogonoff
Copy link
Collaborator

It looks like we may be matching draft-arkko-farrell-arch-model-t-<number>-additions[-<number>] by mistake. The regular expression by this link from @stefanomunarini may be missing end of string marker:

query = (
'(@.type == "Internet-Draft") && '
r'(@.id like_regex "%s[[:digit:]]{2}")'
% re.escape(f'draft-{unversioned}-')
)

If it was [[:digit:]]{2}$ then it would only match draft-arkko-farrell-arch-model-t-<two digits> .

@strogonoff
Copy link
Collaborator

strogonoff commented Nov 15, 2023

We should also clarify in the code that the two digits are intended to represent possible I-D versions.

@TonyLHansen
Copy link

should the {2} be {2-3} (or whatever the syntax is) ? I can't find any examples right now of drafts that went over 99, but I definitely found examples of ones that went to 99.

@rjsparks
Copy link
Member

rjsparks commented Nov 15, 2023

No - we've never had > 99 in the repo/archive to my knowledge. And the datatracker only knows things up to 99.
I'm pretty sure the IESG forced a rename before going to 100 in the most recent case you may remember.

That said, trying to find versions at the end of drafts by regular expression alone is almost impossible. There is some backtracking you have to do (we've done it with iteration in python) because things like draft-foo-bar-802-11-00 exist.

(Real example: https://datatracker.ietf.org/doc/html/draft-ietf-tsvwg-ieee-802-11-11)

@stefanomunarini
Copy link
Collaborator

stefanomunarini commented Nov 17, 2023

That said, trying to find versions at the end of drafts by regular expression alone is almost impossible. There is some backtracking you have to do (we've done it with iteration in python) because things like draft-foo-bar-802-11-00 exist.

query = (
'(@.type == "Internet-Draft") && '
r'(@.id like_regex "%s[[:digit:]]{2}")'
% re.escape(f'draft-{unversioned}-')
)

In this case, draft-foo-bar-802-11 is the name of the document (variable unversioned in the snippet). With the regex we are able to match the version(s) at the end of the string.

Or am I not getting something else here? @rjsparks

@rjsparks
Copy link
Member

How do you deal with the string draft-ietf-tsvwg-ieee-802-11? Do you try to treat that as version 11 of draft-ietf-tsvwg-ieee-802? Or is something keeping the string from getting to that regex?

More concretely, see https://bib.ietf.org/public/rfc/bibxml-ids/reference.I-D.ietf-tsvwg-ieee-802.xml and note that the returned anchor is incorrect - there is no such thing as I-D.ietf-tsvwg-ieee-802.

@stefanomunarini
Copy link
Collaborator

stefanomunarini commented Nov 21, 2023

How do you deal with the string draft-ietf-tsvwg-ieee-802-11? Do you try to treat that as version 11 of draft-ietf-tsvwg-ieee-802? Or is something keeping the string from getting to that regex?

bibxml-service treats requests for VERSIONED and UNVERSIONED documents differently. The query above is used to retrieve the latest version of the requested unversioned documents, using the full string (in this case draft-ietf-tsvwg-ieee-802-11). If there is a version N indexed in the service, draft-ietf-tsvwg-ieee-802-11-N is returned.

More concretely, see https://bib.ietf.org/public/rfc/bibxml-ids/reference.I-D.ietf-tsvwg-ieee-802.xml and note that the returned anchor is incorrect - there is no such thing as I-D.ietf-tsvwg-ieee-802.

This is a different issue I think. I can see ietf-tsvwg-ieee-802 is actually indexed in the service.

Should this not be the case, can you @rjsparks please open a new issue? Thanks

@alicerusso
Copy link

This issue seems to currently affect
https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-regext-rdap-geofeed.xml
which contains an incorrect target:
target="https://datatracker.ietf.org/api/v1/doc/document/draft-ietf-regext-rdap-geofeed/"

@rjsparks
Copy link
Member

rjsparks commented Aug 7, 2024

That draft is not falling victim to the version matching problem, but is still spitting out a reference to the v1 api. @stefanomunarini what did you discover about where that's coming from.
It's not coming from the datatracker's feed to the bibxml service - see https://datatracker.ietf.org/doc/bibxml3/reference.I-D.ietf-regext-rdap-geofeed.xml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants