Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

retest doesn't work if not the only thing in the comment #603

Open
nikic opened this issue Jul 22, 2024 · 2 comments
Open

retest doesn't work if not the only thing in the comment #603

nikic opened this issue Jul 22, 2024 · 2 comments
Assignees
Labels
ci enhancement New feature or request

Comments

@nikic
Copy link
Collaborator

nikic commented Jul 22, 2024

If the comment issuing the /retest also contains other text (e.g. to explain why the retest is being triggered), the command may fail. It looks like

chroots=$(echo "${{ github.event.comment.body }}" | sed 's/^\s*\/retest\s*//g')
will treat everything except the /retest itself as the chroot list. It should only use what is on the same line instead, I think...

Example of failed workflow run: https://github.com/fedora-llvm-team/llvm-snapshots/actions/runs/10040901759

@kwk
Copy link
Collaborator

kwk commented Jul 24, 2024

Yeah I saw that the other day. Thank you for tracking this here.

@kwk kwk self-assigned this Jul 24, 2024
@kwk kwk added enhancement New feature or request ci labels Jul 24, 2024
@kwk
Copy link
Collaborator

kwk commented Jul 24, 2024

@nikic In order to change the behaviour and make it easier to use ONE /retest command inside a comment I suggest to do it this way. Say, here's a comment:

$ cat <<EOF > /tmp/foo
Suppose the command is not in the first row
      /retest     mychroot something else
And here's some explanation for why /retest foobar something completely different
it was executed.
EOF

Then this command will get mychroot and nothing else:

$ cat /tmp/foo | grep -Po '/retest\s*\K[^\s]*' --max-count=1
mychroot

Now I just need to look if this makes sense at all because of the gating that goes on before this step. But at least for now I think this should allow having an explanation after the /retest comment. (Crossing finger, this won't be picked up 🙏 )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants