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

'Permission Denied' in some Github Actions CI scripts but not others #247

Open
AndrewIOM opened this issue Nov 5, 2021 · 0 comments
Open

Comments

@AndrewIOM
Copy link
Collaborator

Describe the bug
With Deedle and Bristlecone libraries (that use RProvider), we found that a 'Permission Denied' error arises from the type provider constructor when using RProvider 2.0.1-beta3+. This appears to relate to a chmod command being run in RProvider to set execute permissions on the executables in the nuget package cache.

I found through testing that a workaround is to run a small F# script using dotnet fsi before running the setup-dotnet action. For some reason, this stops the 'Permission Denied' error happening later on during solution build.

To Reproduce
Steps to reproduce the behavior:

  1. With a ubuntu-latest runner on Github Actions,
  2. Use a script similar to the following:
  build-ubuntu:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - name: Set R environment variables (for RProvider)
        run:  |
          mkdir -p ~/.local/lib/R
          echo "R_LIBS_USER=~/.local/lib/R" >> "$GITHUB_ENV"
          echo "R_HOME=$(R RHOME)" >> "$GITHUB_ENV"
        shell: bash
      - name: Install R package dependencies
        run: Rscript -e "install.packages(c('zoo'))"
        shell: bash
      - name: Setup .NET Core
        uses: actions/setup-dotnet@v1
        with:
          dotnet-version: 5.0.103
      - name: Restore .NET local tools
        run: dotnet tool restore
      - name: Restore packages
        run: dotnet paket restore
      - name: Build and test
        run: dotnet fake build
  1. See error: FS3053 : The type provider 'RProvider.RProvider' reported an error : The type provider constructor has thrown an exception: Permission denied [/home/runner/work/Deedle/Deedle/src/Deedle.RProvider.Plugin/Deedle.RProvider.Plugin.fsproj]

Expected behavior
Build should run and pass correctly. A workaround identified is to add a F# script into the build process as follows:

citest.fsx:

#r "nuget:RProvider,2.0.2"

open RProvider
open RProvider.``base``
open RProvider.zoo

R.c(1.,2.,3)

R.as_zoo(R.c(1,2,3))

build:

  build-ubuntu:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - name: Set R environment variables (for RProvider)
        run:  |
          mkdir -p ~/.local/lib/R
          echo "R_LIBS_USER=~/.local/lib/R" >> "$GITHUB_ENV"
          echo "R_HOME=$(R RHOME)" >> "$GITHUB_ENV"
        shell: bash
      - name: Install R package dependencies
        run: Rscript -e "install.packages(c('zoo'))"
        shell: bash
      - name: Test F# scripts
        run: dotnet fsi citest.fsx
      - name: Setup .NET Core
        uses: actions/setup-dotnet@v1
        with:
          dotnet-version: 5.0.103
      - name: Restore .NET local tools
        run: dotnet tool restore
      - name: Restore packages
        run: dotnet paket restore
      - name: Build and test
        run: dotnet fake build

Environment (please complete the following information):

  • OS: Github runner - both macos-latest and ubuntu-latest. windows-latest unaffected
  • RProvider Version 2.0.2
  • Installed R Version 4.1.1 / 4.0.2

Additional context
Add any other context about the problem here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant