Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] ML Model Registration endpoints fail due to parameter requirements check #3292

Open
nathaliellenaa opened this issue Dec 23, 2024 · 0 comments
Labels
bug Something isn't working untriaged

Comments

@nathaliellenaa
Copy link

What is the bug?
ML Model Registration endpoints are failing due to a breaking change from the core. The current implementation allows optional path parameters (model_id and version) in endpoints like /_plugins/_ml/models/{model_id}/{version}/_register and /_plugins/_ml/models/_register. However, the core now requires all defined path parameters to be consumed, making the current optional parameter handling invalid (ref).

The check for the parameters was introduced in 1.0.0-alpha1 version, specifically in this commit.

How can one reproduce the bug?
Running this in dev tools:

POST /_plugins/_ml/models/xv-F5pMBrJdjeJHHBXXV/1.0.0/_register

Resulted in this error:

{
  "error": {
    "root_cause": [
      {
        "type": "illegal_argument_exception",
        "reason": "request [/_plugins/_ml/models/xv-F5pMBrJdjeJHHBXXV/1.0.0/_register] contains unrecognized parameters: [model_id], [version]"
      }
    ],
    "type": "illegal_argument_exception",
    "reason": "request [/_plugins/_ml/models/xv-F5pMBrJdjeJHHBXXV/1.0.0/_register] contains unrecognized parameters: [model_id], [version]"
  },
  "status": 400
}

What is the expected behavior?
All defined path parameters should be properly consumed by the REST handler. The registration request should be processed without throwing IllegalArgumentException about unrecognized parameters.

@nathaliellenaa nathaliellenaa added bug Something isn't working untriaged labels Dec 23, 2024
@nathaliellenaa nathaliellenaa changed the title [BUG] ML Model Registration endpoints fail due to parameter requirements [BUG] ML Model Registration endpoints fail due to parameter requirements check Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working untriaged
Projects
None yet
Development

No branches or pull requests

1 participant