Skip to content

remove push directive so we will not run tests on merge#9144

Merged
nadavMiz merged 1 commit into
noobaa:masterfrom
nadavMiz:remove-push-directive
Jul 16, 2025
Merged

remove push directive so we will not run tests on merge#9144
nadavMiz merged 1 commit into
noobaa:masterfrom
nadavMiz:remove-push-directive

Conversation

@nadavMiz

@nadavMiz nadavMiz commented Jul 16, 2025

Copy link
Copy Markdown
Contributor

Describe the Problem

We currently run GitHub Actions for pull request (PR) tests on both push and pull_request events. However, since we push changes to a forked branch, the push event triggers a workflow run on the forked branch, and again on the target branch (e.g., noobaa) when the PR is merged—because the merge itself is treated as a push to the target branch.

This results in redundant test executions. Additionally, the workflows triggered by the push event often fail, making these runs both unnecessary and noisy.

Explain the Changes

  1. remove the push event. since only pull request is used

Issues: Fixed #xxx / Gap #xxx

Testing Instructions:

  • Doc added/updated
  • Tests added

Summary by CodeRabbit

  • Chores
    • Updated automated test workflows to run only on pull request and manual dispatch events, no longer triggering on push events.
    • Clarified comments in workflow configuration regarding branch selection for manual dispatch events.

@coderabbitai

coderabbitai Bot commented Jul 16, 2025

Copy link
Copy Markdown

Walkthrough

The GitHub Actions workflow configurations were updated to remove the "push" event as a trigger from three workflows. Now, these workflows are only triggered by "pull_request" and, where applicable, "workflow_dispatch" events. Minor clarifying comments were also updated in one workflow file.

Changes

Files Change Summary
.github/workflows/Validate-package-lock.yaml Removed "push" event trigger; workflow now runs only on "pull_request" events.
.github/workflows/jest-unit-tests.yaml Removed "push" event trigger; workflow now runs only on "pull_request" and "workflow_dispatch" events.
.github/workflows/run-pr-tests.yaml Removed "push" event trigger; updated comment to clarify branch selection for "workflow_dispatch".

Suggested labels

size/M

Suggested reviewers

  • nimrod-becker
  • liranmauda

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.
    • Explain this complex logic.
    • 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. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • 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 src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

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

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai 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.

Documentation and Community

  • 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.

@nadavMiz nadavMiz force-pushed the remove-push-directive branch 3 times, most recently from 77acde0 to a74a6f8 Compare July 16, 2025 09:50
@nadavMiz nadavMiz marked this pull request as ready for review July 16, 2025 09:50
Signed-off-by: nadav mizrahi <nadav.mizrahi16@gmail.com>
@nadavMiz nadavMiz force-pushed the remove-push-directive branch from a74a6f8 to 849ea70 Compare July 16, 2025 09:50
@nadavMiz nadavMiz requested review from liranmauda and romayalon July 16, 2025 09:50

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

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 (2)
.github/workflows/Validate-package-lock.yaml (1)

2-2: Consider retaining workflow_dispatch for ad-hoc validations

The other two workflows still allow manual runs (workflow_dispatch). Keeping the same trigger here would let maintainers validate package-lock.json on demand without opening a PR.

.github/workflows/run-pr-tests.yaml (1)

69-70: Fix typo in comment for clarity

-            #on dispach, use the current branch
+            #on dispatch, use the current branch
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8762e9b and 849ea70.

📒 Files selected for processing (3)
  • .github/workflows/Validate-package-lock.yaml (1 hunks)
  • .github/workflows/jest-unit-tests.yaml (1 hunks)
  • .github/workflows/run-pr-tests.yaml (2 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: nadavMiz
PR: noobaa/noobaa-core#9099
File: .github/workflows/run-pr-tests.yaml:52-70
Timestamp: 2025-06-19T10:01:46.933Z
Learning: In the noobaa-core repository, branch names don't contain forward slashes, so Docker tag sanitization is not needed in GitHub Actions workflows. Manual full builds and automated builds should use consistent tag naming to avoid mismatches.
.github/workflows/run-pr-tests.yaml (1)
Learnt from: nadavMiz
PR: noobaa/noobaa-core#9099
File: .github/workflows/run-pr-tests.yaml:52-70
Timestamp: 2025-06-19T10:01:46.933Z
Learning: In the noobaa-core repository, branch names don't contain forward slashes, so Docker tag sanitization is not needed in GitHub Actions workflows. Manual full builds and automated builds should use consistent tag naming to avoid mismatches.
🔇 Additional comments (2)
.github/workflows/jest-unit-tests.yaml (1)

2-2: Confirm test coverage on protected branches after push removal

Dropping the push trigger removes noisy duplicates, but it also means this workflow will not run for direct commits pushed to protected branches (e.g., urgent hot-fixes done without a PR). If your policy mandates all changes go through PRs, that’s fine; otherwise consider re-adding a branch-filtered push or merge_group trigger to keep the safety net.

.github/workflows/run-pr-tests.yaml (1)

2-2: Push trigger removal: verify release workflow expectations

As with the Jest workflow, ensure that relying solely on pull_request/workflow_dispatch won’t skip test execution for straight-to-main merges or release branch pushes that bypass PRs.

@nadavMiz nadavMiz merged commit 3f49f4e into noobaa:master Jul 16, 2025
18 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants