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

Operation not permitted on MacOS runners #4

Closed
danielrbradley opened this issue Oct 13, 2022 · 4 comments
Closed

Operation not permitted on MacOS runners #4

danielrbradley opened this issue Oct 13, 2022 · 4 comments

Comments

@danielrbradley
Copy link

When using runs-on: macos-latest for a job, the action fails with Operation not permitted during the Linking gotestfmt... step (ln: /usr/bin/gotestfmt).

Action configuration:

    - name: Install gotestfmt
      uses: GoTestTools/gotestfmt-action@v2
      with:
        version: v2.4.0
        token: ${{ secrets.GITHUB_TOKEN }}

Logs output:

Downloading gotestfmt version v2.4.0 from GoTestTools/gotestfmt...
Found release v2.4.1 matching criteria, attempting to download binary...
Examining release asset gotestfmt_2.4.1_checksums.txt at https://github.com/GoTestTools/gotestfmt/releases/download/v2.4.1/gotestfmt_2.4.1_checksums.txt ...
Examining release asset gotestfmt_2.4.1_darwin_amd64.tar.gz at https://github.com/GoTestTools/gotestfmt/releases/download/v2.4.1/gotestfmt_2.4.1_darwin_amd64.tar.gz ...
Examining release asset gotestfmt_2.4.1_darwin_arm64.tar.gz at https://github.com/GoTestTools/gotestfmt/releases/download/v2.4.1/gotestfmt_2.4.1_darwin_arm64.tar.gz ...
Examining release asset gotestfmt_2.4.1_linux_386.tar.gz at https://github.com/GoTestTools/gotestfmt/releases/download/v2.4.1/gotestfmt_2.4.1_linux_386.tar.gz ...
Examining release asset gotestfmt_2.4.1_linux_amd64.tar.gz at https://github.com/GoTestTools/gotestfmt/releases/download/v2.4.1/gotestfmt_2.4.1_linux_amd64.tar.gz ...
Found Linux binary named gotestfmt_2.4.1_linux_amd64.tar.gz at https://github.com/GoTestTools/gotestfmt/releases/download/v2.4.1/gotestfmt_2.4.1_linux_amd64.tar.gz , attempting download...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
Creating /usr/local/lib/gotestfmt directory...

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0

