Skip to content

Make a new Github issue when a nightly run fails #6689

Open
@danielhollas

Description

@danielhollas

We're running nightly tests periodically once per day:

- cron: 0 0 * * * # Run every day at midnight

When the workflow fails, the failure is posted in the aiida-core-dev Slack channel.

There are several issues with this:

  1. The Slack channel is not public and easy to miss (as we discussed with @GeigerJ2 during coding week, people were generally not aware of it).
  2. It's hard to track, discuss and resolve the failures in a consistent manner.

Instead of posting to a Slack channel, I would propose that failing workflow would automatically create Github issue. That might be noisy at fist, but it would force us to deal with the issues transparently.

The implementation of this is actually quite simple, I took this idea from the ruff repository:
https://github.com/astral-sh/ruff/blob/d0b2bbd55ee6435bc3dad8db2898aec216d85121/.github/workflows/daily_fuzz.yaml#L60

  create-issue-on-failure:
    name: Create an issue if the daily fuzz surfaced any bugs
    runs-on: ubuntu-latest
    needs: fuzz
    if: ${{ github.repository == 'astral-sh/ruff' && always() && github.event_name == 'schedule' && needs.fuzz.result == 'failure' }}
    permissions:
      issues: write
    steps:
      - uses: actions/github-script@v7
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          script: |
            await github.rest.issues.create({
              owner: "astral-sh",
              repo: "ruff",
              title: `Daily parser fuzz failed on ${new Date().toDateString()}`,
              body: "Run listed here: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}",
              labels: ["bug", "parser", "fuzzer"],
            })

CC @unkcpz @agoscinski

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions