scala-steward-org/scala-steward-action

Mill installation fails workflow

Closed this issue · 6 comments

Since the merge of #414 our Scala Steward runs are failing as Mill installation fails on our runners (which are private to our GH organisation). As we're not using Mill, it would be cool if it was installed if necessary and/or could be opted-out.

Error:

##[debug]Debug mode activated for Scala Steward
##[debug]Wrote scalafmt
✓ scalafmt installed, version: scalafmt 3.6.1
##[debug]Wrote scalafix
✓ scalafix installed, version: 0.10.4
##[debug]isExplicit: 0.10.9
##[debug]explicit? true
##[debug]checking cache: /opt/hostedtoolcache/mill/0.10.9/x64
##[debug]not found
##[debug]Attempting to install Mill from https://github.com/lihaoyi/mill/releases/download/0.10.9/0.10.9
##[debug]Downloading https://github.com/lihaoyi/mill/releases/download/0.10.9/0.10.9
##[debug]Destination /runner/_work/_temp/9b722d14-6935-45f9-ab1a-526911088cbe
##[debug]download complete
Error: EXDEV: cross-device link not permitted, rename '/runner/_work/_temp/9b722d14-6935-45f9-ab1a-526911088cbe' -> '/home/runner/bin/mill'
Error:  ✕ Unable to install Mill

Thanks for the report @ybasket. Could you give some more information about your runner? Any details about this would help. Ideally the installation of Mill here would just be abstracted away from the user, the same way it is with scalafmt or scalafix. I'd rather just ensure the the logic is correct for installing then adding in the ability to turn it off. So again, any more information about your runner will be helpful here.

@alejandrohdezma We are facing similar issues with mill installation too, but a different error. We do not use mill either. On self-hosted runner.

The executable is located in _tool/mill/0.10.9/x64/mill but still errors out with Unable to locate executable.

Trying to restore workspace contents from cache...
##[debug]Debug mode activated for Scala Steward
##[debug]Wrote scalafmt
✓ scalafmt installed, version: scalafmt 3.6.1
##[debug]Wrote scalafix
✓ scalafix installed, version: 0.10.4
##[debug]isExplicit: 0.10.9
##[debug]explicit? true
##[debug]checking cache: /home/runner/actions/runner/_work/_tool/mill/0.10.9/x64
##[debug]Found tool in cache mill 0.10.9 x64
Error:  ✕ Unable to locate executable file: mill. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.
##[debug]Node Action run completed with exit code 1

Note: Fixing the action version to v2.30.0 does not cause any issue, as mill was added post v2.30.0

That's weird... 🤔 are you using the latest version of the scala-steward-action?

@alejandrohdezma Yes, I got the error with the latest version and then downgraded to 2.30.0 .

what type of machine is the self-hosted runner?

Its an ubuntu VPS, where the github runner runs as a systemd service