Skip to content

Conversation

@macayaven
Copy link

@macayaven macayaven commented Oct 30, 2025

Summary

This PR adds comprehensive OpenShift AI / Open Data Hub support to the MCP server, enabling AI assistants to manage data science workloads through 23 new MCP tools across 5 resource categories.

Features

Resource Categories (23 tools total):

  • Data Science Projects (DataSciencePipelinesApplications): list, get, create, delete
  • Models: list, get, create, update, delete
  • Applications (Jupyter notebooks, code servers): list, get, create, delete
  • Experiments: list, get, create, delete
  • Pipelines: list, get, create, delete, plus list and get pipeline runs

Implementation

Follows established patterns from core and helm toolsets:

  • Simple init functions: Uses init*() functions with slices.Concat() pattern (matches core/helm)
  • Direct function references: Handler functions use direct references instead of lambda closures
  • Client caching: OpenShift AI client cached in Kubernetes manager for efficiency
  • CRD-based detection: Automatically detects OpenShift AI via DataScienceCluster CRD
  • Zero vendor changes: No modifications to vendor directory
  • Comprehensive testing: Snapshot tests for all 23 tool definitions

New packages:

  • pkg/openshift-ai/: Core client and resource handlers
  • pkg/toolsets/openshift-ai/: MCP tool implementations
  • pkg/api/datascience_project.go: Tool definitions and schemas

Testing

All tests pass:

make build  # ✅ 0 issues
make lint   # ✅ 0 issues  
make test   # ✅ All tests pass (except unrelated pkg/mcp timeout)

Verified with MCP Inspector and live cluster smoke test.

Design Decisions

  1. Default enabled: OpenShift AI toolset enabled by default alongside core, config, and helm
  2. Namespace-scoped: All tools support namespace parameter for standard Kubernetes RBAC
  3. Pattern consistency: Matches core/helm implementation exactly (1 abstraction layer, simple functions)
  4. Go-native: Uses client-go directly with dynamic client for flexibility

Checklist

  • Clean commit history (single logical commit)
  • Conventional commit message format
  • make build passes
  • make lint passes
  • make test passes
  • Tested with mcp-inspector
  • Follows existing package structure
  • Go-based native implementation
  • Comprehensive test coverage
  • Zero vendor changes

@openshift-ci openshift-ci bot requested review from Cali0707 and matzew October 30, 2025 22:16
@openshift-ci
Copy link

openshift-ci bot commented Oct 30, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: macayaven
Once this PR has been reviewed and has the lgtm label, please assign ardaguclu for approval. For more information see the Code Review Process.

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

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 needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Oct 30, 2025
@openshift-ci
Copy link

openshift-ci bot commented Oct 30, 2025

Hi @macayaven. Thanks for your PR.

I'm waiting for a github.com member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

Adds comprehensive OpenShift AI support following the project's
established patterns from core and helm toolsets.

Tools organized into 5 categories:
- Data Science Projects (4 tools): list, get, create, delete
- Models (5 tools): list, get, create, update, delete
- Applications (4 tools): list, get, create, delete
- Experiments (4 tools): list, get, create, delete
- Pipelines (6 tools): pipelines (list, get, create, delete) +
  pipeline runs (list, get)

Implementation details:
- Uses simple init*() functions with slices.Concat() pattern
- Direct function references for handlers (matches core/helm)
- CRD-based cluster detection via DataScienceCluster resources
- Client caching in Kubernetes manager for efficiency
- Zero vendor changes
- Comprehensive snapshot tests for all tool definitions

Total: 23 tools for complete OpenShift AI lifecycle management
@macayaven macayaven force-pushed the 001-openshift-ai-clean branch from b1b9c24 to 1d5c5dd Compare November 1, 2025 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant