Skip to content

Conversation

nadavMiz
Copy link
Contributor

@nadavMiz nadavMiz commented Jul 16, 2025

Describe the Problem

When triggering the PR workflow via a workflow_dispatch event, the run fails. This prevents us from manually dispatching the workflow from a specific branch.

The failures are caused by two main issues:

  1. Some jobs require read permissions for actions and contents, but the main job doesn't explicitly declare them—causing permission errors during dispatch.
  2. A check for github.base_ref fails when the value is empty due to missing quotes around the variable, resulting in a syntax error.

Explain the Changes

  1. Explicitly add read permissions for actions and contents to the main job.
  2. Wrap github.base_ref in quotes to safely handle cases where it may be empty.

Issues: Fixed #xxx / Gap #xxx

Testing Instructions:

  • Doc added/updated
  • Tests added

Summary by CodeRabbit

  • Chores
    • Updated workflow permissions to clarify and restrict access.
    • Improved shell script robustness in workflow configuration.

Copy link

coderabbitai bot commented Jul 16, 2025

"""

Walkthrough

The GitHub Actions workflow configuration was updated to specify explicit permissions for actions and contents, and a shell script in the build-noobaa-image job was modified to quote a variable in a conditional check. No additional logic or structural changes were introduced.

Changes

File(s) Change Summary
.github/workflows/run-pr-tests.yaml Added explicit permissions for actions and contents; quoted variable in conditional shell check

Sequence Diagram(s)

No sequence diagram generated as the changes are limited to workflow permissions and minor shell syntax adjustments.

Possibly related PRs

Suggested reviewers

  • romayalon
  • nimrod-becker
    """

📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between a67ac53 and b87edda.

📒 Files selected for processing (1)
  • .github/workflows/run-pr-tests.yaml (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/run-pr-tests.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). (3)
  • GitHub Check: run-package-lock-validation
  • GitHub Check: Build Noobaa Image
  • GitHub Check: run-jest-unit-tests

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 fix-dispatch branch 2 times, most recently from 54c4ce2 to a67ac53 Compare July 16, 2025 11:27
@nadavMiz nadavMiz marked this pull request as ready for review July 16, 2025 11:35
@nadavMiz nadavMiz requested review from liranmauda and romayalon July 16, 2025 11:35
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 3f49f4e and a67ac53.

📒 Files selected for processing (1)
  • .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 (3)
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.
Learnt from: nadavMiz
PR: noobaa/noobaa-core#9099
File: .github/workflows/run-pr-tests.yaml:126-134
Timestamp: 2025-06-19T11:04:50.175Z
Learning: In make commands, the `-o` flag followed by a target name (e.g., `-o builder`) tells make to skip building that specific target, assuming it's already up to date. This is used in the noobaa-core project's workflow to skip building the builder image when it was successfully pulled from a registry.
Learnt from: nadavMiz
PR: noobaa/noobaa-core#9099
File: .github/workflows/run-pr-tests.yaml:135-136
Timestamp: 2025-06-19T11:03:49.934Z
Learning: In the noobaa-core project, the `make tester` command also calls `make noobaa` due to makefile target dependencies, so running `make tester` will build both the noobaa and tester images.
🪛 YAMLlint (1.37.1)
.github/workflows/run-pr-tests.yaml

[warning] 7-7: wrong indentation: expected 6 but found 2

(indentation)

⏰ 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). (11)
  • GitHub Check: ceph-nsfs-s3-tests / NSFS Ceph S3 Tests
  • GitHub Check: mint-tests / Mint Tests
  • GitHub Check: warp-nc-tests / Warp NC Tests
  • GitHub Check: warp-tests / Warp Tests
  • GitHub Check: mint-nc-tests / Mint NC Tests
  • GitHub Check: run-sanity-ssl-tests / Sanity SSL Tests
  • GitHub Check: run-nc-unit-tests / Non Containerized Unit Tests
  • GitHub Check: run-unit-tests-postgres / Unit Tests with Postgres
  • GitHub Check: ceph-s3-tests / Ceph S3 Tests
  • GitHub Check: run-unit-tests / Unit Tests
  • GitHub Check: run-jest-unit-tests
🔇 Additional comments (1)
.github/workflows/run-pr-tests.yaml (1)

68-74: Variable now safely quoted – good fix

Wrapping ${{ github.base_ref }} in quotes prevents [[ -n … ]] from erroring on an empty value. Looks solid.

Signed-off-by: nadav mizrahi <[email protected]>
@nadavMiz nadavMiz merged commit 176b00b into noobaa:master Jul 16, 2025
18 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