-
Notifications
You must be signed in to change notification settings - Fork 503
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
Take redirections into account in UrlChecker
#3586
base: main
Are you sure you want to change the base?
Take redirections into account in UrlChecker
#3586
Conversation
UrlChecker
UrlChecker
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3586 +/- ##
==========================================
- Coverage 89.80% 89.75% -0.05%
==========================================
Files 174 174
Lines 5031 5068 +37
Branches 445 502 +57
==========================================
+ Hits 4518 4549 +31
- Misses 513 519 +6 ☔ View full report in Codecov by Sentry. |
How about allowing two recursive calls instead of just one? It should work for the lettuce case then, right? |
I think so. But when it comes to recursion, it may promptly become three calls, and so on. IMHO, it is beneficial to sort out these scheme-related things when preparing metadata from Coursier. This might be helpful in other places besides |
Three calls would be okay for me, too. The benefit of allowing two calls is that it "fixes" the lettuce case without modifying the scheme.
I don't see how it would be beneficial. From my perspective merging this PR with two recursive calls would be better than merging this PR as-is and #3583 because it results in less LOC that needs to be maintained. |
This PR aims to increase the likelihood of URLs (such as those related to release notes) being propagated into PR descriptions. In #3583, I noticed that we omit URLs in the description of the final PR when facing redirections on GitHub, GitLab, etc. While it may seem that the current PR supersedes the mentioned one, I’m confident it does not — and here’s why.
In the first request, we simply received a tweak to the URL’s Scheme (http->https). In the second request, however, we encountered an actual redirection to the existing resource. FWIW, an attentive reader may notice that these two redirections are handled by different middleware (HTTP/1.1 vs HTTP/2).
As always, I'm open to any concerns or suggestions to help drive this to merge.