Skip to content

Report patch-stack modifications and stack identity - #20

Open
adunstan wants to merge 2 commits into
mainfrom
patch-stack-rework
Open

Report patch-stack modifications and stack identity#20
adunstan wants to merge 2 commits into
mainfrom
patch-stack-rework

Conversation

@adunstan

@adunstan adunstan commented Aug 12, 2026

Copy link
Copy Markdown
Member

The patch_stack.log diff compared filename sets, so a patch whose content
changed 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.pl 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.

Version skew is handled in both directions:

  • A log from a client predating the format marker still parses. There are no
    SHAs to compare, so no modification is reported — the page shows less rather
    than claiming something it cannot verify, and no Blob column appears.
  • Header lines carry no tab, which is what makes an unrecognised key invisible
    to an older parser: it matches neither the key: value pattern nor the
    tab-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.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant