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

Badge always incorrectly displayed as "failing" #1830

Closed
mihaigalos opened this issue Apr 17, 2022 · 33 comments
Closed

Badge always incorrectly displayed as "failing" #1830

mihaigalos opened this issue Apr 17, 2022 · 33 comments
Assignees
Labels
bug Something isn't working

Comments

@mihaigalos
Copy link

This badge is shown as "failing" but the tasks' statuses are all green.

Describe the bug
The badge was green since CD pipeline is prechecked before running, meaning it normally should never fail. The badge for it was green and it suddenly went to red - "failing", even though all constituent tasks are succeeding.

To Reproduce
See 1st paragraph.

Expected behavior
The badge is green when all tasks successful, red when at least one fails.

Runner Version and Platform

Full yaml snapshot available here.

Simplified yaml:

on:
  push:
    tags:
      - '[0-9]+.[0-9]+.[0-9]+'

  workflow_dispatch: # Run with Run Workflow button in GitHub Action Job.
    inputs:
      is_manual_cd:
        default: true
        description: Manual trigger

jobs:
  common-assertions:
    runs-on: ubuntu-latest

OS of the machine running the runner?

Linux

@mihaigalos mihaigalos added the bug Something isn't working label Apr 17, 2022
@ruvceskistefan
Copy link
Contributor

Hi @mihaigalos,
Thanks for the reported issue! We will try to reproduce it, and I'll get back to you when I have more information or a solution.

@TingluoHuang
Copy link
Member

We break our elasticsearch index on workflow run results. 😭
The rebuild just finished, so this problem should go away. 🙇

@mihaigalos
Copy link
Author

Sounds good, any test to guarantee this regression will never happen again? 😅

@ruvceskistefan ruvceskistefan self-assigned this Apr 19, 2022
@ruvceskistefan
Copy link
Contributor

During the reproduction of the bug I saw that the problem go away, and than I saw a comment written by @TingluoHuang, which further explained everything. I'm going to close this issue, feel free to comment again or reopen it if this happens again.

@mihaigalos thanks again for reporting this issue and @TingluoHuang thanks for quick response and explanation!

@mihaigalos
Copy link
Author

@ruvceskistefan, the ELS breakage is a symptom and I don't understand the root cause.
I suspect it is not fixed and will happen again.

Would advise against closing this issue or at least guarding against future regressions with a test. What do you think?

@ruvceskistefan
Copy link
Contributor

Makes sense, I'll reopen it and we're going to investivate the root cause.

@TingluoHuang
Copy link
Member

From what I understand, the ELS issue is outside the scope of the runner itself.
@ruvceskistefan and I don't have the full context of the ELS issue since we both primarily work on the runner itself.

I asked around to other teams and it looks like the root cause is an int32 overflow on the search index. 😭
There will be an incident review internally for this error and repair items to make sure this won't happen again.

@mihaigalos do you mind if I close this runner issue since the issue is truly out of scope for the runner? 🙇

You can post to https://github.community/c/code-to-cloud/github-actions/41 if you need more info or RCA about the ELS issue.

@mihaigalos
Copy link
Author

This is still manifesting with the exact same conditions as in the initial bug report.

@mihaigalos
Copy link
Author

Hi, any updates here? This succeeded, badge is red.

@mihaigalos
Copy link
Author

Up.

@JonasVautherin
Copy link

Same here, the github badges don't work for me.

@sepulvedablanco-inditex

+1

@micwoj92
Copy link

I wish GitHub was 100% Free/Libre and open-source software, then skilled hackers from all around the world could fix this problem.

@MrVauxs
Copy link

MrVauxs commented Oct 20, 2022

Same here.

Build and Deploy

@moloch--
Copy link

Same problem here:
Build & Test

moloch-- added a commit to BishopFox/sliver that referenced this issue Oct 21, 2022
actions/runner#1830

Signed-off-by: Joe <875022+moloch--@users.noreply.github.com>
@MrVauxs
Copy link

MrVauxs commented Oct 24, 2022

Same problem here: Build & Test

Not anymore, the irony.

