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

Add support for marking component templates as deprecated #101148

Merged
merged 32 commits into from
Nov 2, 2023

Conversation

felixbarny
Copy link
Member

Deprecated component templates don't appear when using a wildcard search by default.

This also needs to be extended to composable index templates, ILM policies, and ingest pipelines.

At this point this is just a POC and means as a conversation starter on whether it's worth implementing this.

closes #100992

They'll also not appear when using a wildcard search by default
@elasticsearchmachine elasticsearchmachine added external-contributor Pull request authored by a developer outside the Elasticsearch team v8.12.0 labels Oct 19, 2023
@felixbarny felixbarny requested a review from dakrone October 25, 2023 15:28
@felixbarny felixbarny added >enhancement :Data Management/Indices APIs APIs to create and manage indices and templates labels Oct 25, 2023
@elasticsearchmachine
Copy link
Collaborator

Hi @felixbarny, I've created a changelog YAML for you.

Copy link
Member

@dakrone dakrone left a comment

Choose a reason for hiding this comment

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

this looks like a good start to me, I don't have anything other than minor comments so far

@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-data-management (Team:Data Management)

Copy link
Member

@dakrone dakrone left a comment

Choose a reason for hiding this comment

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

This LGTM. I left some minor comments but nothing major. I think this will require merging master and adjusting the TransportVersions before merging though.

@@ -809,6 +809,10 @@ public static boolean randomBoolean() {
return random().nextBoolean();
}

