common-custom-user-data-gradle-plugin icon indicating copy to clipboard operation
common-custom-user-data-gradle-plugin copied to clipboard

Builds from GitHub Actions Windows runners incorrectly tagged as `LOCAL`

Open erichaagdev opened this issue 2 years ago • 2 comments

See:

  • https://github.com/gradle/gradle-enterprise-build-validation-scripts/actions/runs/3766542916/jobs/6403164517#step:6:102
  • https://ge.solutions-team.gradle.com/s/npqyejncfgvvi

erichaagdev avatar Dec 23 '22 18:12 erichaagdev

Do you know what the change is that needs to be made here? I'm guessing this means that the GITHUB_ACTIONS environment variable is likely not able to be picked up in the same way on windows? https://github.com/gradle/common-custom-user-data-gradle-plugin/blob/2a332b4ea80167c0ee26d54b231ec94adfa92832/src/main/java/com/gradle/CustomBuildScanEnhancements.java#L294

runningcode avatar Dec 27 '22 14:12 runningcode

I don't know for sure, but that is my best guess as well.

erichaagdev avatar Dec 27 '22 14:12 erichaagdev

This is not an issue of CCUD, it's an issue of WSL, which by default doesn't "forward" env vars set in Windows (host) by default. The only way to forward them is to set them using WSLENV - see discussion and Microsoft blog. You can also observe that in this test project, where the env vars are printed out. All of them are available with the default windows shell (pwsh), but almost none are there with wsl. When WSLENV is configured, the specified vars are available, which also means that CCUD will tag the build correctly, as well as add all of the other values.

As such, I've opened a PR to address this for BVS tests on github actions here.

ribafish avatar Jul 30 '24 09:07 ribafish