-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[ES|QL] gather inline function documentation from Elasticsearch #184689
[ES|QL] gather inline function documentation from Elasticsearch #184689
Conversation
/ci |
/ci |
/ci |
/ci |
Pinging @elastic/kibana-esql (Team:ESQL) |
recast.visit(ast, { | ||
visitVariableDeclarator(astPath) { | ||
if ( | ||
n.Identifier.check(astPath.node.id) && | ||
astPath.node.id.name === functionsArrayIdentifier | ||
) { | ||
this.traverse(astPath); | ||
} | ||
return false; | ||
}, | ||
visitProperty(astPath) { | ||
if ( | ||
n.Identifier.check(astPath.node.key) && | ||
astPath.node.key.name === 'items' && | ||
n.ArrayExpression.check(astPath.node.value) | ||
) { | ||
foundArray = astPath.node.value; | ||
this.abort(); | ||
} | ||
return false; | ||
}, | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vadimkibana more AST fun :)
Not sure if the obs-ai-assistant could benefit from this script too. I know that you have already your implementation @dgieselaar but maybe you are interested in this. |
MOAR generated docs. |
Less hand maintained docs. MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM |
Excellent. |
@stratoula this is ready for your review. Thanks! |
/ci |
I can't describe of how excited I am about this PR. ❤️ Just something goes wrong with:
I think all the other examples look great, the problem is with the ones with the escape characters. |
Actually, @stratoula you're talking about commands, no? The script only generates the docs for functions |
Aaah shoot @drewdaemon, you are right. So apparently the above was a bug in main that got fixed from my PR. Sorry man, I am approving. |
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
## Summary #184689 added a script to gather ES|QL function docs from Elasticsearch. This PR adds it to our CI pipeline! Close #173492 Close #173817 --------- Co-authored-by: Kibana Machine <[email protected]>
Summary
Adds a script to gather inline function documentation sections from Elasticsearch.
To run the script:
cd packages/kbn-text-based-editor && yarn make:docs path/to/elasticsearch
This script will be operationalized in a follow-up PR.