public static Boolean randomOptionalBoolean() {
return randomBoolean() ? Boolean.TRUE : randomFrom(Boolean.FALSE, null);
Copy link
Member

Choose a reason for hiding this comment

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

This changes the statistics of the responses somewhat, what about

Suggested change
return randomBoolean() ? Boolean.TRUE : randomFrom(Boolean.FALSE, null);
return randomFrom(Boolean.TRUE, Boolean.FALSE, null);

Copy link
Member Author

Choose a reason for hiding this comment

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

This was on purpose because otherwise, "falsey" return values (Boolean.FALSE, null) would have a higher probability. As this is a new method, and mostly used for new code, it doesn't really alter existing behavior. But it does assume that null is equivalent to false, which may not always be true in all cases.

I'll leave this as-is for now but happy to change if you still think it would be better. But I'll not block merging.

@felixbarny felixbarny merged commit 978a546 into elastic:main Nov 2, 2023
@felixbarny felixbarny deleted the deprecated-component-templates branch November 2, 2023 18:28
yuliacech added a commit to elastic/kibana that referenced this pull request Feb 5, 2024
Partially addresses #170805

## Summary

With elastic/elasticsearch#101148 we now can
alert the users when an ingest pipeline will soon be deprecated and
shouldnt be relied upon. This PR adds a badge and a callout to the
ingest pipelines UI to alert the users about this.

##### How to test

* Start up kibana and es
* Navigate to Stack management -> Ingest pipelines
* Verify that:
  * Deprecated pipelines are hidden by default
* Upon enabling filtering to see them they should pop up on the table
with a badge
* Verify that deprecated policies are highlighted and when editing, we
also show a warning callout.

### Screenshot 
<img width="1386" alt="Screenshot 2024-02-05 at 16 02 18"
src="https://github.com/elastic/kibana/assets/6585477/739d6fea-5f15-4da4-aee8-cae8f412a040">

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Yulia Čech <6585477+yuliacech@users.noreply.github.com>
Co-authored-by: Yulia Cech <yulia.cech@elastic.co>
yuliacech added a commit to elastic/kibana that referenced this pull request Feb 5, 2024
…onent template UIs (#174450)

Partially addresses #170805

## Summary

With elastic/elasticsearch#101148 we now can
alert the users when a component template or index template will soon be
deprecated and shouldnt be relied upon. This PR adds a badge and a
callout to the component template and index template UIs to alert the
users about this.

##### How to test

* Start up kibana and es
* Navigate to Stack management -> index management
(component_templates|index_templates)
* Verify that:
  * Deprecated resources are hidden by default
* Upon enabling filtering to see them they should pop up on the table
with a badge
* Verify that deprecated resources are highlighted and when editing, we
also show a warning callout.


<details>
<summary>Create deprecated component template</summary>

```
PUT _component_template/template_1
{
  "template": {
    "settings" : {
        "number_of_shards" : 1
    }    
  },
  "deprecated": true
}
```
</details>

<details>
<summary>Screenshots</summary>

// index templates

![Screenshot 2024-01-10 at 15 25
26](https://github.com/elastic/kibana/assets/1191206/ff632464-c4ac-43a2-b89d-be423489a82a)
![Screenshot 2024-01-10 at 15 25
31](https://github.com/elastic/kibana/assets/1191206/bb231c7c-5ae3-466d-9411-3cca842124dc)

![Screenshot 2024-01-08 at 13 52
35](https://github.com/elastic/kibana/assets/1191206/c6724867-3a0e-4998-871b-35fd577689bc)
![Screenshot 2024-01-08 at 14 00
46](https://github.com/elastic/kibana/assets/1191206/0b1001d4-c0bb-49a8-862a-746754e34fe0)

// component templates


![Screenshot 2024-01-10 at 14 45
10](https://github.com/elastic/kibana/assets/1191206/675519b8-80d7-466a-a4ad-185bb7f52651)
![Screenshot 2024-01-10 at 14 45
15](https://github.com/elastic/kibana/assets/1191206/0cbe5704-8549-4812-9202-e44b8f02ac95)
![Screenshot 2024-01-08 at 14 51
03](https://github.com/elastic/kibana/assets/1191206/0288ca12-c8f5-4ed5-ba4c-f77834702e68)
![Screenshot 2024-01-08 at 15 07
17](https://github.com/elastic/kibana/assets/1191206/97f72f52-6816-4bc9-910c-fbe88df50ad2)



</details>

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Yulia Čech <6585477+yuliacech@users.noreply.github.com>
Co-authored-by: Yulia Cech <yulia.cech@elastic.co>
fkanout pushed a commit to fkanout/kibana that referenced this pull request Feb 7, 2024
Partially addresses elastic#170805

## Summary

With elastic/elasticsearch#101148 we now can
alert the users when an ingest pipeline will soon be deprecated and
shouldnt be relied upon. This PR adds a badge and a callout to the
ingest pipelines UI to alert the users about this.

##### How to test

* Start up kibana and es
* Navigate to Stack management -> Ingest pipelines
* Verify that:
  * Deprecated pipelines are hidden by default
* Upon enabling filtering to see them they should pop up on the table
with a badge
* Verify that deprecated policies are highlighted and when editing, we
also show a warning callout.

### Screenshot 
<img width="1386" alt="Screenshot 2024-02-05 at 16 02 18"
src="https://github.com/elastic/kibana/assets/6585477/739d6fea-5f15-4da4-aee8-cae8f412a040">

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Yulia Čech <6585477+yuliacech@users.noreply.github.com>
Co-authored-by: Yulia Cech <yulia.cech@elastic.co>
fkanout pushed a commit to fkanout/kibana that referenced this pull request Feb 7, 2024
…onent template UIs (elastic#174450)

Partially addresses elastic#170805

## Summary

With elastic/elasticsearch#101148 we now can
alert the users when a component template or index template will soon be
deprecated and shouldnt be relied upon. This PR adds a badge and a
callout to the component template and index template UIs to alert the
users about this.

##### How to test

* Start up kibana and es
* Navigate to Stack management -> index management
(component_templates|index_templates)
* Verify that:
  * Deprecated resources are hidden by default
* Upon enabling filtering to see them they should pop up on the table
with a badge
* Verify that deprecated resources are highlighted and when editing, we
also show a warning callout.


<details>
<summary>Create deprecated component template</summary>

```
PUT _component_template/template_1
{
  "template": {
    "settings" : {
        "number_of_shards" : 1
    }    
  },
  "deprecated": true
}
```
</details>

<details>
<summary>Screenshots</summary>

// index templates

![Screenshot 2024-01-10 at 15 25
26](https://github.com/elastic/kibana/assets/1191206/ff632464-c4ac-43a2-b89d-be423489a82a)
![Screenshot 2024-01-10 at 15 25
31](https://github.com/elastic/kibana/assets/1191206/bb231c7c-5ae3-466d-9411-3cca842124dc)

![Screenshot 2024-01-08 at 13 52
35](https://github.com/elastic/kibana/assets/1191206/c6724867-3a0e-4998-871b-35fd577689bc)
![Screenshot 2024-01-08 at 14 00
46](https://github.com/elastic/kibana/assets/1191206/0b1001d4-c0bb-49a8-862a-746754e34fe0)

// component templates


![Screenshot 2024-01-10 at 14 45
10](https://github.com/elastic/kibana/assets/1191206/675519b8-80d7-466a-a4ad-185bb7f52651)
![Screenshot 2024-01-10 at 14 45
15](https://github.com/elastic/kibana/assets/1191206/0cbe5704-8549-4812-9202-e44b8f02ac95)
![Screenshot 2024-01-08 at 14 51
03](https://github.com/elastic/kibana/assets/1191206/0288ca12-c8f5-4ed5-ba4c-f77834702e68)
![Screenshot 2024-01-08 at 15 07
17](https://github.com/elastic/kibana/assets/1191206/97f72f52-6816-4bc9-910c-fbe88df50ad2)



</details>

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Yulia Čech <6585477+yuliacech@users.noreply.github.com>
Co-authored-by: Yulia Cech <yulia.cech@elastic.co>
CoenWarmer pushed a commit to CoenWarmer/kibana that referenced this pull request Feb 15, 2024
Partially addresses elastic#170805

## Summary

With elastic/elasticsearch#101148 we now can
alert the users when an ingest pipeline will soon be deprecated and
shouldnt be relied upon. This PR adds a badge and a callout to the
ingest pipelines UI to alert the users about this.

##### How to test

* Start up kibana and es
* Navigate to Stack management -> Ingest pipelines
* Verify that:
  * Deprecated pipelines are hidden by default
* Upon enabling filtering to see them they should pop up on the table
with a badge
* Verify that deprecated policies are highlighted and when editing, we
also show a warning callout.

### Screenshot 
<img width="1386" alt="Screenshot 2024-02-05 at 16 02 18"
src="https://github.com/elastic/kibana/assets/6585477/739d6fea-5f15-4da4-aee8-cae8f412a040">

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Yulia Čech <6585477+yuliacech@users.noreply.github.com>
Co-authored-by: Yulia Cech <yulia.cech@elastic.co>
CoenWarmer pushed a commit to CoenWarmer/kibana that referenced this pull request Feb 15, 2024
…onent template UIs (elastic#174450)

Partially addresses elastic#170805

## Summary

With elastic/elasticsearch#101148 we now can
alert the users when a component template or index template will soon be
deprecated and shouldnt be relied upon. This PR adds a badge and a
callout to the component template and index template UIs to alert the
users about this.

##### How to test

* Start up kibana and es
* Navigate to Stack management -> index management
(component_templates|index_templates)
* Verify that:
  * Deprecated resources are hidden by default
* Upon enabling filtering to see them they should pop up on the table
with a badge
* Verify that deprecated resources are highlighted and when editing, we
also show a warning callout.


<details>
<summary>Create deprecated component template</summary>

```
PUT _component_template/template_1
{
  "template": {
    "settings" : {
        "number_of_shards" : 1
    }    
  },
  "deprecated": true
}
```
</details>

<details>
<summary>Screenshots</summary>

// index templates

![Screenshot 2024-01-10 at 15 25
26](https://github.com/elastic/kibana/assets/1191206/ff632464-c4ac-43a2-b89d-be423489a82a)
![Screenshot 2024-01-10 at 15 25
31](https://github.com/elastic/kibana/assets/1191206/bb231c7c-5ae3-466d-9411-3cca842124dc)

![Screenshot 2024-01-08 at 13 52
35](https://github.com/elastic/kibana/assets/1191206/c6724867-3a0e-4998-871b-35fd577689bc)
![Screenshot 2024-01-08 at 14 00
46](https://github.com/elastic/kibana/assets/1191206/0b1001d4-c0bb-49a8-862a-746754e34fe0)

// component templates


![Screenshot 2024-01-10 at 14 45
10](https://github.com/elastic/kibana/assets/1191206/675519b8-80d7-466a-a4ad-185bb7f52651)
![Screenshot 2024-01-10 at 14 45
15](https://github.com/elastic/kibana/assets/1191206/0cbe5704-8549-4812-9202-e44b8f02ac95)
![Screenshot 2024-01-08 at 14 51
03](https://github.com/elastic/kibana/assets/1191206/0288ca12-c8f5-4ed5-ba4c-f77834702e68)
![Screenshot 2024-01-08 at 15 07
17](https://github.com/elastic/kibana/assets/1191206/97f72f52-6816-4bc9-910c-fbe88df50ad2)



</details>

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Yulia Čech <6585477+yuliacech@users.noreply.github.com>
Co-authored-by: Yulia Cech <yulia.cech@elastic.co>
fkanout pushed a commit to fkanout/kibana that referenced this pull request Mar 4, 2024
Partially addresses elastic#170805

## Summary

With elastic/elasticsearch#101148 we now can
alert the users when an ingest pipeline will soon be deprecated and
shouldnt be relied upon. This PR adds a badge and a callout to the
ingest pipelines UI to alert the users about this.

##### How to test

* Start up kibana and es
* Navigate to Stack management -> Ingest pipelines
* Verify that:
  * Deprecated pipelines are hidden by default
* Upon enabling filtering to see them they should pop up on the table
with a badge
* Verify that deprecated policies are highlighted and when editing, we
also show a warning callout.

### Screenshot 
<img width="1386" alt="Screenshot 2024-02-05 at 16 02 18"
src="https://github.com/elastic/kibana/assets/6585477/739d6fea-5f15-4da4-aee8-cae8f412a040">

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Yulia Čech <6585477+yuliacech@users.noreply.github.com>
Co-authored-by: Yulia Cech <yulia.cech@elastic.co>
fkanout pushed a commit to fkanout/kibana that referenced this pull request Mar 4, 2024
…onent template UIs (elastic#174450)

Partially addresses elastic#170805

## Summary

With elastic/elasticsearch#101148 we now can
alert the users when a component template or index template will soon be
deprecated and shouldnt be relied upon. This PR adds a badge and a
callout to the component template and index template UIs to alert the
users about this.

##### How to test

* Start up kibana and es
* Navigate to Stack management -> index management
(component_templates|index_templates)
* Verify that:
  * Deprecated resources are hidden by default
* Upon enabling filtering to see them they should pop up on the table
with a badge
* Verify that deprecated resources are highlighted and when editing, we
also show a warning callout.


<details>
<summary>Create deprecated component template</summary>

```
PUT _component_template/template_1
{
  "template": {
    "settings" : {
        "number_of_shards" : 1
    }    
  },
  "deprecated": true
}
```
</details>

<details>
<summary>Screenshots</summary>

// index templates

![Screenshot 2024-01-10 at 15 25
26](https://github.com/elastic/kibana/assets/1191206/ff632464-c4ac-43a2-b89d-be423489a82a)
![Screenshot 2024-01-10 at 15 25
31](https://github.com/elastic/kibana/assets/1191206/bb231c7c-5ae3-466d-9411-3cca842124dc)

![Screenshot 2024-01-08 at 13 52
35](https://github.com/elastic/kibana/assets/1191206/c6724867-3a0e-4998-871b-35fd577689bc)
![Screenshot 2024-01-08 at 14 00
46](https://github.com/elastic/kibana/assets/1191206/0b1001d4-c0bb-49a8-862a-746754e34fe0)

// component templates


![Screenshot 2024-01-10 at 14 45
10](https://github.com/elastic/kibana/assets/1191206/675519b8-80d7-466a-a4ad-185bb7f52651)
![Screenshot 2024-01-10 at 14 45
15](https://github.com/elastic/kibana/assets/1191206/0cbe5704-8549-4812-9202-e44b8f02ac95)
![Screenshot 2024-01-08 at 14 51
03](https://github.com/elastic/kibana/assets/1191206/0288ca12-c8f5-4ed5-ba4c-f77834702e68)
![Screenshot 2024-01-08 at 15 07
17](https://github.com/elastic/kibana/assets/1191206/97f72f52-6816-4bc9-910c-fbe88df50ad2)



</details>

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Yulia Čech <6585477+yuliacech@users.noreply.github.com>
Co-authored-by: Yulia Cech <yulia.cech@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Data Management/Indices APIs APIs to create and manage indices and templates >enhancement external-contributor Pull request authored by a developer outside the Elasticsearch team Team:Data Management Meta label for data/management team v8.12.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adding the ability to mark templates and pipelines as deprecated
4 participants