100 1162k  100 1162k    0     0  [52](https://github.com/*********************)91k      0 --:--:-- --:--:-- --:--:-- 5291k
Unpacking tar file...
x LICENSE.md
x README.md
Removing tarball...
x gotestfmt
Linking gotestfmt...
ln: /usr/bin/gotestfmt: Operation not permitted
Binary download failed, trying next release. (Error: Command failed: sudo ln -s /usr/local/lib/gotestfmt/gotestfmt /usr/bin/gotestfmt
ln: /usr/bin/gotestfmt: Operation not permitted
)
danielrbradley added a commit to pulumi/pulumi-azure-native that referenced this issue Oct 13, 2022
GoTestTools/gotestfmt-action has a bug with MacOS runners:
GoTestTools/gotestfmt-action#4
danielrbradley added a commit to pulumi/pulumi-azure-native that referenced this issue Oct 13, 2022
GoTestTools/gotestfmt-action has a bug with MacOS runners:
GoTestTools/gotestfmt-action#4
danielrbradley added a commit to pulumi/pulumi-azure-native that referenced this issue Oct 13, 2022
GoTestTools/gotestfmt-action has a bug with MacOS runners:
GoTestTools/gotestfmt-action#4
@ghost
Copy link

ghost commented Oct 13, 2022

Thank you @danielrbradley for the bug report! May I ask, is this failing only since the switch to the GoTestTools org, or has it failed before?

@danielrbradley
Copy link
Author

We were previously using https://github.com/jaxxstorm/action-install-gh-release to install the binary from the previous repository. At the point we upgraded to v2 we also switched to use this action. It's not a hard blocked as we've just switched back to the install-gh-release action for these runners for now, but hope this helps fix up the process for others.

@ghost
Copy link

ghost commented Oct 13, 2022

Ah, I see, thank you for the confirmation. We'll try to fix this soon, it's probably just going to be something along the lines of changing the symlink.

thomas11 pushed a commit to pulumi/pulumi-azure-native that referenced this issue Oct 13, 2022
…82c2748a09317fe0860 (#2025)

* Preparing the SDK folder for regeneration

* Regenerating SDKs based on azure-rest-api-specs @ c71a66dab813061f1d09982c2748a09317fe0860

* Regenerating based on azure-rest-api-specs @ c71a66dab813061f1d09982c2748a09317fe0860

* Fix gotestfmt install in actions

* Go back to jaxxstorm/action-install-gh-release

GoTestTools/gotestfmt-action has a bug with MacOS runners:
GoTestTools/gotestfmt-action#4

* Fix gotestfmt repo

Co-authored-by: Daniel Bradley <daniel@pulumi.com>
@engelmi
Copy link
Member

engelmi commented Oct 21, 2022

Please check out new release v2.1.0 @danielrbradley. It contains a fix for this issue.

norwd added a commit to norwd/gotestfmt-action that referenced this issue Oct 27, 2022
This should help catch errors like GoTestTools#4 and GoTestTools#8 by ensuring that gotestfmt can run on all the major OS runners for GitHub Actions.

Signed-off-by: Yuri Norwood <106889957+norwd@users.noreply.github.com>
engelmi pushed a commit that referenced this issue Nov 4, 2022
* Extend selftest workflow to multiple runners

This should help catch errors like #4 and #8 by ensuring that gotestfmt can run on all the major OS runners for GitHub Actions.

Signed-off-by: Yuri Norwood <106889957+norwd@users.noreply.github.com>

* Separate windows step from *nix runners

This allows `bash` and `pwsh` syntax to be used separately to avoid having to write the test as a polyglot 😬

Also added `secrets.GITHUB_TOKEN` as a fallback in case the repo secret `secrets.GH_TOKEN` is not set up, e.g. in a fork.

Signed-off-by: Yuri Norwood <106889957+norwd@users.noreply.github.com>

* Remove `/tmp` directory for artifacts

On MacOS, this results in:

```
Error: Provided rootDirectory /tmp is not a valid directory
```

On Windows this results in:

```
Error: No files were found with the provided path: /tmp/gotest.windows.log. No artifacts will be uploaded.
```

Both seem to be unhappy with `/tmp`, since the workspace is implicitly cleaned up at the end of the workflow, there shouldn't be a need to specify `/tmp`.

Signed-off-by: Yuri Norwood <106889957+norwd@users.noreply.github.com>

* Name each workflow run of the matrix

Signed-off-by: Yuri Norwood <106889957+norwd@users.noreply.github.com>

* Fix artifact path

Signed-off-by: Yuri Norwood <106889957+norwd@users.noreply.github.com>

* Simplify workflow by just using bash universally

Signed-off-by: Yuri Norwood <106889957+norwd@users.noreply.github.com>

* Apply suggestions from code review

Signed-off-by: Yuri Norwood <106889957+norwd@users.noreply.github.com>

Signed-off-by: Yuri Norwood <106889957+norwd@users.noreply.github.com>
@engelmi engelmi closed this as completed Nov 11, 2022
engelmi pushed a commit that referenced this issue Dec 2, 2022
* Extend selftest workflow to multiple runners

This should help catch errors like #4 and #8 by ensuring that gotestfmt can run on all the major OS runners for GitHub Actions.

Signed-off-by: Yuri Norwood <106889957+norwd@users.noreply.github.com>

* Separate windows step from *nix runners

This allows `bash` and `pwsh` syntax to be used separately to avoid having to write the test as a polyglot 😬

Also added `secrets.GITHUB_TOKEN` as a fallback in case the repo secret `secrets.GH_TOKEN` is not set up, e.g. in a fork.

Signed-off-by: Yuri Norwood <106889957+norwd@users.noreply.github.com>

* Remove `/tmp` directory for artifacts

On MacOS, this results in:

```
Error: Provided rootDirectory /tmp is not a valid directory
```

On Windows this results in:

```
Error: No files were found with the provided path: /tmp/gotest.windows.log. No artifacts will be uploaded.
```

Both seem to be unhappy with `/tmp`, since the workspace is implicitly cleaned up at the end of the workflow, there shouldn't be a need to specify `/tmp`.

Signed-off-by: Yuri Norwood <106889957+norwd@users.noreply.github.com>

* Name each workflow run of the matrix

Signed-off-by: Yuri Norwood <106889957+norwd@users.noreply.github.com>

* Fix artifact path

Signed-off-by: Yuri Norwood <106889957+norwd@users.noreply.github.com>

* Simplify workflow by just using bash universally

Signed-off-by: Yuri Norwood <106889957+norwd@users.noreply.github.com>

* Apply suggestions from code review

Signed-off-by: Yuri Norwood <106889957+norwd@users.noreply.github.com>

Signed-off-by: Yuri Norwood <106889957+norwd@users.noreply.github.com>
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

No branches or pull requests

2 participants