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

Build Auto Triage failure: ${PWD}/tooling/build_autotriage/build_autotriage.sh: No such file or directory #3554

Closed
andrew-m-leonard opened this issue Nov 30, 2023 · 2 comments · Fixed by #3556
Assignees

Comments

@andrew-m-leonard
Copy link
Contributor

andrew-m-leonard commented Nov 30, 2023

https://github.com/andrew-m-leonard/openjdk-build/actions/runs/7044337061/job/19171821242

Run bash "${TRIAGE_SCRIPT}" jdk8u jdk11u jdk17u jdk21u jdk22head
bash: ${PWD}/tooling/build_autotriage/build_autotriage.sh: No such file or directory
Error: Process completed with exit code 127.

Looks like PWD is not defined?

@adamfarley
Copy link
Contributor

3 bugs have been found thus far:

  1. That PWD may not be correctly specifying the location of the triage script, maybe.
  2. That this action is triggering even when none of the triggers have been, well, triggered.
  3. That even if the above 2 issues are resolved, we then see a failure that could be caused by the github action secrets.GITHUB_TOKEN environment variable lacking permissions to generate an issue in a repository.

Current working theories:

  1. That PWD does not correctly expand when specified in a github action's "env" section.
    Fix: Moving the PWD to the "Run Build Triage" section appears to have resolved the issue.
  2. If a commit modifies one of the three files associated with the build-autotriage.yml github action, then pushing a branch containing that commit will trigger this action even if the user has not modified those files in their own commits specific to that branch. Current theory is that this is because github identifies "new" commits by comparing the branch to the default branch in the fork. If the user has not updated their master branch to contain the latest autotriage files, the action will trigger every time they commit a branch.
    Fix?: The latest fix for this was to only run the action when the commit is in a pull request.
  3. That we get the github token from the old repository, but we try to create the issue in the new repository. As a token's scope is the repository in which it was generated, this is a problem.
    Fix?: Currently working on this. One option is to print the script's output to the console if it's in a PR, but to perform as normal if it's triggered by the workflow. We could just make two options, but I'd rather not have code duplication if possible.

@adamfarley
Copy link
Contributor

Ok, I've removed the pull-request logic entirely. I can always add it into a copy of this action that is exclusive to my repository (and ignored) for testing changes.

Please review: #3556

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 a pull request may close this issue.

2 participants