-
Notifications
You must be signed in to change notification settings - Fork 421
Open
Labels
Description
Description
Example of a run that failed: https://github.com/gnolang/gno/actions/runs/16519712019/job/46718566745#step:4:103
This panic occurs here if both os.UserConfigDir()
and os.Getwd()
functions return an error. It seems related to a misconfigured environment on some GitHub Actions runners.
Hypothesis
I strongly suspect that some misconfigured self-hosted runners are responsible for the issue.
To be sure, I think we should:
- Create a GitHub Actions workflow of type workflow_dispatch - Create a job with two steps:
- The first step logs the content of the runner context to check whether the current run is executed by a
self-hosted
runner or agithub-hosted
runner.
- name: Dump Runner context
env:
RUNNER_CONTEXT: ${{ toJson(runner) }}
run: echo "$RUNNER_CONTEXT"
- The second step creates a simple
main.go
file and then go run
it.
package main
import (
"fmt"
"os"
)
func main() {
if _, err := os.UserConfigDir(); err != nil {
fmt.Println("Cannot get user config directory:", err)
os.Exit(1)
}
if _, err := os.Getwd(); err != nil {
fmt.Println("Cannot get current working directory:", err)
os.Exit(1)
}
fmt.Println("Environment is set up correctly.")
}
- Then, we should repeatedly execute the
workflow_dispatch
until it fails and check if the run was executed on a self-hosted runner.
Metadata
Metadata
Labels
Type
Projects
Status
Triage