Skip to content

Conversation

@dimitarvdimitrov
Copy link
Contributor

@dimitarvdimitrov dimitarvdimitrov commented Aug 26, 2025

Summary

Completes the flaky test detection system from dimitarvdimitrov#2 by adding comprehensive GitHub issue management. This enables automatic creation and updating of issues for flaky tests.

This is the last of 3 PRs for go-flaky-tests. (continued from #1029)

What's Added

  • GitHub Integration: Full GitHubClient implementation using GitHub CLI
  • Issue Management: Creates new issues and updates existing ones for flaky tests
  • Issue Handling: Searches for existing issues and reopens closed ones when tests become flaky again
  • Dry Run Mode: Preview functionality that shows exactly what issues would be created

Key Components

  • github.go: Complete GitHub operations with proper error handling and issue lifecycle management. The GitHub integration uses the GitHub CLI (gh) for all operations
  • Enhanced analyzer.go: Full implementation of issue creation and preview functionality
  • Updated action configuration: Adds github-token input parameter and skip-posting-issues control
  • Comprehensive GitHub integration test coverage

@jdbaldry
Copy link
Contributor

Very cool! Haven't reviewed the code but wanted to ask if you've demo'd this or announced it in the engineering weekly. I think this workflow could be handy for lots of repositories!

@dimitarvdimitrov
Copy link
Contributor Author

Very cool! Haven't reviewed the code but wanted to ask if you've demo'd this or announced it in the engineering weekly. I think this workflow could be handy for lots of repositories!

good shout. Not yet, but @dsotirakis also suggested a conference talk. So some sort of talk should happen.

@zerok zerok changed the title feat: add github issue management to go flaky tests feat(go-flaky-tests): add github issue management Aug 29, 2025
Copy link
Contributor

@zerok zerok left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add yourself (or your team) as codeowners for that action 🙂

Copy link
Member

@guicaulada guicaulada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good, just missing the CODEOWNERS change as Horst mentioned 🙂

@dimitarvdimitrov
Copy link
Contributor Author

oh sorry i had missed this comment. Pushed a change

Complete the flaky test action with full GitHub integration:
- Add GitHub client implementation for issue management
- Create and update GitHub issues for flaky tests
- Search for existing issues to avoid duplicates
- Automatically reopen closed issues when tests fail again
- Rich issue templates with investigation guides and author mentions
- GitHub CLI integration for all operations
- Add github-token and skip-posting-issues config options

Builds on PR2's Git author tracking with complete GitHub workflow.
This completes the full analyze-test-failures action functionality.
# Conflicts:
#	actions/go-flaky-tests/cmd/go-flaky-tests/analyzer.go
@dimitarvdimitrov dimitarvdimitrov force-pushed the dimitar/analyze-test-failures/github-issues branch from f5b7c66 to d7b015f Compare September 10, 2025 09:02
@dimitarvdimitrov
Copy link
Contributor Author

@zerok do you want to wait for another review from @guicaulada or @dsotirakis or can we merge? I don't have the permissions to merge

@zerok zerok added this pull request to the merge queue Sep 29, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 29, 2025
@zerok zerok added this pull request to the merge queue Sep 29, 2025
Merged via the queue into grafana:main with commit f2c0b02 Sep 29, 2025
18 checks passed
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

Successfully merging this pull request may close these issues.

4 participants