@mihaigalos
Copy link
Author

Mine still red at the moment:
CD

@TingluoHuang
Copy link
Member

Make sure to use the branch filter in your badge URL, by default, the badge is rendered for workflow run against your repository's default branch.
https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/adding-a-workflow-status-badge#using-the-branch-parameter

@mihaigalos
Copy link
Author

Make sure to use the branch filter in your badge URL, by default, the badge is rendered for workflow run against your repository's default branch.
https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/adding-a-workflow-status-badge#using-the-branch-parameter

Still red with explicit branch to main:

[![CD](/~https://github.com/mihaigalos/aim/actions/workflows/cd.yaml/badge.svg?branch=main)](/~https://github.com/mihaigalos/aim/actions/workflows/cd.yaml)

CD

@TingluoHuang
Copy link
Member

@mihaigalos Your main branch didn't run the workflow for the past few months, and the last time it runs was failed.
image

@mihaigalos
Copy link
Author

mihaigalos commented Oct 24, 2022

Thanks for the clarification, this is true.
My CD pipeline is triggered on a tag. That way I tag a new version and automatically create a deployment.

I therefore need the default branch or some way of telling the badge to use main branch but be triggered by the tag.
In this screenshot, 1.7.x were all successful merges to main with successful deployments. They however don't have main runs, why?

Also, how do you recommend implementing this^?

image

@MrVauxs
Copy link

MrVauxs commented Oct 24, 2022

We have the same problem. Our actions are ran on tags, so when switching to tag branches, it passes.
But making a badge that isn't stuck to just one version is impossible.

@TingluoHuang
Copy link
Member

Please report this to /~https://github.com/orgs/community/discussions/categories/actions-and-packages since the runner (this repository) itself doesn't have knowledge about the badge.

@MrVauxs
Copy link

MrVauxs commented Oct 24, 2022

Same here.

Build and Deploy

As a note, I just recently deleted a failed workflow run on master, the only one that ever existed. Now with the badge running on default, it looks like it just grabs... whatever is latest?

@mihaigalos
Copy link
Author

mihaigalos commented Oct 25, 2022

Worth a try. I've deleted the whole 180+ runs for my pipeline (No checkboxes so had to do ClickOps 180*3 times. Sigh.)
No result, badge is now "no status" in the create status badge page:
image

.. but it's red when I consume it i.e. here!:
CD

[![CD](/~https://github.com/mihaigalos/aim/actions/workflows/cd.yaml/badge.svg)](/~https://github.com/mihaigalos/aim/actions/workflows/cd.yaml)

@mihaigalos
Copy link
Author

Also, main is red (see below). No idea why, now there are runs since I've deleted them all:

CD

[![CD](/~https://github.com/mihaigalos/aim/actions/workflows/cd.yaml/badge.svg?branch=main)](/~https://github.com/mihaigalos/aim/actions/workflows/cd.yaml)

@MrVauxs
Copy link

MrVauxs commented Oct 26, 2022

Love how these update regardless of what you said. Both now show no status.

@sorenwacker
Copy link

Same problem.

@mihaigalos
Copy link
Author

I removed all previous runs on main and successfuly got a green badge.

@ruvceskistefan
Copy link
Contributor

@mihaigalos, I'm glad that it worked for you. I'll close this issue, if you are still getting the same error you can reopen it.

@lunatidalscents
Copy link

Build a blank yml build badge and apply the correct code

@wireless90
Copy link

Worth a try. I've deleted the whole 180+ runs for my pipeline (No checkboxes so had to do ClickOps 180*3 times. Sigh.) No result, badge is now "no status" in the create status badge page: image

.. but it's red when I consume it i.e. here!: CD

[![CD](/~https://github.com/mihaigalos/aim/actions/workflows/cd.yaml/badge.svg)](/~https://github.com/mihaigalos/aim/actions/workflows/cd.yaml)

thanks worked

@jlplenio
Copy link

jlplenio commented Dec 7, 2022

Works - deleted all previously failed runs. Thanks, @mihaigalos @wireless90

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

No branches or pull requests