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

Adding initial public and internal serverless scopes to Core-Infra REST handlers #94037

Conversation

masseyke
Copy link
Member

#93607 added the ability to run Elasticsearch in "Serverless" mode, where access to REST endpoints could be restricted so that the full Elasticsearch API is not available (since a lot of it does not make sense in Servlerless). By default no endpoints are available, but they can be exposed with ServerlessScope annotations.
This PR follows up on #93607 by adding PUBLIC and INTERNAL annotations to the rest handlers owned by the Core Infra team. There are several rest endpoints still under discussion. This PR does not label those, so they remain unavailable in Serverless mode.

@masseyke masseyke added Team:Core/Infra Meta label for core/infra team v8.8.0 labels Feb 22, 2023
@elasticsearchmachine elasticsearchmachine added needs:triage Requires assignment of a team area label and removed Team:Core/Infra Meta label for core/infra team labels Feb 22, 2023
@masseyke masseyke added :Core/Infra/REST API REST infrastructure and utilities Team:Core/Infra Meta label for core/infra team and removed needs:triage Requires assignment of a team area label labels Feb 22, 2023
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

@dakrone dakrone requested a review from rjernst April 11, 2023 14:38
Copy link
Member

@rjernst rjernst left a comment

Choose a reason for hiding this comment

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

Looks good minus the two APIs I noted. Thanks Keith!

import org.elasticsearch.rest.action.RestToXContentListener;

import java.io.IOException;
import java.util.List;

import static org.elasticsearch.rest.RestRequest.Method.GET;

@ServerlessScope(Scope.PUBLIC)
Copy link
Member

Choose a reason for hiding this comment

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

Can you please remove this one from the PR? We are still in discussions about whether it is necessary (and there are actually 2 versions of this API under different paths).

import org.elasticsearch.rest.action.RestToXContentListener;

import java.io.IOException;
import java.util.List;

import static org.elasticsearch.rest.RestRequest.Method.GET;

@ServerlessScope(Scope.PUBLIC)
Copy link
Member

Choose a reason for hiding this comment

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

Can you please remove this one from the PR? We are still in discussions about whether it is necessary (and there are actually 2 versions of this API under different paths).

@masseyke masseyke added the auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) label Apr 17, 2023
@masseyke
Copy link
Member Author

@elasticmachine update branch

@elasticsearchmachine elasticsearchmachine merged commit 253bcfb into elastic:main Apr 18, 2023
@masseyke masseyke deleted the feature/core-infra-serverless-scopes branch April 19, 2023 22:18
pgomulka added a commit to pgomulka/elasticsearch that referenced this pull request Apr 20, 2023
This commit exposes core/infra owned REST APIs for serverless deployment
It uses @ServerlessScope(Scope.PUBLIC) to achieve this.

relates elastic#94037
pgomulka added a commit that referenced this pull request Apr 21, 2023
This commit exposes core/infra owned REST APIs for serverless deployment.
It uses @ServerlessScope(Scope.PUBLIC) to achieve this.

follows up on #94037
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!) :Core/Infra/REST API REST infrastructure and utilities >non-issue Team:Core/Infra Meta label for core/infra team v8.8.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants