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

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

Open
danielhollas opened this issue Jan 9, 2025 · 0 comments
Open

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

danielhollas opened this issue Jan 9, 2025 · 0 comments

Comments

@danielhollas
Copy link
Collaborator

danielhollas commented Jan 9, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant