zpinto opened a new pull request, #2609:
URL: https://github.com/apache/helix/pull/2609

   Add support for setting a default InstanceConfig through 
HelixManagerProperty. This will allow InstanceConfig fields be able to have 
defaults while also allowing users to leverage autoJoin and autoRegistration.
   
   ### Description
   
   Previously, you would only be able to use HelixUtil.composeInstanceConfig 
when leveraging auto-join and auto-registration. With this change, the user can 
provide a configured default InstanceConfig to be used when 
composeInstanceConfig is used by auto-join and auto-registration. One use case 
is allowing the node to auto-join the cluster in `HELIX_ENABLED=false`
   
   The default InstanceConfig is configurable in HelixManagerProperty which is 
the configuration object passed in at the entrypoint when the ZkHelixManager is 
instantiated.
   
   ### Tests
   
   - [x] testAutoJoinWithDefaultInstanceConfig
   
   ```
   ➜  helix git:(default_instance_configs) ✗ mvn test -o 
-Dtest=TestInstanceAutoJoin -pl=helix-core
   [INFO] Scanning for projects...
   [WARNING] 
   [WARNING] Some problems were encountered while building the effective model 
for org.apache.helix:metrics-common:bundle:1.3.1-SNAPSHOT
   [WARNING] 'build.pluginManagement.plugins.plugin.(groupId:artifactId)' must 
be unique but found duplicate declaration of plugin 
org.apache.maven.plugins:maven-javadoc-plugin @ 
org.apache.helix:helix:1.3.1-SNAPSHOT, 
/Users/zapinto/Documents/git/zpinto/helix/pom.xml, line 678, column 17
   [WARNING] 
   [WARNING] Some problems were encountered while building the effective model 
for org.apache.helix:helix:pom:1.3.1-SNAPSHOT
   [WARNING] 'build.pluginManagement.plugins.plugin.(groupId:artifactId)' must 
be unique but found duplicate declaration of plugin 
org.apache.maven.plugins:maven-javadoc-plugin @ line 678, column 17
   [WARNING] 
   [WARNING] It is highly recommended to fix these problems because they 
threaten the stability of your build.
   [WARNING] 
   [WARNING] For this reason, future Maven versions might no longer support 
building such malformed projects.
   [WARNING] 
   [INFO] 
   [INFO] --------------------< org.apache.helix:helix-core 
>---------------------
   [INFO] Building Apache Helix :: Core 1.3.1-SNAPSHOT
   [INFO]   from pom.xml
   [INFO] -------------------------------[ bundle 
]-------------------------------
   [INFO] 
   [INFO] --- enforcer:1.4.1:enforce (enforce-maven-version) @ helix-core ---
   [INFO] 
   [INFO] --- enforcer:1.4.1:enforce (enforce-java-version) @ helix-core ---
   [INFO] 
   [INFO] --- enforcer:1.4.1:enforce (enforce-output-timestamp-property) @ 
helix-core ---
   [INFO] 
   [INFO] --- jacoco:0.8.6:prepare-agent (default) @ helix-core ---
   [INFO] argLine set to 
-javaagent:/Users/zapinto/.m2/repository/org/jacoco/org.jacoco.agent/0.8.6/org.jacoco.agent-0.8.6-runtime.jar=destfile=/Users/zapinto/Documents/git/zpinto/helix/helix-core/target/jacoco.exec
   [INFO] 
   [INFO] --- remote-resources:1.7.0:process (process-resource-bundles) @ 
helix-core ---
   [INFO] Preparing remote bundle org.apache:apache-jar-resource-bundle:1.4
   [INFO] Copying 3 resources from 1 bundle.
   [INFO] 
   [INFO] --- resources:3.2.0:resources (default-resources) @ helix-core ---
   [INFO] Using 'UTF-8' encoding to copy filtered resources.
   [INFO] Using 'UTF-8' encoding to copy filtered properties files.
   [INFO] Copying 4 resources
   [INFO] Copying 0 resource
   [INFO] Copying 3 resources
   [INFO] The encoding used to copy filtered properties files have not been 
set. This means that the same encoding will be used to copy filtered properties 
files as when copying other filtered resources. This might not be what you 
want! Run your build with --debug to see which files might be affected. Read 
more at 
https://maven.apache.org/plugins/maven-resources-plugin/examples/filtering-properties-files.html
   [INFO] 
   [INFO] --- compiler:3.10.1:compile (default-compile) @ helix-core ---
   [INFO] Nothing to compile - all classes are up to date
   [INFO] 
   [INFO] --- bundle:5.1.4:manifest (bundle-manifest) @ helix-core ---
   [WARNING] Manifest org.apache.helix:helix-core:bundle:1.3.1-SNAPSHOT : 
Unused Import-Package instructions: [org.apache.logging.log4j*, 
org.apache.logging.slf4j*] 
   [INFO] Writing manifest: 
/Users/zapinto/Documents/git/zpinto/helix/helix-core/target/classes/META-INF/MANIFEST.MF
   [INFO] 
   [INFO] --- resources:3.2.0:testResources (default-testResources) @ 
helix-core ---
   [INFO] Using 'UTF-8' encoding to copy filtered resources.
   [INFO] Using 'UTF-8' encoding to copy filtered properties files.
   [INFO] Copying 15 resources
   [INFO] Copying 3 resources
   [INFO] 
   [INFO] --- compiler:3.10.1:testCompile (default-testCompile) @ helix-core ---
   [INFO] Nothing to compile - all classes are up to date
   [INFO] 
   [INFO] --- surefire:3.0.0-M3:test (default-test) @ helix-core ---
   [INFO] 
   [INFO] -------------------------------------------------------
   [INFO]  T E S T S
   [INFO] -------------------------------------------------------
   [INFO] Running org.apache.helix.integration.paticipant.TestInstanceAutoJoin
   
   [INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
32.231 s - in org.apache.helix.integration.paticipant.TestInstanceAutoJoin
   [INFO] 
   [INFO] Results:
   [INFO] 
   [INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0
   [INFO] 
   [INFO] 
   [INFO] --- jacoco:0.8.6:report (generate-code-coverage-report) @ helix-core 
---
   [INFO] Loading execution data file 
/Users/zapinto/Documents/git/zpinto/helix/helix-core/target/jacoco.exec
   [INFO] Analyzed bundle 'Apache Helix :: Core' with 943 classes
   [INFO] 
------------------------------------------------------------------------
   [INFO] BUILD SUCCESS
   [INFO] 
------------------------------------------------------------------------
   [INFO] Total time:  42.206 s
   [INFO] Finished at: 2023-08-29T08:02:06-07:00
   [INFO] 
------------------------------------------------------------------------
   ➜  helix git:(default_instance_configs) ✗ 
   
   ```
   
   ### Changes that Break Backward Compatibility (Optional)
   
   NA
   
   ### Documentation (Optional)
   
   NA
   
   ### Commits
   
   - My commits all reference appropriate Apache Helix GitHub issues in their 
subject lines. In addition, my commits follow the guidelines from "[How to 
write a good git commit message](http://chris.beams.io/posts/git-commit/)":
     1. Subject is separated from body by a blank line
     1. Subject is limited to 50 characters (not including Jira issue reference)
     1. Subject does not end with a period
     1. Subject uses the imperative mood ("add", not "adding")
     1. Body wraps at 72 characters
     1. Body explains "what" and "why", not "how"
   
   ### Code Quality
   
   - My diff has been formatted using helix-style.xml 
   (helix-style-intellij.xml if IntelliJ IDE is used)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to