Skip to content

don't trigger build on push non-master branch - #938

Merged
mainred merged 6 commits into
masterfrom
build-on-push-master
Sep 7, 2025
Merged

mainred merged 6 commits into
masterfrom
build-on-push-master

Conversation

@mainred

@mainred mainred commented Sep 4, 2025

Copy link
Copy Markdown
Collaborator

Pull requests triggers duplicated builds for both push and pull_request. Limit the push event to master only to not trigger a redundant build.

image

@coderabbitai

coderabbitai Bot commented Sep 4, 2025 •

Copy link
Copy Markdown
Contributor

Walkthrough

Adjusted GitHub Actions workflow triggers in .github/workflows/build-and-test.yaml: converted the compact on: list to a mapping, restricted push events to the master branch, and retained pull_request and workflow_dispatch. No jobs or steps were modified.

Changes

Cohort / File(s) Summary of Changes
CI workflow triggers
.github/workflows/build-and-test.yaml
Replaced compact on: [push, pull_request, workflow_dispatch] with a mapping. Limited push to the master branch; left pull_request and workflow_dispatch as triggers. No other workflow content changed.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    participant Dev as Developer
    participant GitHub as GitHub Events
    participant CI as build-and-test workflow

    rect rgba(200,230,255,0.4)
    Dev->>GitHub: push to non-master branch
    GitHub-->>CI: no trigger (push limited to master)
    end

    rect rgba(200,255,200,0.4)
    Dev->>GitHub: push to master
    GitHub-->>CI: trigger workflow (push)
    end

    rect rgba(255,245,200,0.4)
    Dev->>GitHub: open/update PR
    GitHub-->>CI: trigger workflow (pull_request)
    end

    rect rgba(255,230,230,0.4)
    Dev->>GitHub: manual run (workflow_dispatch)
    GitHub-->>CI: trigger workflow (workflow_dispatch)
    end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • moshemorad
  • pavangudiwada

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between af8e163 and 16780b5.

📒 Files selected for processing (1)
  • .github/workflows/build-and-test.yaml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/build-and-test.yaml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: llm_evals
  • GitHub Check: Pre-commit checks
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch build-on-push-master

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@mainred
mainred enabled auto-merge (squash) September 4, 2025 10:02

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
.github/workflows/build-and-test.yaml (1)

5-10: LGTM: limiting push to master will stop duplicate runs from branch pushes. Consider preserving tag builds and adding concurrency.

  • If you still want builds on release tags, add a tags filter under push.
  • Optional: limit pull_request to the master target and/or specific types to reduce noise.
  • Optional: add a top-level concurrency block to auto-cancel superseded runs.
  • Please confirm the default branch is indeed "master" in this repo.

Apply within this hunk to keep tag builds:

 on:
   push:
     branches:
       - master
+    tags:
+      - 'v*'
+      - 'release-*'
   pull_request:
   workflow_dispatch:

Add outside this hunk (top level) to cancel redundant runs:

concurrency:
  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
  cancel-in-progress: true

Optionally reduce PR-trigger noise:

pull_request:
  branches: [ master ]
  types: [ opened, synchronize, reopened, ready_for_review ]
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 44fa5fe and af8e163.

📒 Files selected for processing (1)
  • .github/workflows/build-and-test.yaml (1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: mainred
PR: robusta-dev/holmesgpt#913
File: .github/workflows/build-and-release.yaml:3-6
Timestamp: 2025-09-04T03:59:20.047Z
Learning: In the holmesgpt repository, the release workflow should trigger on "created" event rather than "published" to align with the previous implementation, as confirmed by mainred.
📚 Learning: 2025-09-04T03:59:20.047Z
Learnt from: mainred
PR: robusta-dev/holmesgpt#913
File: .github/workflows/build-and-release.yaml:3-6
Timestamp: 2025-09-04T03:59:20.047Z
Learning: In the holmesgpt repository, the build-and-release.yaml workflow intentionally triggers on "created" rather than "published" to align with their release process where binary building happens early in the release creation phase, while Docker and PyPI publication workflows trigger on "published".

Applied to files:

  • .github/workflows/build-and-test.yaml
📚 Learning: 2025-09-04T05:25:00.426Z
Learnt from: mainred
PR: robusta-dev/holmesgpt#913
File: .github/workflows/build-and-release.yaml:96-101
Timestamp: 2025-09-04T05:25:00.426Z
Learning: In the holmesgpt repository's build-and-release.yaml workflow, git commit should not be guarded with a diff check because new releases always require Homebrew formula updates (new URLs and SHA256 hashes), so changes are guaranteed to exist.

Applied to files:

  • .github/workflows/build-and-test.yaml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: llm_evals
  • GitHub Check: Pre-commit checks

@mainred

mainred commented Sep 4, 2025

Copy link
Copy Markdown
Collaborator Author

cc @moshemorad

Comment thread .github/workflows/build-and-test.yaml
@github-actions

github-actions Bot commented Sep 7, 2025

Copy link
Copy Markdown
Contributor

Results of HolmesGPT evals

  • ask_holmes: 34/37 test cases were successful, 0 regressions, 2 skipped, 1 setup failures
Test suite Test case Status
ask 01_how_many_pods ✅
ask 02_what_is_wrong_with_pod ✅
ask 04_related_k8s_events ↪️
ask 05_image_version ✅
ask 09_crashpod ✅
ask 10_image_pull_backoff ✅
ask 110_k8s_events_image_pull ✅
ask 11_init_containers ✅
ask 13a_pending_node_selector_basic ✅
ask 14_pending_resources ✅
ask 15_failed_readiness_probe ✅
ask 17_oom_kill ✅
ask 18_crash_looping_v2 ✅
ask 19_detect_missing_app_details ✅
ask 20_long_log_file_search ✅
ask 24_misconfigured_pvc ✅
ask 24a_misconfigured_pvc_basic ✅
ask 28_permissions_error 🚧
ask 29_events_from_alert_manager ↪️
ask 39_failed_toolset ✅
ask 41_setup_argo ✅
ask 42_dns_issues_steps_new_tools ✅
ask 43_current_datetime_from_prompt ✅
ask 45_fetch_deployment_logs_simple ✅
ask 51_logs_summarize_errors ✅
ask 53_logs_find_term ✅
ask 54_not_truncated_when_getting_pods ✅
ask 59_label_based_counting ✅
ask 60_count_less_than ✅
ask 61_exact_match_counting ✅
ask 63_fetch_error_logs_no_errors ✅
ask 79_configmap_mount_issue ✅
ask 83_secret_not_found ✅
ask 86_configmap_like_but_secret ✅
ask 93_calling_datadog[0] ✅
ask 93_calling_datadog[1] ✅
ask 93_calling_datadog[2] ✅

Legend

  • ✅ the test was successful
  • ↪️ the test was skipped
  • ⚠️ the test failed but is known to be flaky or known to fail
  • 🚧 the test had a setup failure (not a code regression)
  • 🔧 the test failed due to mock data issues (not a code regression)
  • ❌ the test failed and should be fixed before merging the PR

@mainred
mainred merged commit ec4307a into master Sep 7, 2025
6 checks passed
@mainred
mainred deleted the build-on-push-master branch September 7, 2025 08:35
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.

2 participants