Skip to content

Conversation

@craigtaverner
Copy link
Contributor

@craigtaverner craigtaverner commented Mar 28, 2025

This primarily splits the old preview:true warning from the newer applies_to approach. Since all of our current applies_to examples are actually just behaviour modifications of current functions, we do not use the official docs {applies_to} syntax. However there is code to make use of that in the case where we have an entirely new function which will appear in a new version.

Examples:

An example of a function which has both preview and applies to is:

Screenshot 2025-03-28 at 12 51 19

There are many pre-existing examples of preview only, which we've left as is.

An example of applies_to without preview is:

Screenshot 2025-03-28 at 12 53 40

@craigtaverner craigtaverner added >docs General docs changes Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) :Analytics/ES|QL AKA ESQL labels Mar 28, 2025
@elasticsearchmachine elasticsearchmachine added Team:Docs Meta label for docs team v9.1.0 labels Mar 28, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-docs (Team:Docs)

@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-analytical-engine (Team:Analytics)

@craigtaverner craigtaverner added auto-backport Automatically create backport pull requests when merged v9.0.0 labels Mar 28, 2025
::::""",
type = FunctionType.AGGREGATE,
examples = @Example(file = "string", tag = "values-grouped"),
appliesTo = { @FunctionAppliesTo(lifeCycle = FunctionAppliesToLifecycle.PREVIEW) }
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This file has both the old and new approaches to tech-preview, so I removed the new one until we make a final decision on how to deal with tech-preview warnings in general. They are all over the place, not just here, so this function was just an experiment to see what it looked like.

Any class that extends Function needs to correctly implement replaceChildren and info() methods, because it will be found and tested!
Copy link
Contributor

@alex-spies alex-spies left a comment

Choose a reason for hiding this comment

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

Heya, I didn't deeply review the java code but the generated output looks good to me (as a non-docs person).

Comment on lines 10 to 11
:::{note}
###### COMING 9.1.0
Copy link
Contributor

Choose a reason for hiding this comment

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

I just want to say that this looks less confusing to me than having the COMING 9.1.0 inside the tech preview warning.

Copy link
Contributor

Choose a reason for hiding this comment

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

💯

Comment on lines -670 to -671
stack: preview 9.0, coming 9.1
serverless: preview
Copy link
Contributor

Choose a reason for hiding this comment

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

I agree that this maybe shouldn't be in the tech preview warning, but I don't know if these tags should be removed altogether. Maybe @leemthompo can suggest a better position?


::::{warning}
```{applies_to}
stack: preview 9.0, coming 9.1
Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, good catch. This is in preview way longer than 9.0, and it's not coming to 9.1 as far as I know.

MV_EXPAND was already in place in 8.11, when ESQL went into tech preview - at least there's an 8.11 PR that mentions it: #100598

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added these originally as examples to discuss with people, but failed to remove them. Based on current discussions, we should remove any version statements, even if the feature is available in serverless, as there is no guarrantee if it will come out in any particular stateful version.

::::{warning}
```{applies_to}
stack: preview 9.0, coming 9.1
serverless: preview
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this tag should still apply (but I agree this shouldn't be placed here).

@craigtaverner craigtaverner merged commit 98a2c71 into elastic:main Mar 28, 2025
16 checks passed
@elasticsearchmachine
Copy link
Collaborator

💔 Backport failed

Status Branch Result
9.0 Commit could not be cherrypicked due to conflicts

You can use sqren/backport to manually backport by running backport --upstream elastic/elasticsearch --pr 125835

craigtaverner added a commit to craigtaverner/elasticsearch that referenced this pull request Mar 31, 2025
This primarily splits the old preview:true warning from the newer applies_to approach. Since all of our current applies_to examples are actually just behaviour modifications of current functions, we do not use the official docs {applies_to} syntax. However there is code to make use of that in the case where we have an entirely new function which will appear in a new version.

Co-authored-by: Alexander Spies <[email protected]>
elasticsearchmachine pushed a commit that referenced this pull request Mar 31, 2025
This primarily splits the old preview:true warning from the newer applies_to approach. Since all of our current applies_to examples are actually just behaviour modifications of current functions, we do not use the official docs {applies_to} syntax. However there is code to make use of that in the case where we have an entirely new function which will appear in a new version.

Co-authored-by: Alexander Spies <[email protected]>
@craigtaverner
Copy link
Contributor Author

Manual backport in #125923

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Analytics/ES|QL AKA ESQL auto-backport Automatically create backport pull requests when merged >docs General docs changes Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) Team:Docs Meta label for docs team v9.0.0 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants