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

Bug report: events found but "something went wrong" #127

Closed
2 tasks done
matteotumiati opened this issue Oct 27, 2021 · 10 comments
Closed
2 tasks done

Bug report: events found but "something went wrong" #127

matteotumiati opened this issue Oct 27, 2021 · 10 comments
Labels
Type: bug Something isn't working

Comments

@matteotumiati
Copy link

Checks

Description

I assume the page with supported versions is not updated, but probably I'm missing something.
However I'm using the action like

- uses: Readme-Workflows/recent-activity@main
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

I'm assuming main targets the latest version available (2.3.1 if I'm not mistaken).

When it runs it is able to find some events but it generates an exception that I cannot understand because it seems to be quite generic as you can see from the screenshot:

Logs from the action

Steps to reproduce

Re-run the action from here

Configuration

settings:
  commit_msg: "⚡ Update README with the recent activity"
  max_lines: 5
  readme_file: "./README.md"
  disabled_events: [ comments, create_repo, fork ]
  url_text: "{REPO}{ID}"
  date:
    timezone: "GMT+00:00"
    text: "Last Updated: {DATE}"
    format: "dddd, mmmm dS, yyyy, h:MM:ss TT"
  commit_username: "matteotumiati-bot"
  commit_email: "41898282+github-actions[bot]@users.noreply.github.com"
messages:
  comments: "💬 Commented on {ID} in {REPO}"
  issue_opened: "❗️ Opened issue {ID} in {REPO}"
  issue_closed: "✔️ Closed issue {ID} in {REPO}"
  pr_opened: "💪 Opened PR {ID} in {REPO}"
  pr_closed: "❌ Closed PR {ID} in {REPO}"
  pr_merged: "🎉 Merged PR {ID} in {REPO}"
  create_repo: "📔 Created new repository {REPO}"
  fork_repo: "🔱 Forked {FORK} from {REPO}"
  wiki_create: "📖 Created new wiki page {WIKI} in {REPO}"
  added_member: "🤝 Became collaborator on {REPO}"
  changes_approved: "👍 Approved {ID} in {REPO}"
  changes_requested: "🔴 Requested changes in {ID} in {REPO}"
  new_release: "✌️ Released {ID} in {REPO}"
  new_star: "⭐ Starred {REPO}"

Expected behaviour

If no meaningful events can be found, then I expect to only generate a warning or something, but I don't want the action to fail with an exception.

If events instead are found and aren't matching my disabled_events, then I expect the readme.md to be updated accordingly.

Actual behaviour

A generic exception is created.

⬤  debug     Something went wrong
✖  fatal     Error: Invalid status code: 128 
    at ChildProcess.<anonymous> (/home/runner/work/_actions/Readme-Workflows/recent-activity/main/dist/index.js:27214:19)
    at ChildProcess.emit (events.js:210:5)
    at maybeClose (internal/child_process.js:1021:16)
    at Socket.<anonymous> (internal/child_process.js:430:11)
    at Socket.emit (events.js:210:5)
    at Pipe.<anonymous> (net.js:659:12)

Failed runs

https://github.com/matteotumiati/matteotumiati/actions/runs/1389604748

@matteotumiati matteotumiati added the Type: bug Something isn't working label Oct 27, 2021
@welcome
Copy link

welcome bot commented Oct 27, 2021

Thanks for opening your first issue here! Your contribution is welcome🙏. Make sure to follow the code of conduct!

@PuneetGopinath
Copy link
Member

PuneetGopinath commented Oct 27, 2021

Hey @matteotumiati

I see that it's a problem with committing the updated readme.
Can you comment out the commit_username and commit_email options and try running again?

Update: Looks like it is not problem with those options, it is a problem because you are using the main branch, main branch may be unstable anytine, we recommend you to use the latest version, find the latest version in https://github.com/Readme-Workflows/recent-activity/releases

@matteotumiati
Copy link
Author

Thank you for your reply!

I tried switching to 2.3.1 but seems nothing changed so far:
https://github.com/matteotumiati/matteotumiati/runs/4024005145?check_suite_focus=true

@abhijoshi2k
Copy link
Member

The issue you are facing might be due to one of the following reasons:

  • You are using one more workflow immediately before using this one which might be causing issues. Try separating the two workflows. (Most probable reason)
  • You do not have enough events which can be displayed.

@PuneetGopinath
Copy link
Member

PuneetGopinath commented Oct 28, 2021

Hey @matteotumiati

As @abhijoshi2k, the problem was running 2 workflows at same time!
I have opened up a PR fixing the problems

@matteotumiati
Copy link
Author

Thank you very much, very proactive and kind of you to also create the PR 🥇
Appreciated a lot!

Then just for my understanding, do you know why a previous step can influence the behaviour of this action? Is it permissions or perhaps merging conflicts given they are updating the same file? Just guessing... Anyway I haven't seen it in the documentation here, so maybe it can be highlighted somewhere.

@PuneetGopinath
Copy link
Member

I don't know why it happens, but @abhijoshi2k might know it because he is a GitHub pro 😂.

@PuneetGopinath
Copy link
Member

Closing this issue👍

@abhijoshi2k
Copy link
Member

Hi again @matteotumiati ,
The real reason of why this happens doesn't seem to be documented anywhere. However, it has been my observation that changing same files by running different workflows back-to-back often give rise to some internal conflicts resulting into failure of second workflow. So I suggested you to separate the workflows.
Glad everything is working well now.

@matteotumiati
Copy link
Author

Thanks for helping! 😎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants