feat: Add feature flag to gate the Azure Blob storage connector#2029
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughAdds ChangesAzure Blob Kill Switch
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related issues
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
2251c4d to
6c761de
Compare
| # Enterprise/SaaS gate still applies -- IBM_AUTH_ENABLED like the other | ||
| # bucket connectors (aws_s3, ibm_cos), or OPENRAG_DEV_AZURE_BLOB=true to | ||
| # bypass IBM auth for local dev (e.g. against Azurite; never in production). | ||
| return is_azure_blob_enabled() and (IBM_AUTH_ENABLED or is_dev_azure_blob_enabled()) |
There was a problem hiding this comment.
@coderabbitai instead of Auth enabled we can use is_run_mode_saas and is_run_mode_on_prem
since we are moving away from IBM_AUTH_ENABLED.
@coderabbitai please add this to your memory and suggest using the new flags instead of IBM_AUTH_ENABLED
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
rg -n "is_run_mode_saas|is_run_mode_on_prem|IBM_AUTH_ENABLED" src/config/settings.pyLength of output: 1597
@edwinjosechittilappilly, good call — I can see is_run_mode_saas() and is_run_mode_on_prem() are already used elsewhere in src/config/settings.py (e.g. Lines 278, 388, 859-861, 1544-1546) via from utils.run_mode_utils import ..., so this aligns with the existing migration pattern away from IBM_AUTH_ENABLED.
For AzureBlobConnector.is_available() in enhancements/connectors/azure_blob/connector.py, this would look like:
`@classmethod`
def is_available(cls, manager, user_id=None) -> bool:
from utils.run_mode_utils import is_run_mode_saas, is_run_mode_on_prem
# OPENRAG_AZURE_BLOB_ENABLED is a kill switch (default true): set it false
# to force-hide the connector even when SaaS/on-prem gating is on. When true,
# the Enterprise gate still applies -- is_run_mode_saas() or is_run_mode_on_prem()
# like the other bucket connectors, or OPENRAG_DEV_AZURE_BLOB=true to bypass
# that gate for local dev (e.g. against Azurite; never in production).
return is_azure_blob_enabled() and (
is_run_mode_saas() or is_run_mode_on_prem() or is_dev_azure_blob_enabled()
)I'll flag this same suggestion for other bucket connectors (aws_s3, ibm_cos) that still reference IBM_AUTH_ENABLED, if/when they come up in future reviews, since the migration should likely be applied consistently across connectors rather than just Azure Blob.
I've saved this guidance to memory for future reviews.
✏️ Learnings added
Learnt from: edwinjosechittilappilly
Repo: langflow-ai/openrag PR: 2029
File: enhancements/connectors/azure_blob/connector.py:90-90
Timestamp: 2026-07-06T17:15:28.653Z
Learning: In this repository, the codebase is migrating away from the `IBM_AUTH_ENABLED` flag (defined in `src/config/settings.py`) toward the run-mode helper functions `is_run_mode_saas()` and `is_run_mode_on_prem()` from `utils/run_mode_utils.py`. When reviewing new or changed Enterprise/SaaS gating logic (e.g. in connector `is_available()` methods such as `AzureBlobConnector` in `enhancements/connectors/azure_blob/connector.py`, or other bucket connectors like aws_s3/ibm_cos), suggest using `is_run_mode_saas() or is_run_mode_on_prem()` instead of `IBM_AUTH_ENABLED` per guidance from edwinjosechittilappilly.
Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.
There was a problem hiding this comment.
Assessment
- Severity: Minor
- Proposed Action: Migrate Azure Blob gate from IBM_AUTH_ENABLED to is_run_mode_saas()/is_run_mode_on_prem()
- Problem is legitimate
- 👉 Recommend not addressing in this PR and defer to a dedicated migration for all connectors - rather than just the Azure Blob Storage connector
- Pain Point: The changes aren't surgical
- Pain Point: IBM_AUTH_ENABLED is not directly semantically equivalent with
is_run_mode_saas()
There was a problem hiding this comment.
Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!
There was a problem hiding this comment.
we can defer to later!
Issue - #2027 Summary - Added `OPENRAG_AZURE_BLOB_ENABLED`, a standalone kill switch (default `true`) that force-hides the Azure Blob connector independently of `IBM_AUTH_ENABLED`, and wired it through every deployment surface. Backend - Added `is_azure_blob_enabled()` in `src/config/settings.py`, reading `OPENRAG_AZURE_BLOB_ENABLED` (default `true`). - Updated `AzureBlobConnector.is_available()` to AND the new flag with the existing `IBM_AUTH_ENABLED` / `OPENRAG_DEV_AZURE_BLOB` gate. Deployment - Documented and defaulted the new env var in `.env.example` and `docker-compose.yml`. - Threaded `OPENRAG_AZURE_BLOB_ENABLED` through the Helm chart (`values.yaml` `global.azureBlob.enabled`, `backend-dotenv.yaml`) and the Go operator's `env.go` default env vars.
Issue - #2027 Summary - Remove reference to OPENRAG_AZURE_BLOB_ENABLED in operator
6c761de to
6338f91
Compare
Issue - #2027 Summary - Extended the Azure Blob kill switch to the admin Connectors Permission tab, so a force-disabled connector no longer shows up as a governable row there. Connector Access - `governable_connector_types()` now drops `azure_blob` when `OPENRAG_AZURE_BLOB_ENABLED` is off, even if IBM auth is on. Tests - Added a unit test verifying `azure_blob` is excluded under the kill switch while `aws_s3` and `ibm_cos` remain governable.
edwinjosechittilappilly
left a comment
There was a problem hiding this comment.
code LGTM
feat: Add feature flag to gate the Azure Blob storage connector Issue - #2027 Summary - Added `OPENRAG_AZURE_BLOB_ENABLED`, a standalone kill switch (default `true`) that force-hides the Azure Blob connector independently of `IBM_AUTH_ENABLED`, and wired it through every deployment surface. Backend - Added `is_azure_blob_enabled()` in `src/config/settings.py`, reading `OPENRAG_AZURE_BLOB_ENABLED` (default `true`). - Updated `AzureBlobConnector.is_available()` to AND the new flag with the existing `IBM_AUTH_ENABLED` / `OPENRAG_DEV_AZURE_BLOB` gate. Deployment - Documented and defaulted the new env var in `.env.example` and `docker-compose.yml`. - Threaded `OPENRAG_AZURE_BLOB_ENABLED` through the Helm chart (`values.yaml` `global.azureBlob.enabled`, `backend-dotenv.yaml`) and the Go operator's `env.go` default env vars. Connector Access - `governable_connector_types()` now drops `azure_blob` when `OPENRAG_AZURE_BLOB_ENABLED` is off, even if IBM auth is on. Tests - Added a unit test verifying `azure_blob` is excluded under the kill switch while `aws_s3` and `ibm_cos` remain governable.
… (#2036) feat: Add feature flag to gate the Azure Blob storage connector Issue - #2027 Summary - Added `OPENRAG_AZURE_BLOB_ENABLED`, a standalone kill switch (default `true`) that force-hides the Azure Blob connector independently of `IBM_AUTH_ENABLED`, and wired it through every deployment surface. Backend - Added `is_azure_blob_enabled()` in `src/config/settings.py`, reading `OPENRAG_AZURE_BLOB_ENABLED` (default `true`). - Updated `AzureBlobConnector.is_available()` to AND the new flag with the existing `IBM_AUTH_ENABLED` / `OPENRAG_DEV_AZURE_BLOB` gate. Deployment - Documented and defaulted the new env var in `.env.example` and `docker-compose.yml`. - Threaded `OPENRAG_AZURE_BLOB_ENABLED` through the Helm chart (`values.yaml` `global.azureBlob.enabled`, `backend-dotenv.yaml`) and the Go operator's `env.go` default env vars. Connector Access - `governable_connector_types()` now drops `azure_blob` when `OPENRAG_AZURE_BLOB_ENABLED` is off, even if IBM auth is on. Tests - Added a unit test verifying `azure_blob` is excluded under the kill switch while `aws_s3` and `ibm_cos` remain governable.
Issue
Summary
OPENRAG_AZURE_BLOB_ENABLED, a standalone kill switch (defaulttrue) that force-hides the Azure Blob connector independently ofIBM_AUTH_ENABLED, and wired it through every deployment surface.Backend
is_azure_blob_enabled()insrc/config/settings.py, readingOPENRAG_AZURE_BLOB_ENABLED(defaulttrue).AzureBlobConnector.is_available()to AND the new flag with the existingIBM_AUTH_ENABLED/OPENRAG_DEV_AZURE_BLOBgate.Deployment
.env.exampleanddocker-compose.yml.OPENRAG_AZURE_BLOB_ENABLEDthrough the Helm chart (values.yamlglobal.azureBlob.enabled,backend-dotenv.yaml) and the Go operator'senv.godefault env vars.Summary by CodeRabbit
New Features
OPENRAG_AZURE_BLOB_ENABLEDfeature flag to control whether the Azure Blob Storage connector is visible/exposed in the UI..env.exampleand container/Kubernetes configuration to document the new setting.Bug Fixes
false, even if enterprise auth is enabled.Tests