Skip to content

chore(evalhub): hardcoded providers not needed#649

Closed
tarilabs wants to merge 1 commit intotrustyai-explainability:mainfrom
tarilabs:tarilabs-20260217
Closed

chore(evalhub): hardcoded providers not needed#649
tarilabs wants to merge 1 commit intotrustyai-explainability:mainfrom
tarilabs:tarilabs-20260217

Conversation

@tarilabs
Copy link
Member

@tarilabs tarilabs commented Feb 17, 2026

Summary by CodeRabbit

  • Refactor
    • Streamlined configuration to focus on database and secrets management, removing provider configuration capabilities.
    • Eliminated default provider definitions and associated configuration files.

Signed-off-by: tarilabs <matteo.mortari@gmail.com>
@tarilabs tarilabs requested a review from ruivieira February 17, 2026 11:00
@openshift-ci
Copy link

openshift-ci bot commented Feb 17, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:

The full list of commands accepted by this bot can be found 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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 17, 2026

📝 Walkthrough

Walkthrough

EvalHub controller configuration is simplified by removing the ProviderConfig type, eliminating provider and collection fields from EvalHubConfig, and stopping generation of providers.yaml. Database and secrets configuration remains. RBAC resources are reorganized in kustomization.yaml with adjusted ordering and substituted entries.

Changes

Cohort / File(s) Summary
RBAC Configuration
config/rbac/kustomization.yaml
Resources list reorganized: EvalHub and MLflow RBAC entries reordered with mlflow_access_binding and mlflow_access_role added, replacing previous entries without altering top-level resource count.
EvalHub Configuration Logic
controllers/evalhub/configmap.go, controllers/evalhub/deployment.go
ProviderConfig type removed; EvalHubConfig struct simplified to contain only Database and Secrets fields; generateConfigData no longer initializes default providers/collections or generates providers.yaml; PROVIDERS_CONFIG_PATH environment variable removed from deployment spec with TODO comment.
EvalHub Tests
controllers/evalhub/configmap_test.go, controllers/evalhub/evalhub_controller_test.go, controllers/evalhub/unit_test.go
Removed all validation and parsing of providers.yaml; eliminated tests for default provider configurations (lm-eval-harness, ragas-provider, garak-security, trustyai-custom); tests now assert only config.yaml presence and contents.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

project/evalhub

Suggested reviewers

  • RobGeada

Poem

🐰 Off with the providers, we hop and we bound,
ConfigMaps are lighter, much cleaner we've found,
No more bundles of roles, just secrets and base,
A simpler EvalHub in its rightful place! 🌿

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: removal of hardcoded provider configurations from the EvalHub controller, which is the primary objective across multiple file modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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

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

Copy link
Contributor

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

🧹 Nitpick comments (1)
controllers/evalhub/deployment.go (1)

110-114: Consider removing the commented-out code entirely.

Commented-out code tends to become stale noise. The TODO intent can be preserved as a standalone comment or tracked in an issue, without leaving the dead EnvVar struct literal in the source.

Suggested simplification
-		// TODO: reconsider when the Operator reads OOTB providers from ConfigMaps
-		// {
-		// 	Name:  "PROVIDERS_CONFIG_PATH",
-		// 	Value: "/etc/evalhub/providers.yaml",
-		// },
+		// TODO: reconsider reading OOTB providers from ConfigMaps (may reintroduce PROVIDERS_CONFIG_PATH)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@controllers/evalhub/deployment.go` around lines 110 - 114, Remove the dead
commented EnvVar struct literal that sets PROVIDERS_CONFIG_PATH in deployment.go
(the three-line commented block containing Name: "PROVIDERS_CONFIG_PATH", Value:
"/etc/evalhub/providers.yaml") and either leave a short TODO comment or create
an issue to track the operator ConfigMap behavior; ensure no leftover commented
EnvVar entries remain in the deployment spec so the code stays clean.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@controllers/evalhub/deployment.go`:
- Around line 110-114: Remove the dead commented EnvVar struct literal that sets
PROVIDERS_CONFIG_PATH in deployment.go (the three-line commented block
containing Name: "PROVIDERS_CONFIG_PATH", Value: "/etc/evalhub/providers.yaml")
and either leave a short TODO comment or create an issue to track the operator
ConfigMap behavior; ensure no leftover commented EnvVar entries remain in the
deployment spec so the code stays clean.

@openshift-ci
Copy link

openshift-ci bot commented Feb 17, 2026

@tarilabs: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/trustyai-service-operator-e2e 41248d1 link true /test trustyai-service-operator-e2e

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.

@tarilabs
Copy link
Member Author

to be closed in favour of #650

@tarilabs tarilabs closed this Feb 18, 2026
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.

1 participant