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

Simplify build plugin license handling #77009

Merged
merged 13 commits into from
Oct 7, 2021

Conversation

breskeby
Copy link
Contributor

@breskeby breskeby commented Aug 30, 2021

  • Use file property and conventions to avoid afterEvaluate hook
  • Simplify root build script
  • One little step closer to configuration cache compliance

@breskeby breskeby self-assigned this Aug 30, 2021
@breskeby breskeby added :Delivery/Build Build or test infrastructure >enhancement Team:Delivery Meta label for Delivery team v7.16.0 v8.0.0 labels Aug 30, 2021
@breskeby breskeby force-pushed the simplify-license-handling branch from 9a0b98b to 2cb0e0a Compare August 30, 2021 11:03
@breskeby breskeby force-pushed the simplify-license-handling branch 2 times, most recently from 5a0e54a to 91b634f Compare September 6, 2021 16:49
@breskeby breskeby force-pushed the simplify-license-handling branch from a574901 to d2d35d3 Compare October 4, 2021 14:12
@breskeby breskeby marked this pull request as ready for review October 5, 2021 07:56
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-delivery (Team:Delivery)

import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.StandardCopyOption;
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't understand why have lots of new import but no other code changes in this file?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed.

@@ -176,6 +177,9 @@ protected void assertNoDeprecationWarning(BuildResult result) {

protected void assertBuildFileExists(BuildResult result, String projectName, String path) {
Path absPath = getBuildDir(projectName).toPath().resolve(path);
for (File file : absPath.getParent().toFile().listFiles()) {
System.out.println("file = " + file);
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this some leftover debugging code?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good catch. removed.

Copy link
Contributor

@mark-vieira mark-vieira left a comment

Choose a reason for hiding this comment

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

Couple minor comments but otherwise LGTM.

@@ -20,8 +19,8 @@
import java.util.concurrent.Callable;

public class LicensingPlugin implements Plugin<Project> {
final static String ELASTIC_LICENSE_URL_PREFIX = "https://raw.githubusercontent.com/elastic/elasticsearch/";
final static String ELASTIC_LICENSE_URL_POSTFIX = "/licenses/ELASTIC-LICENSE-2.0.txt";
static final String ELASTIC_LICENSE_URL_PREFIX = "https://raw.githubusercontent.com/elastic/elasticsearch/";
Copy link
Contributor

Choose a reason for hiding this comment

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

Bless you. There's nothing worse that unconventionally ordered field modifiers. It's like nails on a chalkboard. 😄

- Use file property and conventions to avoid afterEvaluate hook
- Simplify root build script
- elasticsearch base plugin is supposed to only configure defaults for _EVERY_ es subproject
- simplifies root build script
- ensures each subproject has a potential license attached
- configures project default coordinates
@breskeby breskeby force-pushed the simplify-license-handling branch from 4761af6 to 60be146 Compare October 6, 2021 13:19
@breskeby breskeby merged commit dd4e4c3 into elastic:master Oct 7, 2021
@elasticsearchmachine
Copy link
Collaborator

💔 Backport failed

Status Branch Result
7.x Commit could not be cherrypicked due to conflicts

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

breskeby added a commit to breskeby/elasticsearch that referenced this pull request Oct 7, 2021
- Use file property and conventions to avoid afterEvaluate hook
- Simplify root build script
- One little step closer to configuration cache compliance
breskeby added a commit that referenced this pull request Oct 7, 2021
- Use file property and conventions to avoid afterEvaluate hook
- Simplify root build script
- One little step closer to configuration cache compliance
wjp719 added a commit to wjp719/elasticsearch that referenced this pull request Oct 7, 2021
…' into feature/data_stream_support_routing

* wjp/feature/data_stream_support_routing: (44 commits)
  Revert "Adjust /_cat/templates not to request all metadata (elastic#78812)"
  Allow indices lookup to be built lazily (elastic#78745)
  [DOCS] Document default security in alpha2 (elastic#78227)
  Add cluster applier stats (elastic#77552)
  Fix failing URLDecodeProcessorTests::testProcessor test (elastic#78690)
  Upgrade to lucene snapshot ba75dc5e6bf (elastic#78817)
  Adjust /_cat/templates not to request all metadata (elastic#78812)
  Simplify build plugin license handling (elastic#77009)
  Fix SearchableSnapshotsBlobStoreCacheIntegTests.testBlobStoreCache (elastic#78616)
  Improve Docker image caching and testing (elastic#78552)
  Load knn vectors format with mmapfs (elastic#78724)
  Fix date math zone test to use negative minutes (elastic#78796)
  Changing name of shards field in node/stats api to shard_stats (elastic#78531)
  [DOCS] Fix system index refs in restore tutorial (elastic#78582)
  Add previously removed settings back for 8.0 (elastic#78784)
  TSDB: Fix template name in test
  Add a system property to forcibly format everything (elastic#78768)
  Revert "Adding config so that some tests will break if over-the-wire encryption fails (elastic#78409)" (elastic#78787)
  Must date math test failure
  Adding config so that some tests will break if over-the-wire encryption fails (elastic#78409)
  ...
@breskeby breskeby deleted the simplify-license-handling branch December 10, 2024 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Delivery/Build Build or test infrastructure >enhancement Team:Delivery Meta label for Delivery team v7.16.0 v8.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants