Skip to content

Conversation

@davidkyle
Copy link
Member

Jobs have a field model_snapshot_retention_days describing how long old model snapshots should be kept for. If the value is null model snapshots are never deleted.

model_snapshot_retention_days has a default value of 1 statically set in Job.Builder. If the field is later explicitly set to null the null value will not be written in toXContent and so the parser will never read the field and set it back to null meaning the default value comes back into play and the information that the field was previously null is lost. This happens anywhere the job is parsed.

@elasticmachine
Copy link
Collaborator

Pinging @elastic/ml-core

@davidkyle
Copy link
Member Author

After reviewing the REST API and the API docs there is no way a user can set model_snapshot_retention_days to null. The test is broken as it is using a undocumented feature and it is the test that should be fixed.

Closing without merging.

@davidkyle davidkyle closed this Oct 24, 2018
@davidkyle davidkyle deleted the defaults-overwrite-nulls branch October 24, 2018 14:52
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.

3 participants