Gitweb snapshot selective - #206
Conversation
62e35df to
667931e
Compare
|
FYI : the 6-patch set was submitted by e-mail using hints from #137 |
|
I see that https://public-inbox.org/git/[email protected]/#t never saw any replies. My best guess is that this is because the commit messages look more like Subversion-style oneliners than like the commits you usually find in the Git history. See for example https://public-inbox.org/git/[email protected]/T/#m47da28d57215cc937e202da0d81a6206b185d771. As you will readily recognize the commit message there makes kind of a case why this is a desirable change. It uses only one paragraph to do so, but there are plenty of examples in Git's commit history of commit messages that give quite a bit more background and motivation to the patches. You can also see that this patch series of two patches was introduced with a cover letter that explains the broader structure, and I would suggest that also for your patches. Also, you probably noticed that all patches have a sign off, please do the same. It may have been a busy time back then, too, maybe you want to wait until v2.22.0 is released (according to https://tinyurl.com/gitCal it is expected this Friday) and send a new iteration? |
|
@jimklimov v2.22.0 was released three weeks ago. Maybe now would be a good time? |
|
Hello, sorry this sort of fell out of the loop in the busy mailbox :) |
|
For now, rebased over current master and updated with Signed-off-by tags. I'll have to go over the commits and re-push later to make sense of what and why I wrote years ago ;) |
667931e to
df04b65
Compare
df04b65 to
c02395e
Compare
|
Reviewed (and rearranged a bit) the commit contents and updated their descriptions, although rather following the reasonable Problem/Solution pattern promoted in several ecosystems I'm in nowadays. Hope it makes sense here too :) |
c02395e to
8617f07
Compare
|
Unit-tests for these changes passed locally with |
51f31a2 to
ca1c557
Compare
|
Had a few iterations above for documentation - asciidoc not markdown, no |
I looked at the logs, and it seems to have been a (hopefully intermittent) timeout while getting the Homebrew cask. I restarted the build. |
|
In Travis I see this for one scenario: with Linux / Xcode: xcode10.1 C / jobname=GIT_TEST_GETTEXT_POISON but have little idea what that means so far. Seems I can reproduce locally however, with so will try to figure it out. |
|
Ok, so it seems the new tests which expect |
|
Looking at how this is my fault... per https://github.com/git/git/blob/master/git-sh-i18n.sh#L66 |
|
Yes... so it I wonder how else (better) such parsing can be handled... would it help (certainly would be "more correct" than what I PR'ed now) to export locale settings into |
|
Forcing |
|
It's curious how the Azure Pipeline passes, though. Any idea why? |
|
Not sure. Might run a different set of tests? Per test script, poisoned gettext is quite OS-dependent. I now lean towards turning a blind eye and accepting both HTTP 404 and 500 as valid outcomes for test (maybe depending on the envvar for poisoned mode), lacking a way to determine |
Well, you could have a look ;-) From the output of https://travis-ci.org/git/git/jobs/565980864 (you have to click open the "ci/print-test-failures.sh" part, then search for "not ok"): As indicated by the end of the log: If you do that, you will find that there is a That's no good. We clearly expect a 404 ("Not Found"), and instead get the totally unhelpful 500 ("Internal Server Error"). So what to do about this? In the least, a bit more investigation is in order. For example, 500 - Failed to transmit output from git-archive<br/><pre>fatal: # GETTEXT POISON #<span class="cntrl">\n</span></pre><br/>While it is not enough to say what is going wrong, it points a clear way forward how to debug this: put in debug print statements ( I could imagine, for example, that And yes, I do think that this needs to be fixed. We cannot simply show a 500 when a 404 is the right status to report. |
|
The answer I gave was to "unsure why it passed here and not there" part ;)
Thanks for the analysis, it seems to match my findings in many rounds of
`make check` and direct calls to test scripts locally.
Essentially the problematic case is that we get a zero-sized `stdout` (so
no info to glean from that) and an error message from the `git` program
with details.
With normal localization, the message we handle specially says that there
were no pathnames in the repo to git-archive matching the request, so it is
an HTTP-404 quite naturally. Other messages cause an unclassified internal
server error (500).
As far as I can see, `git` client exit codes do not point to specific error
conditions so are also rather useless here (at least was so with the
version I looked at; now I'm not with a computer to re-verify quickly). I
guess this too might be addressed directly, but could cause havoc for
decades of scripts relying on something else?.. Though *if* the choice is
"zero vs. nonzero" there is not so much to break. Having a clear exit code
used only for file-not-found cases would solve this PR's CI issue
regardless of locales.
With poisoned gettext we get the same blurb for anything normally reported
on `stderr`, so any error is a HTTP-500 by looking at face value. This is
the bit I wondered about cheating for CI script alone (if poisoned and got
500 then...).
With other locales than `C` or `en*` we probably do too get something not
expected, and I don't think I pushed a solution to that. I *think* now it
would be safe to just force the `C` LANG, LOCALE, LC_ALL etc. for gitweb.pl
calling the `git archive` and maybe restore the `ENV` afterwards (not sure
if this process ends just afterwards).
Jim
|
|
I wonder also if we could try |
|
And I see I haven't pushed up my latest iterations made before vacation, it seems ;) |
b065ad1 to
ba6d8ed
Compare
|
So, a few new cans of worms - but at least the selftest passed for me locally :)
|
ba6d8ed to
9752a1e
Compare
@jimklimov I know it has been a while, is this PR still on your radar? |
|
Oh, fell through the cracks I guess, across several workplace and FOSS project switches. And years. I guess the feature still makes sense (if nobody merged an equivalent yet), so I hope to take another look to tie up the loose ends. Did any git project side requirements change significantly during this time? IIRC one big issue was that this feature needed to differentiate causes of |
|
TBH I haven't paid attention to the gitweb side of things... |
|
Well, as far as this issue is concerned, gitweb is a consumer of Earlier this was torpedoed by lack of discerned exit code meanings and intentionally unreliable logged messages. I don't yet know if something changed during the years the PR was collecting dust - whether about these two ways (e.g. not so constraining anymore), or some others I don't know of (e.g. machine-parsable reliable output/log style?), or if some reasonable new wheel must be invented?.. Insights welcome to speed up the dive back :) |
A series of commits that add: