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] Standalone Connector update (Within a model update) message is misleading #3427

Open
brianf-aws opened this issue Jan 23, 2025 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@brianf-aws
Copy link
Contributor

brianf-aws commented Jan 23, 2025

What is the bug?
Context:
While updating a connector attached to a model via a model id, the message that appears is false even when the field does not exist for example.

## Create a connector 
{
	"connector_id": "Nx2TlZQBrGHu3J9owF7o"
}

### Register to model
{
	"name": "AWS TItan MM embedding model",
	"function_name": "remote",
	"description": "AWS TItan MM embedding model",
	"connector_id" : "Nx2TlZQBrGHu3J9owF7o"
}

PUT /_plugins/_ml/models/Fsp2BZMBO39bHfNca1lv
{
  "connectors": {
    "credential": {
      "auth": "..."
    }
  }
}
## result
{
	"_index": ".plugins-ml-model",
	"_id": "Fsp2BZMBO39bHfNca1lv",
	"_version": 3,
	"result": "updated",
	"_shards": {
		"total": 1,
		"successful": 1,
		"failed": 0
	},
	"_seq_no": 5,
	"_primary_term": 1
}
## Even this
PUT /_plugins/_ml/models/Fsp2BZMBO39bHfNca1lv
{
  "connectorssss_blah": { <--- could be any string
    "credential": {
      "auth": "..."
    }
  }
}

## result
{
	"_index": ".plugins-ml-model",
	"_id": "Fsp2BZMBO39bHfNca1lv",
	"_version": 3,
	"result": "updated",
	"_shards": {
		"total": 1,
		"successful": 1,
		"failed": 0
	},
	"_seq_no": 5,
	"_primary_term": 1
}

## But when the update is on the connector (singular valid field)
##            then it will cause a NPE when connector is updated as this a valid field
PUT /_plugins/_ml/models/Fsp2BZMBO39bHfNca1lv
{
  "connector": { <--- This actually is a valid field
    "credential": {
      "auth": "..."
    }
  }
}

{
	"error": {
		"root_cause": [
			{
				"type": "null_pointer_exception",
				"reason": "Cannot invoke \"org.opensearch.ml.common.connector.Connector.update(org.opensearch.ml.common.transport.connector.MLCreateConnectorInput, java.util.function.Function)\" because \"connector\" is null"
			}
		],
		"type": "null_pointer_exception",
		"reason": "Cannot invoke \"org.opensearch.ml.common.connector.Connector.update(org.opensearch.ml.common.transport.connector.MLCreateConnectorInput, java.util.function.Function)\" because \"connector\" is null"
	},
	"status": 500
}

What is the expected behavior?
A valid exception should be thrown for not actually updating something that is there. Since this was a standalone connector it wasnt really associated to the model directly.

What is your host/environment?

  • OS: [e.g. iOS]
  • Version [e.g. 22]
  • Plugins

Do you have any screenshots?

Image

Do you have any additional context?
Add any other context about the problem.

@brianf-aws brianf-aws added bug Something isn't working untriaged labels Jan 23, 2025
@brianf-aws brianf-aws changed the title [BUG] Standalone Connector update message is misleading [BUG] Standalone Connector update (Within the model update) message is misleading Jan 24, 2025
@brianf-aws brianf-aws changed the title [BUG] Standalone Connector update (Within the model update) message is misleading [BUG] Standalone Connector update (Within a model update) message is misleading Jan 24, 2025
@brianf-aws
Copy link
Contributor Author

Can you assign this to me?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: On-deck
Development

No branches or pull requests

2 participants