Skip to content

ci: gnokms test failing randomly #4561

@aeddi

Description

@aeddi

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:
  1. The first step logs the content of the runner context to check whether the current run is executed by a self-hosted runner or a github-hosted runner.
      - name: Dump Runner context
        env:
          RUNNER_CONTEXT: ${{ toJson(runner) }}
        run: echo "$RUNNER_CONTEXT"
  1. 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

Assignees

Labels

Type

No type

Projects

Status

Triage

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions