You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by GitBox <gi...@apache.org> on 2022/03/20 13:33:13 UTC
[GitHub] [sling-org-apache-sling-jcr-repoinit] joerghoh opened a new pull request #23: SLING-8843 repoinit developer mode
joerghoh opened a new pull request #23:
URL: https://github.com/apache/sling-org-apache-sling-jcr-repoinit/pull/23
when providing the system property
"org.apache.sling.jcr.repoinit.developermode" with the value "true"
repoinit will not throw exception and terminate the startup of the
repository, but instead logs an message pointing this out.
Thus it's easier for a developer to fix the script without the need to
make the repository going first.
To clearly point out potential mis-use (having it configured in
production environments), this log message is written on loglevel ERROR
and also the on startup the "developer mode active" INFO message is
written.
--
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: dev-unsubscribe@sling.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [sling-org-apache-sling-jcr-repoinit] joerghoh commented on a change in pull request #23: SLING-8843 repoinit developer mode
Posted by GitBox <gi...@apache.org>.
joerghoh commented on a change in pull request #23:
URL: https://github.com/apache/sling-org-apache-sling-jcr-repoinit/pull/23#discussion_r832447935
##########
File path: src/main/java/org/apache/sling/jcr/repoinit/impl/RepositoryInitializerFactory.java
##########
@@ -177,5 +194,13 @@ protected void applyOperations(Session session, List<Operation> ops, String logM
}
}
+
+ protected static boolean isDeveloperModeEnabled() {
Review comment:
That would leave this method untested. Sure, it's trivial, but testing it does not make the test code much more complicated.
I will leave it as is.
--
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: dev-unsubscribe@sling.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [sling-org-apache-sling-jcr-repoinit] rombert commented on a change in pull request #23: SLING-8843 repoinit developer mode
Posted by GitBox <gi...@apache.org>.
rombert commented on a change in pull request #23:
URL: https://github.com/apache/sling-org-apache-sling-jcr-repoinit/pull/23#discussion_r831123560
##########
File path: src/main/java/org/apache/sling/jcr/repoinit/impl/RepositoryInitializerFactory.java
##########
@@ -177,5 +194,13 @@ protected void applyOperations(Session session, List<Operation> ops, String logM
}
}
+
+ protected static boolean isDeveloperModeEnabled() {
+ String dm = System.getProperty(PROPERTY_DEVELOPER_MODE);
Review comment:
This would make the code more compact, but largely a matter of taste.
```suggestion
String dm = System.getProperty(PROPERTY_DEVELOPER_MODE, "");
```
##########
File path: src/main/java/org/apache/sling/jcr/repoinit/impl/RepositoryInitializerFactory.java
##########
@@ -177,5 +194,13 @@ protected void applyOperations(Session session, List<Operation> ops, String logM
}
}
+
+ protected static boolean isDeveloperModeEnabled() {
Review comment:
Making this an instance method could help with overriding the flag easier for testing. You can create a sub-class and then override the method to return true not for testing.
Not sure if it's possible with the current set up though, ISTR that the OSGi mocks don't play nicely with subclasses of the actual components.
--
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: dev-unsubscribe@sling.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [sling-org-apache-sling-jcr-repoinit] joerghoh edited a comment on pull request #23: SLING-8843 repoinit developer mode
Posted by GitBox <gi...@apache.org>.
joerghoh edited a comment on pull request #23:
URL: https://github.com/apache/sling-org-apache-sling-jcr-repoinit/pull/23#issuecomment-1075464081
I would then change it to use OSGI configuration.
--
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: dev-unsubscribe@sling.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [sling-org-apache-sling-jcr-repoinit] sonarcloud[bot] removed a comment on pull request #23: SLING-8843 repoinit developer mode
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] removed a comment on pull request #23:
URL: https://github.com/apache/sling-org-apache-sling-jcr-repoinit/pull/23#issuecomment-1077927489
SonarCloud Quality Gate failed. 
[](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=CODE_SMELL) [1 Code Smell](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&metric=new_coverage&view=list) [65.0% Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&metric=new_coverage&view=list)
[](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&metric=new_duplicated_lines_density&view=list)
--
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: dev-unsubscribe@sling.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [sling-org-apache-sling-jcr-repoinit] joerghoh commented on pull request #23: SLING-8843 repoinit developer mode
Posted by GitBox <gi...@apache.org>.
joerghoh commented on pull request #23:
URL: https://github.com/apache/sling-org-apache-sling-jcr-repoinit/pull/23#issuecomment-1075432882
@enapps-enorman For the environment-specific settings we have runmodes, I don't see the real need or value to introduce a new concept here.
For the moment I want to leave this setting as a system property. If there's real demand for it, we still can convert it into an OSGI setting.
--
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: dev-unsubscribe@sling.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [sling-org-apache-sling-jcr-repoinit] sonarcloud[bot] removed a comment on pull request #23: SLING-8843 repoinit developer mode
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] removed a comment on pull request #23:
URL: https://github.com/apache/sling-org-apache-sling-jcr-repoinit/pull/23#issuecomment-1075444889
SonarCloud Quality Gate failed. 
[](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=CODE_SMELL) [6 Code Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&metric=new_coverage&view=list) [37.9% Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&metric=new_coverage&view=list)
[](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&metric=new_duplicated_lines_density&view=list)
--
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: dev-unsubscribe@sling.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [sling-org-apache-sling-jcr-repoinit] sonarcloud[bot] removed a comment on pull request #23: SLING-8843 repoinit developer mode
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] removed a comment on pull request #23:
URL: https://github.com/apache/sling-org-apache-sling-jcr-repoinit/pull/23#issuecomment-1074829955
SonarCloud Quality Gate failed. 
[](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=CODE_SMELL) [6 Code Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&metric=new_coverage&view=list) [45.5% Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&metric=new_coverage&view=list)
[](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&metric=new_duplicated_lines_density&view=list)
--
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: dev-unsubscribe@sling.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [sling-org-apache-sling-jcr-repoinit] sonarcloud[bot] commented on pull request #23: SLING-8843 repoinit developer mode
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #23:
URL: https://github.com/apache/sling-org-apache-sling-jcr-repoinit/pull/23#issuecomment-1075480719
SonarCloud Quality Gate failed. 
[](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=CODE_SMELL) [1 Code Smell](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&metric=new_coverage&view=list) [61.1% Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&metric=new_coverage&view=list)
[](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&metric=new_duplicated_lines_density&view=list)
--
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: dev-unsubscribe@sling.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [sling-org-apache-sling-jcr-repoinit] joerghoh edited a comment on pull request #23: SLING-8843 repoinit developer mode
Posted by GitBox <gi...@apache.org>.
joerghoh edited a comment on pull request #23:
URL: https://github.com/apache/sling-org-apache-sling-jcr-repoinit/pull/23#issuecomment-1075464081
I would then change it to use OSGI configuration, and not introducing a new abstraction for it. With runmodes we have the same capabilities, when it comes to support different settings.
@enapps-enorman I consider this as an emergency setting, so developers do not have to rebuild their local environment, when they made a mistake with repoinit scripts. If this is a system property they can fix their environment even if it's not coming up anymore because of an incorrect repoinit script. With OSGI settings this gets a bit more complex; and not every developer starts its application with a feature launcher.
--
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: dev-unsubscribe@sling.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [sling-org-apache-sling-jcr-repoinit] enapps-enorman commented on pull request #23: SLING-8843 repoinit developer mode
Posted by GitBox <gi...@apache.org>.
enapps-enorman commented on pull request #23:
URL: https://github.com/apache/sling-org-apache-sling-jcr-repoinit/pull/23#issuecomment-1073285956
I'm not necessarily opposed to this, but perhaps it would be more useful to introduce a generalized solution to alter behavior in production vs development.
For example, the JavaServerFaces framework has a [ProjectStage](https://docs.oracle.com/cd/E17802_01/j2ee/javaee/javaserverfaces/2.0/docs/api/javax/faces/application/ProjectStage.html) concept that can be checked at runtime to alter behaviors.
Sling could do something similar with a configurable ProjectStage service that could be referenced wherever this kind of decision is required.
--
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: dev-unsubscribe@sling.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [sling-org-apache-sling-jcr-repoinit] sonarcloud[bot] commented on pull request #23: SLING-8843 repoinit developer mode
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #23:
URL: https://github.com/apache/sling-org-apache-sling-jcr-repoinit/pull/23#issuecomment-1074829955
SonarCloud Quality Gate failed. 
[](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=CODE_SMELL) [6 Code Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&metric=new_coverage&view=list) [45.5% Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&metric=new_coverage&view=list)
[](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&metric=new_duplicated_lines_density&view=list)
--
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: dev-unsubscribe@sling.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [sling-org-apache-sling-jcr-repoinit] sonarcloud[bot] commented on pull request #23: SLING-8843 repoinit developer mode
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #23:
URL: https://github.com/apache/sling-org-apache-sling-jcr-repoinit/pull/23#issuecomment-1075444889
SonarCloud Quality Gate failed. 
[](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=CODE_SMELL) [6 Code Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&metric=new_coverage&view=list) [37.9% Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&metric=new_coverage&view=list)
[](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&metric=new_duplicated_lines_density&view=list)
--
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: dev-unsubscribe@sling.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [sling-org-apache-sling-jcr-repoinit] joerghoh commented on pull request #23: SLING-8843 repoinit developer mode
Posted by GitBox <gi...@apache.org>.
joerghoh commented on pull request #23:
URL: https://github.com/apache/sling-org-apache-sling-jcr-repoinit/pull/23#issuecomment-1075391065
@enapps-enorman For a more generalized behavior we do have the runmodes.
I decided against using OSGI configuration (and thus the ability to configure it per runmode) because this should be development only setting. If it is OSGI it would be a default setting in every project, which might end up in production.
OSGI configuration is normally deployed along code, but system properties are not. Makes it harder to misuse.
--
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: dev-unsubscribe@sling.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [sling-org-apache-sling-jcr-repoinit] sonarcloud[bot] removed a comment on pull request #23: SLING-8843 repoinit developer mode
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] removed a comment on pull request #23:
URL: https://github.com/apache/sling-org-apache-sling-jcr-repoinit/pull/23#issuecomment-1075480719
SonarCloud Quality Gate failed. 
[](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=CODE_SMELL) [1 Code Smell](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&metric=new_coverage&view=list) [61.1% Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&metric=new_coverage&view=list)
[](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&metric=new_duplicated_lines_density&view=list)
--
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: dev-unsubscribe@sling.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [sling-org-apache-sling-jcr-repoinit] sonarcloud[bot] commented on pull request #23: SLING-8843 repoinit developer mode
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #23:
URL: https://github.com/apache/sling-org-apache-sling-jcr-repoinit/pull/23#issuecomment-1086833176
SonarCloud Quality Gate failed. [](https://sonarcloud.io/dashboard?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23)
[](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&metric=new_coverage&view=list) [65.0% Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&metric=new_coverage&view=list)
[](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&metric=new_duplicated_lines_density&view=list)
--
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: dev-unsubscribe@sling.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [sling-org-apache-sling-jcr-repoinit] sonarcloud[bot] commented on pull request #23: SLING-8843 repoinit developer mode
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #23:
URL: https://github.com/apache/sling-org-apache-sling-jcr-repoinit/pull/23#issuecomment-1073254753
SonarCloud Quality Gate failed. 
[](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=CODE_SMELL) [6 Code Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&metric=new_coverage&view=list) [45.5% Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&metric=new_coverage&view=list)
[](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&metric=new_duplicated_lines_density&view=list)
--
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: dev-unsubscribe@sling.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [sling-org-apache-sling-jcr-repoinit] enapps-enorman commented on pull request #23: SLING-8843 repoinit developer mode
Posted by GitBox <gi...@apache.org>.
enapps-enorman commented on pull request #23:
URL: https://github.com/apache/sling-org-apache-sling-jcr-repoinit/pull/23#issuecomment-1075423395
> Makes it harder to misuse.
@joerghoh To me the distinction you have made seems to be purely semantics. If the ProjectStage configuration defaults to "Production" then your code would only do the "Development" stuff when enabled manually. For example, if the user starts the feature launcher with a command line property variable that changes the default value or the admin manually changes the value using the ConfigurationAdmin.
I think I would still prefer a generalized solution since the same decision could be useful to improve the sling DefaultErrorHandler to not return stacktrace or request progress details when in production. Exposing those implementation details of the server to the end users is a potential information disclosure vulnerability.
Another example is perhaps you want to send minimized js files in production and non-minimized during development.
--
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: dev-unsubscribe@sling.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [sling-org-apache-sling-jcr-repoinit] joerghoh commented on a change in pull request #23: SLING-8843 repoinit developer mode
Posted by GitBox <gi...@apache.org>.
joerghoh commented on a change in pull request #23:
URL: https://github.com/apache/sling-org-apache-sling-jcr-repoinit/pull/23#discussion_r832443105
##########
File path: src/main/java/org/apache/sling/jcr/repoinit/impl/RepositoryInitializerFactory.java
##########
@@ -99,43 +105,54 @@ public String toString() {
@Override
public void processRepository(final SlingRepository repo) throws Exception {
- if ( (config.references() != null && config.references().length > 0)
- || (config.scripts() != null && config.scripts().length > 0 )) {
+ // loginAdministrative is ok here, definitely an admin operation
+ final Session s = repo.loginAdministrative(null);
+ try {
+ executeScripts(s, config);
+ } catch (Exception e) {
+ if (isDeveloperModeEnabled()) {
+ log.error("Eror in the repoinit scripts, which is ignored because the developer mode is active. "
Review comment:
thanks, changed the wording and also added the exception.
--
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: dev-unsubscribe@sling.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [sling-org-apache-sling-jcr-repoinit] sonarcloud[bot] removed a comment on pull request #23: SLING-8843 repoinit developer mode
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] removed a comment on pull request #23:
URL: https://github.com/apache/sling-org-apache-sling-jcr-repoinit/pull/23#issuecomment-1073254753
SonarCloud Quality Gate failed. 
[](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=CODE_SMELL) [6 Code Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&metric=new_coverage&view=list) [45.5% Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&metric=new_coverage&view=list)
[](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&metric=new_duplicated_lines_density&view=list)
--
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: dev-unsubscribe@sling.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [sling-org-apache-sling-jcr-repoinit] joerghoh commented on pull request #23: SLING-8843 repoinit developer mode
Posted by GitBox <gi...@apache.org>.
joerghoh commented on pull request #23:
URL: https://github.com/apache/sling-org-apache-sling-jcr-repoinit/pull/23#issuecomment-1075464081
I would then change it to use OSGI configuration.
--
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: dev-unsubscribe@sling.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [sling-org-apache-sling-jcr-repoinit] bdelacretaz commented on pull request #23: SLING-8843 repoinit developer mode
Posted by GitBox <gi...@apache.org>.
bdelacretaz commented on pull request #23:
URL: https://github.com/apache/sling-org-apache-sling-jcr-repoinit/pull/23#issuecomment-1076107382
+1 for a more descriptive name for the property.
By analogy with Maven's `failIfNoTests` setting I suggest `org.apache.sling.repoinit.failOnError` which defaults to true.
--
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: dev-unsubscribe@sling.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [sling-org-apache-sling-jcr-repoinit] bdelacretaz commented on a change in pull request #23: SLING-8843 repoinit developer mode
Posted by GitBox <gi...@apache.org>.
bdelacretaz commented on a change in pull request #23:
URL: https://github.com/apache/sling-org-apache-sling-jcr-repoinit/pull/23#discussion_r830863903
##########
File path: src/main/java/org/apache/sling/jcr/repoinit/impl/RepositoryInitializerFactory.java
##########
@@ -99,43 +105,54 @@ public String toString() {
@Override
public void processRepository(final SlingRepository repo) throws Exception {
- if ( (config.references() != null && config.references().length > 0)
- || (config.scripts() != null && config.scripts().length > 0 )) {
+ // loginAdministrative is ok here, definitely an admin operation
+ final Session s = repo.loginAdministrative(null);
+ try {
+ executeScripts(s, config);
+ } catch (Exception e) {
+ if (isDeveloperModeEnabled()) {
+ log.error("Eror in the repoinit scripts, which is ignored because the developer mode is active. "
Review comment:
I suggest a bit more precise message:
> Repoinit error, won't stop execution as org.apache.sling.jcr.repoinit.developermode is set. Without that developer option, startup would fail.
And the actual error should probably be logged in developer mode?
--
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: dev-unsubscribe@sling.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [sling-org-apache-sling-jcr-repoinit] bdelacretaz commented on pull request #23: SLING-8843 repoinit developer mode
Posted by GitBox <gi...@apache.org>.
bdelacretaz commented on pull request #23:
URL: https://github.com/apache/sling-org-apache-sling-jcr-repoinit/pull/23#issuecomment-1073642787
Note that we do have a simple way to test log messages, at https://github.com/apache/sling-org-apache-sling-graphql-core/blob/master/src/test/java/org/apache/sling/graphql/core/util/LogCapture.java - this would allow more precise testing (and we might want to move that class to a common module, but it is reusable already for tests)
--
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: dev-unsubscribe@sling.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [sling-org-apache-sling-jcr-repoinit] joerghoh commented on a change in pull request #23: SLING-8843 repoinit developer mode
Posted by GitBox <gi...@apache.org>.
joerghoh commented on a change in pull request #23:
URL: https://github.com/apache/sling-org-apache-sling-jcr-repoinit/pull/23#discussion_r832443406
##########
File path: src/main/java/org/apache/sling/jcr/repoinit/impl/RepositoryInitializerFactory.java
##########
@@ -177,5 +194,13 @@ protected void applyOperations(Session session, List<Operation> ops, String logM
}
}
+
+ protected static boolean isDeveloperModeEnabled() {
+ String dm = System.getProperty(PROPERTY_DEVELOPER_MODE);
Review comment:
good one, thanks.
--
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: dev-unsubscribe@sling.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [sling-org-apache-sling-jcr-repoinit] sonarcloud[bot] commented on pull request #23: SLING-8843 repoinit developer mode
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #23:
URL: https://github.com/apache/sling-org-apache-sling-jcr-repoinit/pull/23#issuecomment-1077927489
SonarCloud Quality Gate failed. 
[](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=CODE_SMELL) [1 Code Smell](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&metric=new_coverage&view=list) [65.0% Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&metric=new_coverage&view=list)
[](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&metric=new_duplicated_lines_density&view=list)
--
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: dev-unsubscribe@sling.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [sling-org-apache-sling-jcr-repoinit] sonarcloud[bot] commented on pull request #23: SLING-8843 repoinit developer mode
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #23:
URL: https://github.com/apache/sling-org-apache-sling-jcr-repoinit/pull/23#issuecomment-1081537755
SonarCloud Quality Gate failed. 
[](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=CODE_SMELL) [1 Code Smell](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&metric=new_coverage&view=list) [65.0% Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&metric=new_coverage&view=list)
[](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&metric=new_duplicated_lines_density&view=list)
--
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: dev-unsubscribe@sling.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [sling-org-apache-sling-jcr-repoinit] enapps-enorman edited a comment on pull request #23: SLING-8843 repoinit developer mode
Posted by GitBox <gi...@apache.org>.
enapps-enorman edited a comment on pull request #23:
URL: https://github.com/apache/sling-org-apache-sling-jcr-repoinit/pull/23#issuecomment-1075423395
> Makes it harder to misuse.
@joerghoh To me the distinction you have made seems to be purely semantics. If the ProjectStage configuration defaults to "Production" then your code would only do the "Development" stuff when enabled manually. For example, if the user starts the feature launcher with a command line property variable that changes the default value or the admin manually changes the value using the ConfigurationAdmin.
I think I would still prefer a generalized solution since the same decision could be useful to improve the sling DefaultErrorHandler to not return stacktrace or request progress details when in production. Exposing those implementation details of the server to the end users is a potential information disclosure vulnerability.
Another example is perhaps you want to send minimized js files in production and non-minimized during development.
--
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: dev-unsubscribe@sling.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [sling-org-apache-sling-jcr-repoinit] enapps-enorman commented on pull request #23: SLING-8843 repoinit developer mode
Posted by GitBox <gi...@apache.org>.
enapps-enorman commented on pull request #23:
URL: https://github.com/apache/sling-org-apache-sling-jcr-repoinit/pull/23#issuecomment-1075452435
> If there's real demand for it,
Is my demand for it not real?
--
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: dev-unsubscribe@sling.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [sling-org-apache-sling-jcr-repoinit] enapps-enorman commented on pull request #23: SLING-8843 repoinit developer mode
Posted by GitBox <gi...@apache.org>.
enapps-enorman commented on pull request #23:
URL: https://github.com/apache/sling-org-apache-sling-jcr-repoinit/pull/23#issuecomment-1075516860
> I consider this as an emergency setting
Then don't call it "developer mode", call it something else.
--
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: dev-unsubscribe@sling.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [sling-org-apache-sling-jcr-repoinit] enapps-enorman edited a comment on pull request #23: SLING-8843 repoinit developer mode
Posted by GitBox <gi...@apache.org>.
enapps-enorman edited a comment on pull request #23:
URL: https://github.com/apache/sling-org-apache-sling-jcr-repoinit/pull/23#issuecomment-1075516860
> I consider this as an emergency setting
Then don't call it "developer mode", call it something else.
Perhaps something more descriptive like "org.apache.sling.jcr.repoinit.keepRunningOnError".
--
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: dev-unsubscribe@sling.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [sling-org-apache-sling-jcr-repoinit] sonarcloud[bot] removed a comment on pull request #23: SLING-8843 repoinit developer mode
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] removed a comment on pull request #23:
URL: https://github.com/apache/sling-org-apache-sling-jcr-repoinit/pull/23#issuecomment-1081537755
SonarCloud Quality Gate failed. 
[](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=CODE_SMELL) [1 Code Smell](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&metric=new_coverage&view=list) [65.0% Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&metric=new_coverage&view=list)
[](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-repoinit&pullRequest=23&metric=new_duplicated_lines_density&view=list)
--
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: dev-unsubscribe@sling.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org