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] Model Group does not update lastUpdatedTime #3408

Open
brianf-aws opened this issue Jan 17, 2025 · 0 comments
Open

[BUG] Model Group does not update lastUpdatedTime #3408

brianf-aws opened this issue Jan 17, 2025 · 0 comments
Labels
bug Something isn't working untriaged

Comments

@brianf-aws
Copy link
Contributor

brianf-aws commented Jan 17, 2025

(Good First issue!)

What is the bug?
Currently model groups have a created time field and a last updated time field. However the updated time won't update accordingly on update.

This problem is very similar to this one which involves updating the time just before indexing the connector (#2890).

How can one reproduce the bug?
Steps to reproduce the behavior:

  1. Create the model group
curl --request POST \
  --url http://localhost:9200/_plugins/_ml/model_groups/_register \
  --header 'Content-Type: application/json' \
  --header 'User-Agent: insomnia/10.0.0' \
  --data '{
  "name": "Asymmetric Model Group",
  "description": "A model group for local asymmetric models"
}'
  1. Inspect the time
curl --request GET \
  --url http://localhost:9200/_plugins/_ml/model_groups/RfW-dZQBGaSTjkdpLdZQ \
  --header 'Content-Type: application/json'

## you get
{
	"name": "Asymmetric Model Group",
	"latest_version": 0,
	"description": "A model group for local asymmetric models",
	"access": "public",
	"created_time": 1737142185135,
	"last_updated_time": 1737142185135 <--- Take note
}
  1. Update the model group
curl --request PUT \
  --url http://localhost:9200/_plugins/_ml/model_groups/RfW-dZQBGaSTjkdpLdZQ \
  --header 'Content-Type: application/json' \
  --header 'User-Agent: insomnia/10.0.0' \
  --data '{
  "name": "Asymmetric Model Group",
  "description": "I want to update this"
}'
  1. Inspect the time again
curl --request GET \
  --url http://localhost:9200/_plugins/_ml/model_groups/RfW-dZQBGaSTjkdpLdZQ \
  --header 'Content-Type: application/json'

{
	"name": "Asymmetric Model Group",
	"latest_version": 0,
	"description": "I want to update this",
	"access": "public",
	"created_time": 1737142185135,
	"last_updated_time": 1737142185135 <------ problem is here
}

What is the expected behavior?
the last_updated_time ought to be updated

What is your host/environment?

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

Do you have any screenshots?
If applicable, add screenshots to help explain your problem.

Do you have any additional context?
You can follow a similar solution on this PR (#2890). Try looking for the section of code that involves the update of the model group and just before it gets indexed update the time there

@brianf-aws brianf-aws added bug Something isn't working untriaged labels Jan 17, 2025
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