Report patch-stack modifications and stack identity - #20
Open
adunstan wants to merge 2 commits into
Open
Conversation
The patch_stack.log diff compared filename sets, so a patch whose content changed under an unchanged filename produced no diff at all -- which made it hard to tell what a given run had actually tested. Clients now send a blob SHA per patch under a declared format marker. Compare SHAs as well as names and report modifications. A log from a client that predates the marker still parses; there are no SHAs to compare in that case, so modifications are simply not reported rather than guessed at. Move both routines into perl5/PatchStackLog.pm. They are pure text processing, needing neither a database handle nor a web request, so they had no business inline in a CGI. Keeping them separate also leaves them callable from a test script.
The report page showed only source and status, so there was nothing on it identifying which revision of the stack a run had tested. Show the series identity and the patches-repo commit, add a per-patch blob SHA column, and render modified patches alongside added and removed ones. The SHA column appears only when the client sent SHAs, so a report from a client that predates the format marker renders as it did before.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
patch_stack.logdiff compared filename sets, so a patch whose contentchanged under an unchanged filename produced no diff at all — the report could
only ever show additions and deletions. Nothing on the page identified which
revision of a patch stack a given run had tested, either.
Clients now send a blob SHA per patch under a declared format marker, along
with the patches-repo commit that was used. This parses that, reports modified
patches alongside added and removed ones, and renders the stack identity on the
build report.
Both routines move out of
cgi-bin/show_log.plintoperl5/PatchStackLog.pm.They are pure text processing, needing neither a database handle nor a web
request, so they had no business inline in a CGI.
Version skew is handled in both directions:
SHAs to compare, so no modification is reported — the page shows less rather
than claiming something it cannot verify, and no Blob column appears.
to an older parser: it matches neither the
key: valuepattern nor thetab-delimited patch pattern.
This should land before the corresponding client-code change (PGBuildFarm/client-code#43), which is
inert until a server can render what it sends.