Skip to content

Update Serverless scope for legacy put_template #3005

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
Oct 10, 2024
Merged

Conversation

picandocodigo
Copy link
Member

@picandocodigo picandocodigo commented Oct 10, 2024

From @pquentin's research:

tasks.get - This one is not actually tasks.get (with endpoint /_tasks/{task_id}), it's tasks.list (with endpoint /_tasks/), which is INTERNAL.

indices.put_template - The /_template URLs refer to legacy index templates, that are not available on Serverless.

@picandocodigo picandocodigo requested a review from a team October 10, 2024 12:34
Copy link
Contributor

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

API Status Request Response
indices.put_template 🔴 45/46 46/46
tasks.get 🟢 10/10 10/10

You can validate these APIs yourself by using the make validate target.

Copy link
Member

@pquentin pquentin left a comment

Choose a reason for hiding this comment

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

Thanks!

@@ -26,7 +26,7 @@ import { Duration } from '@_types/Time'
* Returns information about the tasks currently executing in the cluster.
* @rest_spec_name tasks.get
* @availability stack since=5.0.0 stability=experimental
* @availability serverless stability=experimental visibility=public
* @availability serverless stability=experimental visibility=private
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
* @availability serverless stability=experimental visibility=private
* @availability serverless stability=experimental visibility=public

tasks.get is public, but tasks.list is not, but this is already correct:

* @availability serverless stability=experimental visibility=private

Copy link
Member Author

Choose a reason for hiding this comment

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

I finally found why this wasn't making sense to me 😅
The Ruby code generator had a bug and task.get didn't have id as required so I was testing the tasks.list path (without an id) 🤦

From @pquentin's research:
indices.put_template
The /_template URLs refer to legacy index templates, that are not available on Serverless.

Actions without an annotation are unavailable on Serverless. The only possible Scope values are PUBLIC and INTERNAL, unavailable is marked by the absence of an annotation.
Copy link
Contributor

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

API Status Request Response
indices.put_template 🔴 45/46 46/46

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

@picandocodigo picandocodigo changed the title Update Serverless scope for tasks.get and legacy put_template Update Serverless scope for legacy put_template Oct 10, 2024
@picandocodigo
Copy link
Member Author

Thanks @pquentin, I updated the PR so that it's just removing the scope for serverless in indices.put_template.

Copy link
Member

@pquentin pquentin left a comment

Choose a reason for hiding this comment

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

Thanks! LGTM

@picandocodigo picandocodigo merged commit e31f5a4 into main Oct 10, 2024
6 checks passed
@picandocodigo picandocodigo deleted the serverless_apis branch October 10, 2024 16:27
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.

2 participants