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

Fix xpack.usage ILM actions #3265

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Fix xpack.usage ILM actions #3265

wants to merge 1 commit into from

Conversation

pquentin
Copy link
Member

@pquentin pquentin commented Dec 9, 2024

I've been trying to understand today why sometimes 2 responses for xpack.usage validate, and sometimes only one. I don't understand it yet, but I have fixed the Type 'string[]' has no properties in common with type 'IlmActions'. issue. Before/after:

$ make validate api=xpack.usage branch=main | rg --fixed-strings "Type 'string[]' has no properties in common with type 'IlmActions'." | wc -l
    3468
$ git checkout xpack-usage-ilm-action
Switched to branch 'xpack-usage-ilm-action'
$ make validate api=xpack.usage branch=main | rg --fixed-strings "Type 'string[]' has no properties in common with type 'IlmActions'." | wc -l
       0

(Plenty of other issues remain, like configurations is totally missing even though it encodes a lot of information since Elasticsearch 7.15.

They're list of strings, not full actions.
Copy link
Contributor

github-actions bot commented Dec 9, 2024

Following you can find the validation results for the APIs you have changed.

API Status Request Response
ilm.delete_lifecycle 🟢 2/2 2/2
ilm.explain_lifecycle 🟢 5/5 5/5
ilm.get_lifecycle 🟢 8/8 8/8
ilm.get_status 🟢 4/4 4/4
ilm.migrate_to_data_tiers Missing test Missing test
ilm.move_to_step Missing test Missing test
ilm.put_lifecycle 🟢 6/6 6/6
ilm.remove_policy 🟢 5/5 5/5
ilm.retry Missing test Missing test
ilm.start Missing test Missing test
ilm.stop 🟢 4/4 4/4
xpack.usage 🔴 40/40 2/36

You can validate these APIs yourself by using the make validate target.

/**
* @es_quirk output as a millis number in XPack usage stats, which cannot roundtrip with a Duration as it requires a unit.
*/
min_age?: Duration | long
min_age?: Duration
Copy link
Member Author

Choose a reason for hiding this comment

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

It turns out ILM and Xpack usage output different representations for min_age. It's always a TimeValue, but:

@@ -152,6 +151,19 @@ export class HealthStatistics extends Base {
invocations: Invocations
}

export class Phase {
actions: string[]
Copy link
Member Author

Choose a reason for hiding this comment

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

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.

1 participant