Skip to content

Conversation

@ldematte
Copy link
Contributor

In #127666 we changed the package for the Text class; example plugins however are not part of the source folders in Intellij and are not built as part of the normal CI process, so changes in example plugins were not done.

This PR updates the missing changes to the package.

I don't know if the CI will pick up this and build them, but anyway I run the build locally and it passes (build scan here): https://gradle-enterprise.elastic.co/s/nlajrzz3gpzoe

@ldematte ldematte requested review from a team and prdoyle May 22, 2025 15:04
@ldematte ldematte added >non-issue :Core/Infra/Core Core issues without another label auto-backport Automatically create backport pull requests when merged v8.19.0 v9.1.0 labels May 22, 2025
@elasticsearchmachine elasticsearchmachine added the Team:Core/Infra Meta label for core/infra team label May 22, 2025
@elasticsearchmachine
Copy link
Collaborator

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

Copy link
Contributor

@prdoyle prdoyle left a comment

Choose a reason for hiding this comment

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

Thanks!

@ldematte ldematte merged commit cc48648 into elastic:main May 22, 2025
19 checks passed
@ldematte ldematte deleted the fix-text-package-example-plugins branch May 22, 2025 16:36
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
8.19

ldematte added a commit to ldematte/elasticsearch that referenced this pull request May 22, 2025
prdoyle pushed a commit to prdoyle/elasticsearch that referenced this pull request May 23, 2025
@prdoyle
Copy link
Contributor

prdoyle commented May 23, 2025

I'll backport this as part of #128406.

elasticsearchmachine pushed a commit that referenced this pull request May 23, 2025
* Improve TestBuildInfoPluginFuncTest (#128322)

* Use walkFileTree for extractModuleNameFromDirectory

* More tests in TestBuildInfoPluginFuncTest

* Remove stray line from debugging

* [CI] Auto commit changes from spotless

* Eliminate List.reversed() call

---------

Co-authored-by: elasticsearchmachine <[email protected]>

* Fix the Text class package change in example plugins (#128316)

---------

Co-authored-by: elasticsearchmachine <[email protected]>
Co-authored-by: Lorenzo Dematté <[email protected]>
prdoyle added a commit to prdoyle/elasticsearch that referenced this pull request May 26, 2025
prdoyle added a commit to prdoyle/elasticsearch that referenced this pull request May 26, 2025
JVerwolf pushed a commit that referenced this pull request May 26, 2025
* Revert "Fix the Text class package change in example plugins (#128316)"

This reverts commit cc48648.

* Revert "Update Text class to use native java ByteBuffer (#127666)"

This reverts commit db0c3c7.
prdoyle added a commit to prdoyle/elasticsearch that referenced this pull request May 26, 2025
* Revert "Fix the Text class package change in example plugins (elastic#128316)"

This reverts commit cc48648.

* Revert "Update Text class to use native java ByteBuffer (elastic#127666)"

This reverts commit db0c3c7.
prdoyle added a commit to prdoyle/elasticsearch that referenced this pull request May 26, 2025
* Revert "Fix the Text class package change in example plugins (elastic#128316)"

This reverts commit cc48648.

* Revert "Update Text class to use native java ByteBuffer (elastic#127666)"

This reverts commit db0c3c7.
prdoyle added a commit to prdoyle/elasticsearch that referenced this pull request May 26, 2025
* Revert "Fix the Text class package change in example plugins (elastic#128316)"

This reverts commit cc48648.

* Revert "Update Text class to use native java ByteBuffer (elastic#127666)"

This reverts commit db0c3c7.
elasticsearchmachine pushed a commit that referenced this pull request May 26, 2025
* Revert changes to Text class (#128483)

* Revert "Fix the Text class package change in example plugins (#128316)"

This reverts commit cc48648.

* Revert "Update Text class to use native java ByteBuffer (#127666)"

This reverts commit db0c3c7.

* [CI] Auto commit changes from spotless

---------

Co-authored-by: elasticsearchmachine <[email protected]>
elasticsearchmachine pushed a commit that referenced this pull request May 27, 2025
* Revert "Fix the Text class package change in example plugins (#128316)"

This reverts commit cc48648.

* Revert "Update Text class to use native java ByteBuffer (#127666)"

This reverts commit db0c3c7.

Co-authored-by: Lorenzo Dematté <[email protected]>
jordan-powers added a commit that referenced this pull request Jun 4, 2025
This PR is a precursor to #126492.

It does three things:
1. Move org.elasticsearch.common.text.Text from :server to
   org.elasticsearch.xcontent.Text in :libs:x-content.
2. Refactor the Text class to use a new EncodedBytes record instead of
   the elasticsearch BytesReference.
3. Add the XContentString interface, with the Text class implementing
   that interface.

These changes were originally implemented in #127666 and #128316,
however they were reverted in #128484 due to problems caused by the
mutable nature of java ByteBuffers. This is resolved by instead using a
new immutable EncodedBytes record.
elasticsearchmachine pushed a commit that referenced this pull request Jun 4, 2025
This PR is a precursor to #126492.

It does three things:
1. Move org.elasticsearch.common.text.Text from :server to
   org.elasticsearch.xcontent.Text in :libs:x-content.
2. Refactor the Text class to use a new EncodedBytes record instead of
   the elasticsearch BytesReference.
3. Add the XContentString interface, with the Text class implementing
   that interface.

These changes were originally implemented in #127666 and #128316,
however they were reverted in #128484 due to problems caused by the
mutable nature of java ByteBuffers. This is resolved by instead using a
new immutable EncodedBytes record.

(cherry picked from commit de40ac4)

# Conflicts:
#	server/src/main/java/org/elasticsearch/search/fetch/subphase/highlight/DefaultHighlighter.java
#	server/src/test/java/org/elasticsearch/common/xcontent/BaseXContentTestCase.java
#	server/src/test/java/org/elasticsearch/search/fetch/subphase/highlight/HighlightFieldTests.java
#	test/framework/src/main/java/org/elasticsearch/search/SearchResponseUtils.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Automatically create backport pull requests when merged :Core/Infra/Core Core issues without another label >non-issue Team:Core/Infra Meta label for core/infra team v8.19.0 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants