-
Notifications
You must be signed in to change notification settings - Fork 603
fix: Rev Fix Option 2 - Htmlized url regex #9538
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
Conversation
Removing single value revision numbers as that is against the naming standard (https://authors.ietf.org/naming-your-internet-draft#version) and causes issues with htmlized documents with -1 in the name (eg draft-ietf-oauth-v2-1)
Directly insert Regex for REV rather than reference settings.URL_REGEXPS. This is to resolve issue ietf-tools#9533
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9538 +/- ##
==========================================
+ Coverage 88.75% 88.85% +0.10%
==========================================
Files 320 319 -1
Lines 41834 41807 -27
==========================================
+ Hits 37128 37149 +21
+ Misses 4706 4658 -48 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
This patch looks like it will improve the use case that motivated it without making the other edges worse. The branch survived a test crawl (a sample of a full crawl, but it's served us well in the past to expose unexpected behavior early). One point to note: In Lines 1212 to 1253 in c718718
There is one bit of code that will never be executed when called from Lines 1229 to 1231 in c718718
Arguably the real bug (or one facet of it) is those 3 lines, but the heuristic logic to deal with determining whether a string ending with a single or double digit is an attempt to reference the unversioned name of a document or a specific version of a document is currently spread between views that call each other and workarounds in those views compete with each other to introduce new unintended behavior. (If we could send messages back to the past, I think we'd strongly discourage overloading URL path segments with "this could be a name, or it could be a name with a version" entirely, but that expectation has been pushed into so many places, changing it is unfeasible). But as noted in the issue, the workaround in this PR is making one case better without obviously making other cases worse, and unless a second set of eyes on it turns up something, I expect to merge it. When we rebuild these views, further moving these heuristics into a place where the effect of changes can be tested more easily than they can be now will happen. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree that this fixes the corner case without much risk of breaking in unexpected places.
Removing single value revision numbers as that is against the naming standard (https://authors.ietf.org/naming-your-internet-draft#version) and causes issues with htmlized documents with -1 in the name (eg draft-ietf-oauth-v2-1).
Second Option - Update htmlized URL Ref directly