Skip to content

CI/GnuComment: enhance PR commenting logic to update existing comments#11763

Merged
sylvestre merged 2 commits intouutils:mainfrom
xtqqczze:GH11761
Apr 13, 2026
Merged

CI/GnuComment: enhance PR commenting logic to update existing comments#11763
sylvestre merged 2 commits intouutils:mainfrom
xtqqczze:GH11761

Conversation

@xtqqczze
Copy link
Copy Markdown
Contributor

@xtqqczze xtqqczze commented Apr 12, 2026

Closes #11761

Summary

Update GNU testsuite comment workflow to edit a single bot comment instead of creating new ones on each run.

Key change

  • Introduce a hidden marker (<!-- gnu-comment-bot -->) to identify bot-generated comments.
  • Only comments with this marker are updated, so this applies to new comments going forward (existing comments remain unchanged).

@xtqqczze
Copy link
Copy Markdown
Contributor Author

@sylvestre How can we test this?

@github-actions
Copy link
Copy Markdown

GNU testsuite comparison:

Skipping an intermittent issue tests/tail/tail-n0f (passes in this run but fails in the 'main' branch)
Note: The gnu test tests/printf/printf-surprise is now being skipped but was previously passing.
Congrats! The gnu test tests/cut/cut-huge-range is now passing!

@github-actions
Copy link
Copy Markdown

GNU testsuite comparison:

Skip an intermittent issue tests/date/resolution (fails in this run but passes in the 'main' branch)
Skip an intermittent issue tests/pr/bounded-memory (fails in this run but passes in the 'main' branch)
Skip an intermittent issue tests/tail/symlink (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/tail/tail-n0f (passes in this run but fails in the 'main' branch)
Note: The gnu test tests/cp/link-heap is now being skipped but was previously passing.
Note: The gnu test tests/cut/bounded-memory is now being skipped but was previously passing.
Note: The gnu test tests/seq/seq-epipe is now being skipped but was previously passing.
Congrats! The gnu test tests/cut/cut-huge-range is now passing!

@oech3

This comment was marked as outdated.

@xtqqczze xtqqczze marked this pull request as ready for review April 12, 2026 12:21
@sylvestre
Copy link
Copy Markdown
Contributor

let's see what happens

@sylvestre sylvestre merged commit bd0ace3 into uutils:main Apr 13, 2026
167 checks passed
@cakebaker
Copy link
Copy Markdown
Contributor

It looks like there is a bug (see https://github.com/uutils/coreutils/actions/runs/24334867494/job/71049096034#step:4:44):

Error: ENOENT: no such file or directory, open './result.txt'
    at Object.openSync (node:fs:560:18)
    at Object.readFileSync (node:fs:444:35)
    at eval (eval at callAsyncFunction (/home/runner/work/_actions/actions/github-script/v9/dist/index.js:64949:16), <anonymous>:5:20)
    at callAsyncFunction (/home/runner/work/_actions/actions/github-script/v9/dist/index.js:64950:12)
    at main (/home/runner/work/_actions/actions/github-script/v9/dist/index.js:65100:26)
    at /home/runner/work/_actions/actions/github-script/v9/dist/index.js:65069:1
    at /home/runner/work/_actions/actions/github-script/v9/dist/index.js:65147:3
    at Object.<anonymous> (/home/runner/work/_actions/actions/github-script/v9/dist/index.js:65150:12)
    at Module._compile (node:internal/modules/cjs/loader:1812:14)
    at Object..js (node:internal/modules/cjs/loader:1943:10) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: './result.txt'
}
Error: Unhandled error: Error: ENOENT: no such file or directory, open './result.txt'

@xtqqczze
Copy link
Copy Markdown
Contributor Author

Error: Unhandled error: Error: ENOENT: no such file or directory, open './result.txt'

I don't understand why this fails now, but let's add something like:

if (!fs.existsSync('./result.txt') || !fs.existsSync('./NR')) {
  console.log('Files in workspace:', fs.readdirSync('.'));
  throw new Error('Missing result.txt or NR from artifact');
}

@xtqqczze
Copy link
Copy Markdown
Contributor Author

#11793

@xtqqczze
Copy link
Copy Markdown
Contributor Author

Looks like it's working now: #11330 (comment)

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.

GNU testsuite comparison action should edit existing comment

4 participants