Skip to content

Move resolve views to IndexAbstractionOptions#143741

Merged
elasticsearchmachine merged 6 commits intoelastic:mainfrom
jfreden:views/move_resolve_views
Mar 11, 2026
Merged

Move resolve views to IndexAbstractionOptions#143741
elasticsearchmachine merged 6 commits intoelastic:mainfrom
jfreden:views/move_resolve_views

Conversation

@jfreden
Copy link
Contributor

@jfreden jfreden commented Mar 6, 2026

There has been several discussions on this topic since I opened #141050 and @idegtiarenko also mentioned this in #143561 (comment).

The issue is that both resolveViews and resolveAliases are in WildcardOptions but are used when resolving both concrete index pattern targets and wildcard targets. This PR moves resolveViews from IndicesOptions.WildcardOptions into a new IndicesOptions.IndexAbstractionOptions record to address this confusing inconsistency.

This is in preparation for sending resolveViews as a parameter to field caps for remote view resolving where more work will be done to serialize resolveViews and not having this in place would make for confusing code. See #143384 for more information on the upcoming serialization of resolveViews.

Note: resolveAliases is moved in a follow up PR since it's decoupled from the resolveViews changes. #143953

Note: IndicesRequest.includeDataStreams() is the same type of flag as resolveAliases and resolveViews, it controls whether data streams participate in index resolution. It's a candidate for IndexAbstractionOptions but currently lives on IndicesRequest (not IndicesOptions) and is threaded separately through IndexNameExpressionResolver.Context as a constructor parameter. Moving it would touch 60+ files and change the IndicesRequest interface. Because of how big that change would be, I have not considered doing that in this PR (or at all).

@jfreden jfreden changed the title Move resolve views and aliases to IndexAbstractionOptions [WIP] Move resolve views and aliases to IndexAbstractionOptions Mar 6, 2026
@jfreden jfreden force-pushed the views/move_resolve_views branch from 56927ce to 1a9b7c9 Compare March 6, 2026 15:29
@jfreden jfreden force-pushed the views/move_resolve_views branch from 1a9b7c9 to c699c49 Compare March 9, 2026 08:34
@jfreden jfreden changed the title [WIP] Move resolve views and aliases to IndexAbstractionOptions Move resolve views and aliases to IndexAbstractionOptions Mar 9, 2026
@jfreden jfreden marked this pull request as ready for review March 9, 2026 08:35
@elasticsearchmachine elasticsearchmachine added the needs:triage Requires assignment of a team area label label Mar 9, 2026
@jfreden jfreden added >non-issue :Security/Security Security issues without another label and removed needs:triage Requires assignment of a team area label labels Mar 9, 2026
@jfreden jfreden requested a review from n1v0lg March 9, 2026 08:35
@elasticsearchmachine elasticsearchmachine added the Team:Security Meta label for security team label Mar 9, 2026
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-security (Team:Security)

@elasticsearchmachine elasticsearchmachine added the serverless-linked Added by automation, don't add manually label Mar 9, 2026
@jfreden jfreden force-pushed the views/move_resolve_views branch from 9cbb77c to 06d665d Compare March 10, 2026 15:06
@jfreden jfreden force-pushed the views/move_resolve_views branch from 06d665d to c2f1139 Compare March 10, 2026 15:17
@jfreden jfreden changed the title Move resolve views and aliases to IndexAbstractionOptions Move resolve views to IndexAbstractionOptions Mar 10, 2026
Copy link
Contributor

@n1v0lg n1v0lg left a comment

Choose a reason for hiding this comment

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

LGTM (pending CI)

@jfreden jfreden added the auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) label Mar 10, 2026
@elasticsearchmachine elasticsearchmachine merged commit ff62792 into elastic:main Mar 11, 2026
42 checks passed
@jfreden jfreden deleted the views/move_resolve_views branch March 11, 2026 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) >non-issue :Security/Security Security issues without another label serverless-linked Added by automation, don't add manually Team:Security Meta label for security team v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants