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

[UA] Remove 7->8 multitype check #203995

Merged
merged 6 commits into from
Dec 12, 2024

Conversation

jloleysens
Copy link
Contributor

@jloleysens jloleysens commented Dec 12, 2024

Summary

Removes the 7->8.x logic for detecting and warning users about custom types. Specifically, we had a GET index call with include_type_name that is no longer supported and would return mappings in the following, deprecated, multitype form:

{
  "mappings": {
    "<type_name>": { "properties": {  /* properties */ } }
    }
}

Now you can only get:

{
  "mappings": {
    "properties": { /* properties */ }
}

...including include_type_name is causing a 400 response from ES, blocking UA's ability to reindex. Existing code already handles both of these forms bc it had to for 7.last, this PR just removes logic targeting the former (and removes our outdated user-facing warning).

Resources

@jloleysens jloleysens added Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc release_note:skip Skip the PR/issue when compiling release notes Feature:Upgrade Assistant backport:version Backport to applied version labels v8.18.0 v8.17.1 labels Dec 12, 2024
@jloleysens jloleysens requested a review from a team December 12, 2024 10:46
@jloleysens jloleysens self-assigned this Dec 12, 2024
@jloleysens jloleysens requested review from a team as code owners December 12, 2024 10:46
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core (Team:Core)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looks like a sustainable re-architecture PR that merged recently reset some these to management 🙈

Copy link
Member

@afharo afharo left a comment

Choose a reason for hiding this comment

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

Core changes LGTM

Copy link
Contributor

@alisonelizabeth alisonelizabeth left a comment

Choose a reason for hiding this comment

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

Rubberstamp approval

Thanks for fixing the codeowners file!

Copy link
Member

@Bamieh Bamieh left a comment

Choose a reason for hiding this comment

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

lgtm

@jloleysens jloleysens merged commit b525d00 into elastic:main Dec 12, 2024
8 checks passed
@jloleysens jloleysens deleted the ua/remove-custom-type-logic branch December 12, 2024 14:13
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.17, 8.x

https://github.com/elastic/kibana/actions/runs/12298187700

@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.17 Backport failed because of merge conflicts
8.x Backport failed because of merge conflicts

You might need to backport the following PRs to 8.x:
- [Data Usage] functional tests (#203166)
- Sustainable Kibana Architecture: Move modules under x-pack/packages/security-solution (#203522)
- Sustainable Kibana Architecture: Move modules owned by @elastic/obs-ai-assistant (#202763)
- [Obs UX Management] Migrate leftover code owner !! (#203814)
- Sustainable Kibana Architecture: Add scripts/relocate CLI (beta) (#203803)
- [UA] kibana-core ownership (#203410)
- [Security Solution] - Update codeowners (#202046)

Manual backport

To create the backport manually run:

node scripts/backport --pr 203995

Questions ?

Please refer to the Backport tool documentation

jloleysens added a commit to jloleysens/kibana that referenced this pull request Dec 12, 2024
## Summary

Removes the 7->8.x logic for detecting and warning users about custom
types. Specifically, we had a `GET index` call with `include_type_name`
that is no longer supported and would return mappings in the following,
deprecated, multitype form:

```jsonc
{
  "mappings": {
    "<type_name>": { "properties": {  /* properties */ } }
    }
}
```

Now you can only get:

```jsonc
{
  "mappings": {
    "properties": { /* properties */ }
}
```

...including `include_type_name` is causing a 400 response from ES,
blocking UA's ability to reindex. Existing code already handles both of
these forms bc it had to for 7.last, this PR just removes logic
targeting the former (and removes our outdated user-facing warning).

## Resources
* 7->8 removal notice
https://www.elastic.co/guide/en/elasticsearch/reference/7.17/removal-of-types.html
* old docs
https://www.elastic.co/guide/en/elasticsearch/reference/6.8/indices-get-index.html

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit b525d00)

# Conflicts:
#	.github/CODEOWNERS
#	x-pack/plugins/upgrade_assistant/server/lib/reindexing/index_settings.ts
#	x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_actions.ts
jloleysens added a commit to jloleysens/kibana that referenced this pull request Dec 12, 2024
## Summary

Removes the 7->8.x logic for detecting and warning users about custom
types. Specifically, we had a `GET index` call with `include_type_name`
that is no longer supported and would return mappings in the following,
deprecated, multitype form:

```jsonc
{
  "mappings": {
    "<type_name>": { "properties": {  /* properties */ } }
    }
}
```

Now you can only get:

```jsonc
{
  "mappings": {
    "properties": { /* properties */ }
}
```

...including `include_type_name` is causing a 400 response from ES,
blocking UA's ability to reindex. Existing code already handles both of
these forms bc it had to for 7.last, this PR just removes logic
targeting the former (and removes our outdated user-facing warning).

## Resources
* 7->8 removal notice
https://www.elastic.co/guide/en/elasticsearch/reference/7.17/removal-of-types.html
* old docs
https://www.elastic.co/guide/en/elasticsearch/reference/6.8/indices-get-index.html

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit b525d00)

# Conflicts:
#	.github/CODEOWNERS
@jloleysens
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
8.x
8.17

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

jloleysens added a commit that referenced this pull request Dec 12, 2024
# Backport

This will backport the following commits from `main` to `8.x`:
- [[UA] Remove 7->8 multitype check
(#203995)](#203995)

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Jean-Louis
Leysens","email":"jeanlouis.leysens@elastic.co"},"sourceCommit":{"committedDate":"2024-12-12T14:13:49Z","message":"[UA]
Remove 7->8 multitype check (#203995)\n\n## Summary\r\n\r\nRemoves the
7->8.x logic for detecting and warning users about custom\r\ntypes.
Specifically, we had a `GET index` call with `include_type_name`\r\nthat
is no longer supported and would return mappings in the
following,\r\ndeprecated, multitype form:\r\n\r\n```jsonc\r\n{\r\n
\"mappings\": {\r\n \"<type_name>\": { \"properties\": { /* properties
*/ } }\r\n }\r\n}\r\n```\r\n\r\nNow you can only
get:\r\n\r\n```jsonc\r\n{\r\n \"mappings\": {\r\n \"properties\": { /*
properties */ }\r\n}\r\n```\r\n\r\n...including `include_type_name` is
causing a 400 response from ES,\r\nblocking UA's ability to reindex.
Existing code already handles both of\r\nthese forms bc it had to for
7.last, this PR just removes logic\r\ntargeting the former (and removes
our outdated user-facing warning).\r\n\r\n## Resources\r\n* 7->8 removal
notice\r\nhttps://www.elastic.co/guide/en/elasticsearch/reference/7.17/removal-of-types.html\r\n*
old
docs\r\nhttps://www.elastic.co/guide/en/elasticsearch/reference/6.8/indices-get-index.html\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"b525d00fde535645d7d60d3d98cd1f5f8cb0d4ad","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Core","release_note:skip","Feature:Upgrade
Assistant","v9.0.0","backport:version","v8.18.0","v8.17.1"],"number":203995,"url":"https://github.com/elastic/kibana/pull/203995","mergeCommit":{"message":"[UA]
Remove 7->8 multitype check (#203995)\n\n## Summary\r\n\r\nRemoves the
7->8.x logic for detecting and warning users about custom\r\ntypes.
Specifically, we had a `GET index` call with `include_type_name`\r\nthat
is no longer supported and would return mappings in the
following,\r\ndeprecated, multitype form:\r\n\r\n```jsonc\r\n{\r\n
\"mappings\": {\r\n \"<type_name>\": { \"properties\": { /* properties
*/ } }\r\n }\r\n}\r\n```\r\n\r\nNow you can only
get:\r\n\r\n```jsonc\r\n{\r\n \"mappings\": {\r\n \"properties\": { /*
properties */ }\r\n}\r\n```\r\n\r\n...including `include_type_name` is
causing a 400 response from ES,\r\nblocking UA's ability to reindex.
Existing code already handles both of\r\nthese forms bc it had to for
7.last, this PR just removes logic\r\ntargeting the former (and removes
our outdated user-facing warning).\r\n\r\n## Resources\r\n* 7->8 removal
notice\r\nhttps://www.elastic.co/guide/en/elasticsearch/reference/7.17/removal-of-types.html\r\n*
old
docs\r\nhttps://www.elastic.co/guide/en/elasticsearch/reference/6.8/indices-get-index.html\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"b525d00fde535645d7d60d3d98cd1f5f8cb0d4ad"}},"sourceBranch":"main","suggestedTargetBranches":["8.x","8.17"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/203995","number":203995,"mergeCommit":{"message":"[UA]
Remove 7->8 multitype check (#203995)\n\n## Summary\r\n\r\nRemoves the
7->8.x logic for detecting and warning users about custom\r\ntypes.
Specifically, we had a `GET index` call with `include_type_name`\r\nthat
is no longer supported and would return mappings in the
following,\r\ndeprecated, multitype form:\r\n\r\n```jsonc\r\n{\r\n
\"mappings\": {\r\n \"<type_name>\": { \"properties\": { /* properties
*/ } }\r\n }\r\n}\r\n```\r\n\r\nNow you can only
get:\r\n\r\n```jsonc\r\n{\r\n \"mappings\": {\r\n \"properties\": { /*
properties */ }\r\n}\r\n```\r\n\r\n...including `include_type_name` is
causing a 400 response from ES,\r\nblocking UA's ability to reindex.
Existing code already handles both of\r\nthese forms bc it had to for
7.last, this PR just removes logic\r\ntargeting the former (and removes
our outdated user-facing warning).\r\n\r\n## Resources\r\n* 7->8 removal
notice\r\nhttps://www.elastic.co/guide/en/elasticsearch/reference/7.17/removal-of-types.html\r\n*
old
docs\r\nhttps://www.elastic.co/guide/en/elasticsearch/reference/6.8/indices-get-index.html\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"b525d00fde535645d7d60d3d98cd1f5f8cb0d4ad"}},{"branch":"8.x","label":"v8.18.0","labelRegex":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.17","label":"v8.17.1","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
jloleysens added a commit that referenced this pull request Dec 12, 2024
# Backport

This will backport the following commits from `main` to `8.17`:
- [[UA] Remove 7->8 multitype check
(#203995)](#203995)

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Jean-Louis
Leysens","email":"jeanlouis.leysens@elastic.co"},"sourceCommit":{"committedDate":"2024-12-12T14:13:49Z","message":"[UA]
Remove 7->8 multitype check (#203995)\n\n## Summary\r\n\r\nRemoves the
7->8.x logic for detecting and warning users about custom\r\ntypes.
Specifically, we had a `GET index` call with `include_type_name`\r\nthat
is no longer supported and would return mappings in the
following,\r\ndeprecated, multitype form:\r\n\r\n```jsonc\r\n{\r\n
\"mappings\": {\r\n \"<type_name>\": { \"properties\": { /* properties
*/ } }\r\n }\r\n}\r\n```\r\n\r\nNow you can only
get:\r\n\r\n```jsonc\r\n{\r\n \"mappings\": {\r\n \"properties\": { /*
properties */ }\r\n}\r\n```\r\n\r\n...including `include_type_name` is
causing a 400 response from ES,\r\nblocking UA's ability to reindex.
Existing code already handles both of\r\nthese forms bc it had to for
7.last, this PR just removes logic\r\ntargeting the former (and removes
our outdated user-facing warning).\r\n\r\n## Resources\r\n* 7->8 removal
notice\r\nhttps://www.elastic.co/guide/en/elasticsearch/reference/7.17/removal-of-types.html\r\n*
old
docs\r\nhttps://www.elastic.co/guide/en/elasticsearch/reference/6.8/indices-get-index.html\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"b525d00fde535645d7d60d3d98cd1f5f8cb0d4ad","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Core","release_note:skip","Feature:Upgrade
Assistant","v9.0.0","backport:version","v8.18.0","v8.17.1"],"number":203995,"url":"https://github.com/elastic/kibana/pull/203995","mergeCommit":{"message":"[UA]
Remove 7->8 multitype check (#203995)\n\n## Summary\r\n\r\nRemoves the
7->8.x logic for detecting and warning users about custom\r\ntypes.
Specifically, we had a `GET index` call with `include_type_name`\r\nthat
is no longer supported and would return mappings in the
following,\r\ndeprecated, multitype form:\r\n\r\n```jsonc\r\n{\r\n
\"mappings\": {\r\n \"<type_name>\": { \"properties\": { /* properties
*/ } }\r\n }\r\n}\r\n```\r\n\r\nNow you can only
get:\r\n\r\n```jsonc\r\n{\r\n \"mappings\": {\r\n \"properties\": { /*
properties */ }\r\n}\r\n```\r\n\r\n...including `include_type_name` is
causing a 400 response from ES,\r\nblocking UA's ability to reindex.
Existing code already handles both of\r\nthese forms bc it had to for
7.last, this PR just removes logic\r\ntargeting the former (and removes
our outdated user-facing warning).\r\n\r\n## Resources\r\n* 7->8 removal
notice\r\nhttps://www.elastic.co/guide/en/elasticsearch/reference/7.17/removal-of-types.html\r\n*
old
docs\r\nhttps://www.elastic.co/guide/en/elasticsearch/reference/6.8/indices-get-index.html\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"b525d00fde535645d7d60d3d98cd1f5f8cb0d4ad"}},"sourceBranch":"main","suggestedTargetBranches":["8.x","8.17"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/203995","number":203995,"mergeCommit":{"message":"[UA]
Remove 7->8 multitype check (#203995)\n\n## Summary\r\n\r\nRemoves the
7->8.x logic for detecting and warning users about custom\r\ntypes.
Specifically, we had a `GET index` call with `include_type_name`\r\nthat
is no longer supported and would return mappings in the
following,\r\ndeprecated, multitype form:\r\n\r\n```jsonc\r\n{\r\n
\"mappings\": {\r\n \"<type_name>\": { \"properties\": { /* properties
*/ } }\r\n }\r\n}\r\n```\r\n\r\nNow you can only
get:\r\n\r\n```jsonc\r\n{\r\n \"mappings\": {\r\n \"properties\": { /*
properties */ }\r\n}\r\n```\r\n\r\n...including `include_type_name` is
causing a 400 response from ES,\r\nblocking UA's ability to reindex.
Existing code already handles both of\r\nthese forms bc it had to for
7.last, this PR just removes logic\r\ntargeting the former (and removes
our outdated user-facing warning).\r\n\r\n## Resources\r\n* 7->8 removal
notice\r\nhttps://www.elastic.co/guide/en/elasticsearch/reference/7.17/removal-of-types.html\r\n*
old
docs\r\nhttps://www.elastic.co/guide/en/elasticsearch/reference/6.8/indices-get-index.html\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"b525d00fde535645d7d60d3d98cd1f5f8cb0d4ad"}},{"branch":"8.x","label":"v8.18.0","labelRegex":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.17","label":"v8.17.1","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
@mistic mistic removed the v8.17.0 label Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:version Backport to applied version labels Feature:Upgrade Assistant release_note:skip Skip the PR/issue when compiling release notes Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v8.17.1 v8.18.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants