Skip to content

fix(catalog): replace phantom yamlMCPArtifact struct with generated openapi.MCPArtifact#2512

Merged
google-oss-prow[bot] merged 1 commit intokubeflow:mainfrom
chambridge:fix/mcp-artifact-struct-alignment
Mar 30, 2026
Merged

fix(catalog): replace phantom yamlMCPArtifact struct with generated openapi.MCPArtifact#2512
google-oss-prow[bot] merged 1 commit intokubeflow:mainfrom
chambridge:fix/mcp-artifact-struct-alignment

Conversation

@chambridge
Copy link
Copy Markdown
Contributor

Description

The custom yamlMCPArtifact struct had fields (Name, Type) not present in the OpenAPI spec and was missing timestamp fields (createTimeSinceEpoch, lastUpdateTimeSinceEpoch) that are defined in the spec. This caused silent data loss of artifact timestamps through the entire MCP server YAML loader pipeline. Replacing it with the generated apimodels.MCPArtifact type ensures struct-to-JSON fidelity and prevents field drift.

Adds a round-trip test verifying timestamps survive ToMCPServerProviderRecord() serialization.

How Has This Been Tested?

Unit tests
Loading manifest data

Merge criteria:

  • All the commits have been signed-off (To pass the DCO check)
  • The commits have meaningful messages
  • Automated tests are provided as part of the PR for major new functionalities; testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has manually tested the changes and verified that the changes work.
  • Code changes follow the kubeflow contribution guidelines.
  • For first time contributors: Please reach out to the Reviewers to ensure all tests are being run, ensuring the label ok-to-test has been added to the PR.

If you have UI changes

  • The developer has added tests or explained why testing cannot be added.
  • Included any necessary screenshots or gifs if it was a UI change.
  • Verify that UI/UX changes conform the UX guidelines for Kubeflow.

…penapi.MCPArtifact

The custom yamlMCPArtifact struct had fields (Name, Type) not present in
the OpenAPI spec and was missing timestamp fields (createTimeSinceEpoch,
lastUpdateTimeSinceEpoch) that are defined in the spec. This caused
silent data loss of artifact timestamps through the entire MCP server
YAML loader pipeline. Replacing it with the generated apimodels.MCPArtifact
type ensures struct-to-JSON fidelity and prevents field drift.

Adds a round-trip test verifying timestamps survive
ToMCPServerProviderRecord() serialization.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Chris Hambridge <chambrid@redhat.com>
Copy link
Copy Markdown
Member

@pboyd pboyd left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@google-oss-prow
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: pboyd

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

@google-oss-prow google-oss-prow bot merged commit d887739 into kubeflow:main Mar 30, 2026
27 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants