Skip to content

Make BigQuery optional for local development - #801

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
JoelSpeed:allow-disable-jira-locally
Aug 5, 2026
Merged

openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
JoelSpeed:allow-disable-jira-locally

Conversation

@JoelSpeed

@JoelSpeed JoelSpeed commented Jul 21, 2026 •

Copy link
Copy Markdown
Contributor

The bigquery requirement was added recently and makes local development of the majority of release payload controller difficult (since I'd have to set up a bigquery).

As far as I can tell the bigquery stuff is only used in one of the controllers. This PR makes the bigquery client optional (to match the jira client) for local dev.

Summary by CodeRabbit

Bug Fixes

  • The release payload controller can now start without BigQuery credentials.
  • BigQuery initialization is optional when credentials are unavailable, and initialization failures no longer prevent startup.
  • Caching remains enabled only when a positive cache duration is configured.
  • Jira escalation handling now supports operation when BigQuery is unavailable, reducing avoidable startup errors.

@coderabbitai

coderabbitai Bot commented Jul 21, 2026 •

Copy link
Copy Markdown
Contributor

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 6d9809a3-cddd-447e-8878-34fa1b23998c

📥 Commits

Reviewing files that changed from the base of the PR and between c99f3af and 3c415ed.

📒 Files selected for processing (2)
  • pkg/cmd/release-payload-controller/cmd.go
  • pkg/cmd/release-payload-controller/jira_escalations_controller_test.go
🚧 Files skipped from review as they are similar to previous changes (2)
  • pkg/cmd/release-payload-controller/jira_escalations_controller_test.go
  • pkg/cmd/release-payload-controller/cmd.go

📝 Walkthrough

Walkthrough

The release payload controller no longer requires BigQuery credentials during validation. It initializes BigQuery only when both credentials are present. A new test verifies Jira escalation controller construction with a nil BigQuery client.

Changes

Release payload controller

Layer / File(s) Summary
Optional BigQuery validation and startup
pkg/cmd/release-payload-controller/cmd.go
Jira options remain validated. BigQuery initialization is conditional, and failures are logged instead of terminating startup.
Nil BigQuery constructor coverage
pkg/cmd/release-payload-controller/jira_escalations_controller_test.go
Adds coverage for successful controller construction with a nil BigQuery client.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: alexnpavel, bradmwilliams

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the primary change: making BigQuery optional for local development.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@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: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@pkg/cmd/release-payload-controller/cmd.go`:
- Around line 85-98: The Validate method incorrectly accesses the unavailable
flagutil.JiraOptions.Endpoint field. Track whether Jira is configured using a
supported Jira configuration check or stored state, then use that state to gate
the GoogleProjectID and GoogleServiceAccountCredentialFile validations while
preserving the existing Jira validation.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: b8bce586-5853-4039-a74c-10028cf52646

📥 Commits

Reviewing files that changed from the base of the PR and between 7587fe0 and f41b142.

📒 Files selected for processing (1)
  • pkg/cmd/release-payload-controller/cmd.go

Comment thread pkg/cmd/release-payload-controller/cmd.go Outdated
@JoelSpeed
JoelSpeed force-pushed the allow-disable-jira-locally branch 3 times, most recently from fee0591 to 7e52046 Compare July 24, 2026 13:03

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
pkg/cmd/release-payload-controller/cmd.go (1)

84-89: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Require a usable BigQuery client whenever Jira is enabled.

Validate now accepts configured Jira without checking BigQuery, while Run treats missing credentials and NewBigQueryClient failures as non-fatal and passes a nil client to the Jira controller. This violates the stated contract and can silently start a degraded Jira escalation path. Require both credentials and fail startup on BigQuery initialization errors when Jira is configured; retain the optional path only when Jira is disabled.

Also applies to: 147-163

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pkg/cmd/release-payload-controller/cmd.go` around lines 84 - 89, Update
Options.Validate and the Jira-enabled startup path in Run to require BigQuery
credentials and successfully initialize NewBigQueryClient whenever Jira is
configured; return validation or initialization errors instead of continuing
with a nil client. Preserve the optional BigQuery behavior only when Jira is
disabled.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@pkg/cmd/release-payload-controller/cmd.go`:
- Around line 84-89: Update Options.Validate and the Jira-enabled startup path
in Run to require BigQuery credentials and successfully initialize
NewBigQueryClient whenever Jira is configured; return validation or
initialization errors instead of continuing with a nil client. Preserve the
optional BigQuery behavior only when Jira is disabled.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 78e524fc-999a-4cd9-bb40-d2c168469c29

📥 Commits

Reviewing files that changed from the base of the PR and between fee0591 and 7e52046.

📒 Files selected for processing (2)
  • pkg/cmd/release-payload-controller/cmd.go
  • pkg/cmd/release-payload-controller/jira_escalations_controller_test.go

@bradmwilliams

Copy link
Copy Markdown
Collaborator

I have the fix for the govulncheck failure in my PR: #803. I'm planning on merging it very soon.

Also, CodeRabbit's latest finding seem legit as well.

@JoelSpeed

Copy link
Copy Markdown
Contributor Author

Also, CodeRabbit's latest finding seem legit as well.

Do you mean #801 (review), this was what I tried to fix in my original patch, but I thought we had concluded that this wasn't possible in a non-hacky way without looking up the flag. Unless I'm missing something, there's no easy way to understand if the jira controller is, or is not enabled

@JoelSpeed
JoelSpeed force-pushed the allow-disable-jira-locally branch from 7e52046 to 3c415ed Compare August 5, 2026 10:41
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@openshift-ci

openshift-ci Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

@JoelSpeed: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Aug 5, 2026
@openshift-ci

openshift-ci Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bradmwilliams, JoelSpeed

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 5, 2026
@openshift-merge-bot
openshift-merge-bot Bot merged commit 65da42a into openshift:main Aug 5, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants