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 failing with "Error: Error undefined: releases.find is not a function" #489

Open
mnsrulz opened this issue Jan 11, 2025 · 11 comments

Comments

@mnsrulz
Copy link

mnsrulz commented Jan 11, 2025

Describe the bug
With very simple configuration including assets and tag name, the action intermittently fail with the error message "Error undefined: releases.find is not a function". Rerunning the step solves the issue intermittently. Is there a way to get what's going on behind the scenes to get more details about the root cause of the failure?

To Reproduce
Steps to reproduce the behavior:
Use the sample workflow below

Expected behavior
The workflow should run without any error

Screenshots
image

Additional context
Workflow file

  release-rolling-data:
    runs-on: ubuntu-latest
    steps:
      - name: Setup repo
        uses: actions/checkout@v4
        with:
          fetch-depth: 0   
          ref: main        
      - name: Download snapshot images Artifact
        uses: actions/download-artifact@v4
        with:
          name: rolling-data
      - name: Release
        uses: ncipollo/release-action@v1
        with:
          artifacts: "temp/*.parquet"
          tag: sometagvalue
          commit: "main"
          allowUpdates: "true"
@ncipollo
Copy link
Owner

Could you provide a link to the repo and the actions which failed? There is no function named find in the action so it's probably an error coming in from the API.

@mnsrulz
Copy link
Author

mnsrulz commented Jan 11, 2025

Could you provide a link to the repo and the actions which failed? There is no function named find in the action so it's probably an error coming in from the API.

https://github.com/mnsrulz/mztrading-data/actions/runs/12726242038/job/35474424077

@ncipollo
Copy link
Owner

Also assuming you are trying to use the action to create a tag and release at the same time, I would recommend that you create the tag as a separate step (just us a run command). GitHub has some constraints in their api and it usually easier to just do that via git.

@mnsrulz
Copy link
Author

mnsrulz commented Jan 11, 2025

Also assuming you are trying to use the action to create a tag and release at the same time, I would recommend that you create the tag as a separate step (just us a run command). GitHub has some constraints in their api and it usually easier to just do that via git.

Yes that’s right. It’s a single step using your action to create release and upload assets

@ncipollo
Copy link
Owner

Oh actually there is a releases.find in the action, sorry on my phone. It looks like I'm calling that on the response for list releases when trying to find if there is a draft. I'm guessing that will fail if there are no releases... maybe that's what's going on?

@mnsrulz
Copy link
Author

mnsrulz commented Jan 11, 2025

Oh actually there is a releases.find in the action, sorry on my phone. It looks like I'm calling that on the response for list releases when trying to find if there is a draft. I'm guessing that will fail if there are no releases... maybe that's what's going on?

Yeah in the repo there are a lot existing releases. I am not entirely sure since it’s happening intermittently. May be some detail error log would help here, but I am not sire how to get them.

@ncipollo
Copy link
Owner

I updated the action to print out a more explicit error when this happens. It looks like what's happening is the list releases API call is returning some unexpected value (i.e it has no data payload). This might be happening because Github error, though hard to tell - I've never seen this happen before. The new error will dump our the response so that might give us a clue.

@mnsrulz
Copy link
Author

mnsrulz commented Jan 12, 2025

I updated the action to print out a more explicit error when this happens. It looks like what's happening is the list releases API call is returning some unexpected value (i.e it has no data payload). This might be happening because Github error, though hard to tell - I've never seen this happen before. The new error will dump our the response so that might give us a clue.

so I tried running the action. First run was successful, however second run did error out with a different error. i have seen that error before too. Adding below the ref of the run

https://github.com/mnsrulz/mztrading-data/actions/runs/12730043600/job/35482573440

@ncipollo
Copy link
Owner

Hmm a HTTP 504 indicates a timeout from the gateway. Are you using a self-hosting runner or something? If not, I think you are tripping over an issue in Github itself.

@mnsrulz
Copy link
Author

mnsrulz commented Jan 12, 2025

Hmm a HTTP 504 indicates a timeout from the gateway. Are you using a self-hosting runner or something? If not, I think you are tripping over an issue in Github itself.

No It’s all standard public runners. Would it be possible to have some auto retry while calling the github apis from the action? Or I can try to add github tag like you recommended to see if that solves this.

@mnsrulz
Copy link
Author

mnsrulz commented Jan 25, 2025

A few more instances of failures with same error

https://github.com/mnsrulz/mztrading-data/actions/runs/12965300072/job/36165034460

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