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

action fails with error from getOptions #26

Closed
a-b-r-o-w-n opened this issue Nov 21, 2019 · 13 comments · Fixed by ldapjs/node-ldapjs#631
Closed

action fails with error from getOptions #26

a-b-r-o-w-n opened this issue Nov 21, 2019 · 13 comments · Fixed by ldapjs/node-ldapjs#631

Comments

@a-b-r-o-w-n
Copy link

I've seen this happen a handful of times and am not sure how to reproduce. The error output is:

[error] "2019-11-21T22:58:57.209Z"  'error from getOptions'
##[error]Error: Command failed: git cat-file -p <sha>
fatal: Not a valid object name <sha>
@rodrigoscna
Copy link

@bryceosterhaus
Copy link

I'm also running into the same issue. https://github.com/bryceosterhaus/clay/pull/54/checks

Any ideas for a work around?

@nickmerwin
Copy link
Member

Hi all, we released a new version (1.1.0) that should fix this issue:

https://github.com/marketplace/actions/coveralls-github-action?version=v1.1.0

Can you please upgrade and try another build?

@bryceosterhaus
Copy link

@nickmerwin still getting the same error with v1.1.0. Do I need to upgrade anything in the workflow?

new run: https://github.com/bryceosterhaus/clay/pull/54/checks?check_run_id=635134295#step:9:8

@nickmerwin
Copy link
Member

Hi @bryceosterhaus it appears this is an issue with GitHub Action's JS:

actions/toolkit#398

I'm upgrading those packages now and will release a new version shortly.

@nickmerwin
Copy link
Member

Ok, @bryceosterhaus new version is here:

https://github.com/coverallsapp/github-action/releases/tag/v1.1.1

Could you upgrade and build again, please?

@bryceosterhaus
Copy link

bryceosterhaus commented May 1, 2020

@nickmerwin still getting the same/similar error.
v1.1.1: https://github.com/bryceosterhaus/clay/pull/55/checks?check_run_id=637121899#step:9:9
master: https://github.com/bryceosterhaus/clay/pull/54/checks#step:9:8

I also just tried running the action off of master and got the same issue.

btw thanks for the quick replies!

@nickmerwin
Copy link
Member

Hi all, we were able to solve this by removing the ref: line from @bryceosterhaus's workflow yaml:

            - name: Checkout BASE
              uses: actions/checkout@v2
              with:
                  ref: ${{ github.event.pull_request.head.sha }}

bryceosterhaus/clay#55 (review)

That caused unintended behavior since the Action for a PR build will automatically use GitHub's ephemeral merge commit, which is what Coveralls is expecting.

If anyone has a use case that requires ref: ${{ github.event.pull_request.head.sha }}, let me know and we can find another solution.

Thanks.

jsumners added a commit to ldapjs/node-ldapjs that referenced this issue Jul 16, 2020
Trying to resolve coverallsapp/github-action#26

Also a couple other updates.
@ostsmolynets
Copy link

ostsmolynets commented Aug 19, 2020

Still happens for our projects. The workflow file:

    name: Build and Deploy
    on: 
      pull_request:
        push:
         branches:
           - master
      jobs:
        build:
          runs-on: ubuntu-latest
          steps:
            - uses: actions/checkout@v1

      - uses: *private*/actions/gcp-secret-manager@v0
        with:
          service-account-key: ${{ secrets.SECRET_AUTH }}
          secrets: |
            NEXUS_PASSWORD: nexus-password
            NEXUS_USERNAME: nexus-username
            NUGET_API_KEY: nuget-api-key  
        
      - name: Determine version
        uses: *private*/actions/conventional-version@v0
        id: semver
        with:
          build-number: ${{ github.run_number }}
      
      - name: Setup .NET Core 3.1
        uses: actions/setup-dotnet@v1
        with:
          dotnet-version: 3.1.201

      - name: Setup NuGet
        uses: NuGet/setup-nuget@v1.0.2
        with:
          nuget-version: 'latest'

      - name: Build dotnet solution
        run: |
          dotnet build *project*/*project*.sln --configuration Release /p:Version=${{ steps.semver.outputs.semver }}
      
      - name: Test dotnet solution
        run: |
          dotnet test *project*/*project*.Tests/*project*.Converters.Tests.csproj /p:CollectCoverage=true /p:CoverletOutputFormat=lcov --results-directory "./testresults" --logger trx --configuration Release --no-restore

      - name: Coveralls coverage analysis
        uses: coverallsapp/github-action@master
        with:
          path-to-lcov: *project*/*project*.Tests/coverage.info
          github-token: ${{ secrets.GITHUB_TOKEN }}

Error itself:
image

This is not consistent - worked just fine fo this sha: 83942e1dfd0afd1003618459d25cd37cb3147124

@ostsmolynets
Copy link

@nickmerwin Please see the comment above.
Currently the fix for this issue in our case is to trigger a build with an empty commit (so that it runs with a different sha). This causes a lot of inconveniences. Would be nice if it was stable. Is this a problem on our side or in the action?

@razzeee
Copy link

razzeee commented Oct 10, 2020

Getting the same problem, for example with this PR elm-tooling/elm-language-server#341

@ostsmolynets
Copy link

@razzeee Switching to actions/checkout@v2 with fetch-depth 0 seems to help.

@razzeee
Copy link

razzeee commented Oct 10, 2020

Thx only switched to v2, but already seems better

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

Successfully merging a pull request may close this issue.

6 participants