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

Scripting: Whitelist API spec gradle task #66050

Merged
merged 11 commits into from
Dec 9, 2020

Conversation

stu-elastic
Copy link
Contributor

Adds generateContextApiSpec gradle task that generates whitelist api
specs under modules/lang-painless/src/main/generated/whitelist-json.

The common classes are in painless-common.json, the specialized classes
per context are in painless-$context.json.

eg. painless-aggs.json has the specialization for the aggs contexts

@stu-elastic stu-elastic added the :Core/Infra/Scripting Scripting abstractions, Painless, and Mustache label Dec 8, 2020
@stu-elastic stu-elastic requested a review from jdconrad December 8, 2020 17:31
@elasticmachine elasticmachine added the Team:Core/Infra Meta label for core/infra team label Dec 8, 2020
@elasticmachine
Copy link
Collaborator

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

@stu-elastic
Copy link
Contributor Author

@elasticmachine run elasticsearch-ci/packaging-sample-unix

return compare;
});

// TODO(stu): unmodifiable list
Copy link
Contributor Author

Choose a reason for hiding this comment

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

TODO remove TODO

Copy link
Contributor

@jdconrad jdconrad left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you for taking this on!

A couple of thoughts:

  • We may want to look at some refactoring as you mentioned in our PR walkthough since this code is used in multiple places.
  • Now that there's multiple files I would consider adding a package for whitelist info generation.

@stu-elastic stu-elastic merged commit 2aa2224 into elastic:master Dec 9, 2020
stu-elastic added a commit to stu-elastic/elasticsearch that referenced this pull request Dec 9, 2020
Adds `generateContextApiSpec` gradle task that generates whitelist api
specs under `modules/lang-painless/src/main/generated/whitelist-json`.

The common classes are in `painless-common.json`, the specialized classes
per context are in `painless-$context.json`.

eg. `painless-aggs.json` has the specialization for the aggs contexts

Refs: elastic#49879
stu-elastic added a commit that referenced this pull request Dec 9, 2020
Adds `generateContextApiSpec` gradle task that generates whitelist api
specs under `modules/lang-painless/src/main/generated/whitelist-json`.

The common classes are in `painless-common.json`, the specialized classes
per context are in `painless-$context.json`.

eg. `painless-aggs.json` has the specialization for the aggs contexts

Refs: #49879
 Backport: 2aa2224
@stu-elastic
Copy link
Contributor Author

master (8.0): 2aa2224
7.x (7.11): 5b8bac3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Core/Infra/Scripting Scripting abstractions, Painless, and Mustache >enhancement Team:Core/Infra Meta label for core/infra team v7.11.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants