-
Notifications
You must be signed in to change notification settings - Fork 25.1k
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
Conversation
breskeby
commented
Aug 30, 2021
•
edited
Loading
edited
- Use file property and conventions to avoid afterEvaluate hook
- Simplify root build script
- One little step closer to configuration cache compliance
9a0b98b
to
2cb0e0a
Compare
5a0e54a
to
91b634f
Compare
a574901
to
d2d35d3
Compare
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; |
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.
I don't understand why have lots of new import but no other code changes in this file?
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.
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); |
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.
Is this some leftover debugging code?
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.
good catch. removed.
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.
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/"; |
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.
Bless you. There's nothing worse that unconventionally ordered field modifiers. It's like nails on a chalkboard. 😄
...conventions/src/main/java/org/elasticsearch/gradle/internal/conventions/LicensingPlugin.java
Show resolved
Hide resolved
...conventions/src/main/java/org/elasticsearch/gradle/internal/conventions/LicensingPlugin.java
Show resolved
Hide resolved
...internal/src/integTest/groovy/org/elasticsearch/gradle/internal/PublishPluginFuncTest.groovy
Show resolved
Hide resolved
- 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
4761af6
to
60be146
Compare
💔 Backport failed
You can use sqren/backport to manually backport by running |
- Use file property and conventions to avoid afterEvaluate hook - Simplify root build script - One little step closer to configuration cache compliance
…' 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) ...