Skip to content

Deprecate local param in indices.get_mapping #3975

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

Merged
merged 1 commit into from
Mar 17, 2025

Conversation

pquentin
Copy link
Member

This was deprecated in 7.8, but we don't copy this information from the JSON spec, which is a bug.

Copy link
Contributor

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

API Status Request Response
indices.get_mapping 🔴 135/135 133/135

You can validate this API yourself by using the make validate target.

@pquentin pquentin merged commit ea99172 into main Mar 17, 2025
18 checks passed
@pquentin pquentin deleted the deprecate-indices.get_mapping-local branch March 17, 2025 08:45
github-actions bot pushed a commit that referenced this pull request Mar 17, 2025
Copy link
Contributor

The backport to 8.16 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-8.16 8.16
# Navigate to the new working tree
cd .worktrees/backport-8.16
# Create a new branch
git switch --create backport-3975-to-8.16
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 ea991724f4dd4f90c496eff547d3cc2e6529f509
# Push it to GitHub
git push --set-upstream origin backport-3975-to-8.16
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-8.16

Then, create a pull request where the base branch is 8.16 and the compare/head branch is backport-3975-to-8.16.

Copy link
Contributor

The backport to 8.17 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-8.17 8.17
# Navigate to the new working tree
cd .worktrees/backport-8.17
# Create a new branch
git switch --create backport-3975-to-8.17
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 ea991724f4dd4f90c496eff547d3cc2e6529f509
# Push it to GitHub
git push --set-upstream origin backport-3975-to-8.17
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-8.17

Then, create a pull request where the base branch is 8.17 and the compare/head branch is backport-3975-to-8.17.

@@ -71,6 +71,7 @@ export interface Request extends RequestBase {
ignore_unavailable?: boolean
/**
* If `true`, the request retrieves information from the local node only.
* @deprecated 7.8.0 This parameter is a no-op and field mappings are always retrieved locally.
Copy link
Contributor

Choose a reason for hiding this comment

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

Unfortunately, the PR you linked that deprecated this parameter in rest-api-spec was incorrect - see elastic/elasticsearch#122922 for more context. The local param was deprecated in elastic/elasticsearch#55014 for the GET field mapping request, not the GET mapping request. I see the local param is not present in https://github.com/elastic/elasticsearch-specification/blob/31b8bb299cf705d9c963a2dfb736c603f47c2425/specification/indices/get_field_mapping/IndicesGetFieldMappingRequest.ts, so we don't have to do anything there. But field should be removed from this line and 7.8.0 should be either removed or updated to 9.1.0 - I implemented the actual deprecation in https://github.com/elastic/elasticsearch/pull/122921/files#diff-759c8fb59bd55bbebf840f520608fabbbc549918cd9121ed754cb629ce5c86c1.

pquentin added a commit that referenced this pull request Mar 18, 2025
(cherry picked from commit ea99172)

Co-authored-by: Quentin Pradet <[email protected]>
pquentin added a commit that referenced this pull request Mar 18, 2025
(cherry picked from commit ea99172)

Co-authored-by: Quentin Pradet <[email protected]>
pquentin added a commit that referenced this pull request Mar 18, 2025
(cherry picked from commit ea99172)

Co-authored-by: Quentin Pradet <[email protected]>
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