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

Use Java 15 text blocks for JSON and multiline strings #80751

Merged
merged 61 commits into from
Dec 15, 2021

Conversation

arteam
Copy link
Contributor

@arteam arteam commented Nov 16, 2021

The ES code base is quite JSON heavy. It uses a lot of multi-line JSON requests in tests which need to be escaped and concatenated which in turn makes them hard to read. Let's try to leverage Java 15 text blocks for representing them.

@arteam arteam force-pushed the use-text-blocks branch 6 times, most recently from a403cb8 to f39bc10 Compare November 16, 2021 13:42
@pugnascotia
Copy link
Contributor

I'm happy to go over this properly when we're in a position to merge 👍

@arteam arteam force-pushed the use-text-blocks branch 21 times, most recently from 9620029 to 9f0a77a Compare November 20, 2021 18:01
arteam and others added 8 commits December 9, 2021 20:47
…ava/org/elasticsearch/xpack/ml/integration/PyTorchModelIT.java

Co-authored-by: Rory Hunter <pugnascotia@users.noreply.github.com>
…ava/org/elasticsearch/xpack/ml/integration/RegressionIT.java

Co-authored-by: Rory Hunter <pugnascotia@users.noreply.github.com>
…csearch/integration/IndexPrivilegeIntegTests.java

Co-authored-by: Rory Hunter <pugnascotia@users.noreply.github.com>
…al/DiscountedCumulativeGainTests.java

Co-authored-by: Rory Hunter <pugnascotia@users.noreply.github.com>
…ack/sql/qa/geo/GeoDataLoader.java

Co-authored-by: Rory Hunter <pugnascotia@users.noreply.github.com>
…pack/textstructure/structurefinder/GrokPatternCreatorTests.java

Co-authored-by: Rory Hunter <pugnascotia@users.noreply.github.com>
Copy link
Contributor

@pugnascotia pugnascotia left a comment

Choose a reason for hiding this comment

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

LGTM 👍 thanks for taking on this work! 🚀

@arteam
Copy link
Contributor Author

arteam commented Dec 14, 2021

@elasticmachine update branch

@arteam arteam merged commit 763d6d5 into elastic:master Dec 15, 2021
@arteam arteam deleted the use-text-blocks branch December 15, 2021 17:01
@arteam
Copy link
Contributor Author

arteam commented Dec 15, 2021

Thanks, Rory!

@arteam arteam added auto-backport Automatically create backport pull requests when merged v8.0.0 and removed auto-backport Automatically create backport pull requests when merged labels Dec 15, 2021
arteam added a commit to arteam/elasticsearch that referenced this pull request Dec 15, 2021
…#80751)

The ES code base is quite JSON heavy. It uses a lot of multi-line JSON requests in tests which need to be escaped and concatenated which in turn makes them hard to read. Let's try to leverage Java 15 text blocks for representing them.

Backports elastic#80751 to 8.0
arteam added a commit that referenced this pull request Dec 15, 2021
…#81771)

* [8.0] Use Java 15 text blocks for JSON and multiline strings (#80751)

The ES code base is quite JSON heavy. It uses a lot of multi-line JSON requests in tests which need to be escaped and concatenated which in turn makes them hard to read. Let's try to leverage Java 15 text blocks for representing them.

Backports #80751 to 8.0
ywangd added a commit to ywangd/elasticsearch that referenced this pull request Dec 20, 2021
The variable lives in Subject since elastic#80926. The PR also replace string
concatenation with text block to be consistent with other refactoring
efforts (elastic#80751).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Core/Infra/Core Core issues without another label :Delivery/Tooling Developer tooliing and automation >non-issue >refactoring Team:Core/Infra Meta label for core/infra team Team:Delivery Meta label for Delivery team v8.0.0-rc1 v8.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants