The GitHub Actions job "CI" on 
rocketmq-dashboard.git/fix/cataloggen-verify-crlf has failed.
Run started by GitHub user zjncs (triggered by zjncs).

Head commit for run:
8661086917795bd9650a67207506781ec1e68efd / zjncs <[email protected]>
fix(rmqctl): tolerate working-tree CRLF in the catalog verify gate

go/format always emits LF, but a Git for Windows checkout with the
installer-default core.autocrlf=true smudges the generated catalog to
CRLF, so the byte-exact staleness comparison always failed and
catalog-generate needlessly rewrote the file with flipped EOLs. Pin the
working-tree line endings of Go files with a root .gitattributes entry
("*.go text eol=lf"), which fixes the verify gate and the rewrite in one
place without weakening the freshness check: verify stays byte-exact, so
a catalog committed with CRLF still fails -check.

Closes #5617

Signed-off-by: zjncs <[email protected]>

Review adjustments (lizhimins):
- Switched from normalizing both sides of the comparison to a root
  .gitattributes entry ("*.go text eol=lf"): it fixes the verify gate and
  the make catalog-generate rewrite in one place without weakening the
  freshness check (a CRLF-committed catalog still fails -check).
- Reverted generate/main.go to the byte-exact bytes.Equal comparison,
  with a doc comment recording why the gate stays EOL-strict; restored
  the trailing newline on main.go and verify_test.go (gofmt -l . is
  clean).
- verify_test.go now asserts the new semantics: CRLF drift is rejected,
  genuine staleness is rejected, and the *.go eol=lf pin is guarded by a
  test because CI checks out on ubuntu-latest where a dropped rule would
  never show.

Report URL: 
https://github.com/apache/rocketmq-dashboard/actions/runs/37900417383

With regards,
GitHub Actions via GitBox

Reply via email to