[GitHub] [sling-org-apache-sling-caconfig-integration-tests] sonarcloud[bot] commented on pull request #1: SLING-11114 update SLING API to 2.21.0
sonarcloud[bot] commented on PR #1: URL: https://github.com/apache/sling-org-apache-sling-caconfig-integration-tests/pull/1#issuecomment-1146476677 Kudos, SonarCloud Quality Gate passed! [![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')](https://sonarcloud.io/dashboard?id=apache_sling-org-apache-sling-caconfig-integration-tests&pullRequest=1) [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-caconfig-integration-tests&pullRequest=1&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-caconfig-integration-tests&pullRequest=1&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-caconfig-integration-tests&pullRequest=1&resolved=false&types=BUG) [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-caconfig-integration-tests&pullRequest=1&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-caconfig-integration-tests&pullRequest=1&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-caconfig-integration-tests&pullRequest=1&resolved=false&types=VULNERABILITY) [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-caconfig-integration-tests&pullRequest=1&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-caconfig-integration-tests&pullRequest=1&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-caconfig-integration-tests&pullRequest=1&resolved=false&types=SECURITY_HOTSPOT) [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-caconfig-integration-tests&pullRequest=1&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-caconfig-integration-tests&pullRequest=1&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-caconfig-integration-tests&pullRequest=1&resolved=false&types=CODE_SMELL) [![No Coverage information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo-16px.png 'No Coverage information')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-caconfig-integration-tests&pullRequest=1) No Coverage information [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-caconfig-integration-tests&pullRequest=1&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-caconfig-integration-tests&pullRequest=1&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-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Updated] (SLING-11369) Provide Maven Enforcer rule which checks that provided dependencies are contained in the runtime Maven classpath
[ https://issues.apache.org/jira/browse/SLING-11369?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Konrad Windszus updated SLING-11369: Description: All dependencies with provided scope are not transitively inherited. While this isn't a problem usually during compile time it is a problem for Maven plugins at run time, as they use the Maven dependency classpath also at run time (https://maven.apache.org/guides/mini/guide-maven-classloading.html#3-plugin-classloaders). At run time they fail if the (transitive) provided dependency has not been declared explicitly. As manually specifying all transitive (but hidden) provided dependencies is a very error-prone process an enforcer rule for that would be highly beneficial. Especially as the transitive dependencies have to be rechecked once you upgrade to a newer version. Example: My Maven Plugin "A" -> 3rd Party Library "B" -> Provided Dependency "C" As "B" uses "C" at run time it needs to be declared as dependency of "A" as well otherwise you might see java.lang.ClassNotFoundException when executing Maven plugin "A". This was originally proposed in MENFORCER-385 but declined as considered too much of an edge case. Compare with the discussion at https://lists.apache.org/thread/ttncrwmsnk29qy6n3on6ymfbq9s7dbnm was: All dependencies with provided scope are not transitively inherited. While this isn't a problem usually during compile time it is a problem for Maven plugins at run time, as they use the Maven dependency classpath also at run time (https://maven.apache.org/guides/mini/guide-maven-classloading.html#3-plugin-classloaders). At run time they fail if the transitive provided dependency has not been declared explicitly. As manually specifying all transitive (but hidden) provided dependencies is a very error-prone process an enforcer rule for that would be highly beneficial. Especially as the transitive dependencies have to be rechecked once you upgrade to a newer version. Example: My Maven Plugin "A" -> 3rd Party Library "B" -> Provided Dependency "C" As "B" uses "C" at run time it needs to be declared as dependency of "A" as well otherwise you might see java.lang.ClassNotFoundException when executing Maven plugin "A". This was originally proposed in MENFORCER-385 but declined as considered too much of an edge case. Compare with the discussion at https://lists.apache.org/thread/ttncrwmsnk29qy6n3on6ymfbq9s7dbnm > Provide Maven Enforcer rule which checks that provided dependencies are > contained in the runtime Maven classpath > > > Key: SLING-11369 > URL: https://issues.apache.org/jira/browse/SLING-11369 > Project: Sling > Issue Type: New Feature > Components: Tooling >Reporter: Konrad Windszus >Assignee: Konrad Windszus >Priority: Major > > All dependencies with provided scope are not transitively inherited. While > this isn't a problem usually during compile time it is a problem for Maven > plugins at run time, as they use the Maven dependency classpath also at run > time > (https://maven.apache.org/guides/mini/guide-maven-classloading.html#3-plugin-classloaders). > At run time they fail if the (transitive) provided dependency has not been > declared explicitly. > As manually specifying all transitive (but hidden) provided dependencies is a > very error-prone process an enforcer rule for that would be highly > beneficial. Especially as the transitive dependencies have to be rechecked > once you upgrade to a newer version. > Example: > My Maven Plugin "A" -> 3rd Party Library "B" -> Provided Dependency "C" > As "B" uses "C" at run time it needs to be declared as dependency of "A" as > well otherwise you might see java.lang.ClassNotFoundException when executing > Maven plugin "A". > This was originally proposed in MENFORCER-385 but declined as considered too > much of an edge case. > Compare with the discussion at > https://lists.apache.org/thread/ttncrwmsnk29qy6n3on6ymfbq9s7dbnm -- This message was sent by Atlassian Jira (v8.20.7#820007)
[jira] [Updated] (SLING-11369) Provide Maven Enforcer rule which checks that provided dependencies are contained in the runtime Maven classpath
[ https://issues.apache.org/jira/browse/SLING-11369?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Konrad Windszus updated SLING-11369: Summary: Provide Maven Enforcer rule which checks that provided dependencies are contained in the runtime Maven classpath (was: Provide Maven Enforcer rule which checks that transitive provided dependencies are contained in the runtime Maven classpath) > Provide Maven Enforcer rule which checks that provided dependencies are > contained in the runtime Maven classpath > > > Key: SLING-11369 > URL: https://issues.apache.org/jira/browse/SLING-11369 > Project: Sling > Issue Type: New Feature > Components: Tooling >Reporter: Konrad Windszus >Assignee: Konrad Windszus >Priority: Major > > All dependencies with provided scope are not transitively inherited. While > this isn't a problem usually during compile time it is a problem for Maven > plugins at run time, as they use the Maven dependency classpath also at run > time > (https://maven.apache.org/guides/mini/guide-maven-classloading.html#3-plugin-classloaders). > At run time they fail if the transitive provided dependency has not been > declared explicitly. > As manually specifying all transitive (but hidden) provided dependencies is a > very error-prone process an enforcer rule for that would be highly > beneficial. Especially as the transitive dependencies have to be rechecked > once you upgrade to a newer version. > Example: > My Maven Plugin "A" -> 3rd Party Library "B" -> Provided Dependency "C" > As "B" uses "C" at run time it needs to be declared as dependency of "A" as > well otherwise you might see java.lang.ClassNotFoundException when executing > Maven plugin "A". > This was originally proposed in MENFORCER-385 but declined as considered too > much of an edge case. > Compare with the discussion at > https://lists.apache.org/thread/ttncrwmsnk29qy6n3on6ymfbq9s7dbnm -- This message was sent by Atlassian Jira (v8.20.7#820007)
[jira] [Created] (SLING-11378) Execution fails if no launcher arguments are defined
Robert Munteanu created SLING-11378: --- Summary: Execution fails if no launcher arguments are defined Key: SLING-11378 URL: https://issues.apache.org/jira/browse/SLING-11378 Project: Sling Issue Type: Bug Components: Maven Plugins and Archetypes Reporter: Robert Munteanu Assignee: Robert Munteanu Fix For: Feature Launcher Maven Plugin 0.1.4 {noformat}org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.sling:feature-launcher-maven-plugin:0.1.3-SNAPSHOT:start (default) on project bundle-version-override: Execution default of goal org.apache.sling:feature-launcher-maven-plugin:0.1.3-SNAPSHOT:start failed: Cannot invoke "org.apache.sling.maven.feature.launcher.LauncherArguments.getVmOptions()" because the return value of "org.apache.sling.maven.feature.launcher.Launch.getLauncherArguments()" is null >{noformat} -- This message was sent by Atlassian Jira (v8.20.7#820007)
SlingRequestDispatcher and nested forwards
Hi, A colleague mentioned getting "SlingRequestProcessorImpl Writer has already been closed" error messages when using SlingRequestDispatcher.forward(...), and looking at the code [1] I wonder if we should change the request flushing behavior. Unfortunately, unless I missed something that code is not covered by units tests, but I suppose nested calls to SlingRequestDispatcher.forward(...) would cause the problem: SlingRequestDispatcher blindly calls response.flushBuffer(), which causes logged errors if the response Writer is already closed. So if a Servlet that's been forwarded to calls SlingRequestDispatcher.forward(...) I suppose we get this problem. I could write a test to verify all that of course, but maybe someone already has a clear idea on this. Shall we modify that code to check the request status before calling flushBuffer() ? I don't think there's a direct way to check if the Writer is closed already, but maybe there's another call on the request that would check that? -Bertrand [1] https://github.com/apache/sling-org-apache-sling-engine/blob/631a54f45abf5fd6d7c56dac43fd499db543bcd7/src/main/java/org/apache/sling/engine/impl/request/SlingRequestDispatcher.java#L151
[GitHub] [sling-org-apache-sling-distribution-core] sonarcloud[bot] commented on pull request #59: SLING-11366: Provide more exception error context on the JSON API responses
sonarcloud[bot] commented on PR #59: URL: https://github.com/apache/sling-org-apache-sling-distribution-core/pull/59#issuecomment-1146059113 Kudos, SonarCloud Quality Gate passed! [![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')](https://sonarcloud.io/dashboard?id=apache_sling-org-apache-sling-distribution-core&pullRequest=59) [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-distribution-core&pullRequest=59&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-distribution-core&pullRequest=59&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-distribution-core&pullRequest=59&resolved=false&types=BUG) [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-distribution-core&pullRequest=59&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-distribution-core&pullRequest=59&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-distribution-core&pullRequest=59&resolved=false&types=VULNERABILITY) [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-distribution-core&pullRequest=59&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-distribution-core&pullRequest=59&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-distribution-core&pullRequest=59&resolved=false&types=SECURITY_HOTSPOT) [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-distribution-core&pullRequest=59&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-distribution-core&pullRequest=59&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-distribution-core&pullRequest=59&resolved=false&types=CODE_SMELL) [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/0-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-distribution-core&pullRequest=59&metric=new_coverage&view=list) [0.0% Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-distribution-core&pullRequest=59&metric=new_coverage&view=list) [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-distribution-core&pullRequest=59&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-distribution-core&pullRequest=59&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-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [sling-org-apache-sling-distribution-core] cschneider merged pull request #59: SLING-11366: Provide more exception error context on the JSON API responses
cschneider merged PR #59: URL: https://github.com/apache/sling-org-apache-sling-distribution-core/pull/59 -- 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-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [sling-org-apache-sling-distribution-core] cschneider commented on a diff in pull request #59: SLING-11366: Provide more exception error context on the JSON API responses
cschneider commented on code in PR #59: URL: https://github.com/apache/sling-org-apache-sling-distribution-core/pull/59#discussion_r889025653 ## src/main/java/org/apache/sling/distribution/servlet/DistributionPackageImporterServlet.java: ## @@ -126,8 +127,10 @@ protected void doPost(SlingHttpServletRequest request, SlingHttpServletResponse ServletJsonUtils.writeJson(response, SC_OK, "package imported successfully", null); } catch (final Throwable e) { -ServletJsonUtils.writeJson(response, SC_INTERNAL_SERVER_ERROR, "an unexpected error has occurred during distribution import", null); -log.error("Error during distribution import", e); +String msg = format("an unexpected error has occurred during distribution import. Error:%s", Review Comment: One very small change request: There should be a space in front of %s I think. -- 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-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [sling-org-apache-sling-distribution-core] cschneider commented on pull request #59: SLING-11366: Provide more exception error context on the JSON API responses
cschneider commented on PR #59: URL: https://github.com/apache/sling-org-apache-sling-distribution-core/pull/59#issuecomment-1146048874 Let's separate the status codes from this change. Jose plans to work on that in a separate jira. -- 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-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Updated] (SLING-9463) Document reproducible builds and check automatically via check-staged-release
[ https://issues.apache.org/jira/browse/SLING-9463?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Konrad Windszus updated SLING-9463: --- Fix Version/s: (was: Parent 48) > Document reproducible builds and check automatically via check-staged-release > - > > Key: SLING-9463 > URL: https://issues.apache.org/jira/browse/SLING-9463 > Project: Sling > Issue Type: Improvement > Components: Documentation, General >Reporter: Konrad Windszus >Priority: Major > > With SLING-9307 and SLING-8951 all builds relying Parent 39 or newer should > be reproducible. Still some parts are missing: > # buildinfo files should be uploaded along with the artifacts > ([https://maven.apache.org/guides/mini/guide-reproducible-builds.html]) which > allows to easily reproduce build (as they contain info about linebreaks and > major JDK versions). > # The check-staged-release.sh should be updated accordingly to optionally > try rebuilding and comparing with the given checksums. > # > [https://sling.apache.org/documentation/development/release-management.html] > should be extended with how to properly check a release after a vote. > # There should be some documentation covering how end-users could reproduce > builds. > # On the downloads page ([https://sling.apache.org/downloads.cgi]) there > should be a link to the buildinfo files for new/reproducible releases > pointing to downloads.apache.org. -- This message was sent by Atlassian Jira (v8.20.7#820007)
Re: [VOTE] Release Apache Sling (Bundle) Parent 48
> Also, should https://issues.apache.org/jira/browse/SLING-9463 be moved > to the next release? > Good point, done.
Re: [VOTE] Release Apache Sling (Bundle) Parent 48
On Fri, 2022-06-03 at 12:01 +0200, Konrad Windszus wrote: > Please vote to approve this release: +1 Also, should https://issues.apache.org/jira/browse/SLING-9463 be moved to the next release? Robert signature.asc Description: This is a digitally signed message part
Re: [VOTE] Release Apache Sling Installer WebConsole Plugin version 1.0.4
On Fri, 2022-06-03 at 14:39 +0200, Konrad Windszus wrote: > Please vote to approve this release: +1 Robert signature.asc Description: This is a digitally signed message part
[VOTE] Release Apache Sling Installer WebConsole Plugin version 1.0.4
Hi, This is mostly a back port of version 1.1.0 to ensure compatibility with OSGi Installer Core: https://issues.apache.org/jira/browse/SLING-11344 Staging repository: https://repository.apache.org/content/repositories/orgapachesling-2643/ You can use this UNIX script to download the release and verify the signatures: https://gitbox.apache.org/repos/asf?p=sling-tooling-release.git;a=blob;f=check_staged_release.sh;hb=HEAD Usage: sh check_staged_release.sh 2643 /tmp/sling-staging Please vote to approve this release: [ ] +1 Approve the release [ ] 0 Don't care [ ] -1 Don't release, because ... This majority vote is open for at least 72 hours. Regards, Konrad
[GitHub] [sling-org-apache-sling-jcr-resource] sonarcloud[bot] commented on pull request #26: SLING-11367 : Potential NPE as ResolveContext.getProviderState() is nullable
sonarcloud[bot] commented on PR #26: URL: https://github.com/apache/sling-org-apache-sling-jcr-resource/pull/26#issuecomment-1145913052 SonarCloud Quality Gate failed. [![Quality Gate failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')](https://sonarcloud.io/dashboard?id=apache_sling-org-apache-sling-jcr-resource&pullRequest=26) [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-resource&pullRequest=26&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-resource&pullRequest=26&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-resource&pullRequest=26&resolved=false&types=BUG) [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-resource&pullRequest=26&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-resource&pullRequest=26&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-resource&pullRequest=26&resolved=false&types=VULNERABILITY) [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-jcr-resource&pullRequest=26&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-jcr-resource&pullRequest=26&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-jcr-resource&pullRequest=26&resolved=false&types=SECURITY_HOTSPOT) [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-resource&pullRequest=26&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-resource&pullRequest=26&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-jcr-resource&pullRequest=26&resolved=false&types=CODE_SMELL) [![70.6%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60-16px.png '70.6%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-resource&pullRequest=26&metric=new_coverage&view=list) [70.6% Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-resource&pullRequest=26&metric=new_coverage&view=list) [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-resource&pullRequest=26&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-jcr-resource&pullRequest=26&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-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [sling-org-apache-sling-jcr-resource] anchela opened a new pull request, #26: SLING-11367 : Potential NPE as ResolveContext.getProviderState() is nullable
anchela opened a new pull request, #26: URL: https://github.com/apache/sling-org-apache-sling-jcr-resource/pull/26 @cziegeler , as discussed in the ticket. i would appreciate if you had time to review the PR. -- 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-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Assigned] (SLING-11367) Potential NPE as ResolveContext.getProviderState() is nullable
[ https://issues.apache.org/jira/browse/SLING-11367?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Angela Schreiber reassigned SLING-11367: Assignee: Angela Schreiber > Potential NPE as ResolveContext.getProviderState() is nullable > --- > > Key: SLING-11367 > URL: https://issues.apache.org/jira/browse/SLING-11367 > Project: Sling > Issue Type: Sub-task > Components: JCR >Affects Versions: JCR Resource 3.2.0 >Reporter: Angela Schreiber >Assignee: Angela Schreiber >Priority: Minor > > since {{ResolveContext.getProviderState()}} is defined to return a nullable > provider state code analysis spots this a potential source for NPE. according > to [~cziegeler] this should never return null as long as the provider is > active. > i would suggest to move access to session, resourcefactory and helperdata to > a utility with comments on why the NPE should not occur. -- This message was sent by Atlassian Jira (v8.20.7#820007)
[GitHub] [sling-org-apache-sling-resourceresolver] sonarcloud[bot] commented on pull request #72: SLING-11372: resource resolver: cleanup code related to aliases
sonarcloud[bot] commented on PR #72: URL: https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/72#issuecomment-1145886556 Kudos, SonarCloud Quality Gate passed! [![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')](https://sonarcloud.io/dashboard?id=apache_sling-org-apache-sling-resourceresolver&pullRequest=72) [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-resourceresolver&pullRequest=72&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-resourceresolver&pullRequest=72&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-resourceresolver&pullRequest=72&resolved=false&types=BUG) [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-resourceresolver&pullRequest=72&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-resourceresolver&pullRequest=72&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-resourceresolver&pullRequest=72&resolved=false&types=VULNERABILITY) [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-resourceresolver&pullRequest=72&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-resourceresolver&pullRequest=72&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-resourceresolver&pullRequest=72&resolved=false&types=SECURITY_HOTSPOT) [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-resourceresolver&pullRequest=72&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-resourceresolver&pullRequest=72&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-resourceresolver&pullRequest=72&resolved=false&types=CODE_SMELL) [![83.9%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60-16px.png '83.9%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-resourceresolver&pullRequest=72&metric=new_coverage&view=list) [83.9% Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-resourceresolver&pullRequest=72&metric=new_coverage&view=list) [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-resourceresolver&pullRequest=72&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-resourceresolver&pullRequest=72&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-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Resolved] (SLING-11344) Backport of SLING-8897 and others from Installer Console 1.1.0 for compatibility with OSGi Installer Core 3.9.0
[ https://issues.apache.org/jira/browse/SLING-11344?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Konrad Windszus resolved SLING-11344. - Resolution: Fixed > Backport of SLING-8897 and others from Installer Console 1.1.0 for > compatibility with OSGi Installer Core 3.9.0 > --- > > Key: SLING-11344 > URL: https://issues.apache.org/jira/browse/SLING-11344 > Project: Sling > Issue Type: Improvement > Components: Installer >Reporter: Konrad Windszus >Assignee: Konrad Windszus >Priority: Major > Fix For: Installer Console 1.0.4 > > Time Spent: 1h > Remaining Estimate: 0h > > The WebConsole plugin added in SLING-8897 requires OSGi Installer Core 3.10.0 > or newer. As updating the installer core bundle in existing distributions is > often not easy (due to the downstream dependencies to installer providers) it > would be nice to offer this feature in a web console bundle version which is > still compatible with 3.9.0. -- This message was sent by Atlassian Jira (v8.20.7#820007)
Re: Improve JSON serialization and response data types
In places where the size/number of dependencies really matters we also embedded (via Bnds conditionalpackage, https://bnd.bndtools.org/instructions/conditionalpackage.html) the minimum implementation provided by Felix Utils: https://github.com/apache/felix-dev/tree/master/utils/src/main/java/org/apache/felix/utils/json Both parser and serialiser are very lean and are don’t have any external dependencies. For all other cases javax.json is the way to go. Konrad > On 3. Jun 2022, at 11:50, Bertrand Delacretaz wrote: > > Le ven. 3 juin 2022 à 11:46, Julian Reschke a écrit : >> ...I believe the answer is javax.json. > > Yes, many "newer" Sling modules are using that. > > I think the homegrown JSON code is here for historical reasons. > > If someone wants to change that that's fine, but backwards > compatibility has to be preserved. > > The strong modularity of Sling means it's not necessarily a problem > (even if not optimal) to use different techniques in different > modules. To be evaluated on a case-by-case basis, IMO. > > -Bertrand
[RFC] Implementing externally documented error codes across the Sling APIs
I would like to open the discussion on creating a standard for well-defined and externally documented error codes in our APIs. This simple approach is a very good way of keeping consistency on the errors thrown by the API and improving error documentation, while also simplifying the way that exceptions that happen in lower-level modules of the system are handled by higher modules such as servlet endpoints. Stripe has a good example of good error code documentation: https://stripe.com/docs/error-codes *Pros:* 1. A single place of change for API error descriptions. 2. We can change the error descriptions without changing the error code, which improves logging in the long term. 3. Can be extended to add links for the error code external documentation. This could improve the API responses, providing more feedback on errors. 4. Easier propagation of exception expected outcomes: 1. the expected description, error code, and HTTP status are propagated easily inside the exceptions 2. This allows for the transport layer to be completely abstracted of exceptions in lower modules, and simply act according to the error code definition. A PR was created implementing an initial approach in the Distribution Core bundle: https://github.com/apache/sling-org-apache-sling-distribution-core/pull/60 Comments are welcome! Short example *Error code definition:* public enum ErrorCode { /** * A generic unexpected error in the system. * Should result in an INTERNAL_SERVER_ERROR HTTP status code. */ UNKNOWN_ERROR("unknown", "An unexpected error has occurred.", 500), /** * Error that happens when the client tries to distribute a package that exceeds the * configured package size limit. * Should result in a BAD_REQUEST HTTP status code. */ DISTRIBUTION_PACKAGE_SIZE_LIMIT_EXCEEDED("package_limit_exceeded", "Package has exceeded the" + " limit bytes size.", 400);} *Exceptions include this type as an additional property:* public class DocumentedException extends Exception { private ErrorCode errorCode;} *Transport layer handles exception in an abstract way:* try { // execute logic} catch (Exception e) { ErrorCode error = e.getErrorCode(); logger.error(error.getCode(), error.getDescription()); httpStatusCode = e.getHttpStatusCode(); -> return httpStatusCode and JSON containing description and code.}
[VOTE] Release Apache Sling (Bundle) Parent 48
Hi, We solved some issues in these releases: https://issues.apache.org/jira/projects/SLING/versions/12351253 and https://issues.apache.org/jira/projects/SLING/versions/12351252 Staging repository: https://repository.apache.org/content/repositories/orgapachesling-2642/ You can use this UNIX script to download the releases and verify the signatures: https://gitbox.apache.org/repos/asf?p=sling-tooling-release.git;a=blob;f=check_staged_release.sh;hb=HEAD Usage: sh check_staged_release.sh 2642 /tmp/sling-staging Please vote to approve this release: [ ] +1 Approve the release [ ] 0 Don't care [ ] -1 Don't release, because ... This majority vote is open for at least 72 hours. Thanks, Konrad
[jira] [Updated] (SLING-9729) Bundle-Parent: Check if resolvable against latest Sling Starter
[ https://issues.apache.org/jira/browse/SLING-9729?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Konrad Windszus updated SLING-9729: --- Fix Version/s: (was: Bundle Parent 48) > Bundle-Parent: Check if resolvable against latest Sling Starter > --- > > Key: SLING-9729 > URL: https://issues.apache.org/jira/browse/SLING-9729 > Project: Sling > Issue Type: Improvement > Components: General >Affects Versions: Bundle Parent 39 >Reporter: Konrad Windszus >Priority: Major > > With SLING-9491 an OSGi repository index is being generated for Sling > Starter. Every bundle should be resolvable against that repository index (to > ensure compatibility with the latest Sling Starter). > To achieve that an approach like in > https://github.com/apache/jackrabbit-filevault/blob/0b3c4cb5a99d14e3d0ae881d7864806ed950c622/parent/pom.xml#L177 > should be used. -- This message was sent by Atlassian Jira (v8.20.7#820007)
[jira] [Resolved] (SLING-11376) Jenkins Library: Relocate sonar-m-p to SonarSource group id
[ https://issues.apache.org/jira/browse/SLING-11376?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Konrad Windszus resolved SLING-11376. - Resolution: Fixed Fixed in https://github.com/apache/sling-tooling-jenkins/commit/31c61c82bca94264bb7a3d18a222cfe3769b55f8 and https://github.com/apache/sling-tooling-jenkins/commit/c96238aa7c806a405f52e53add17b4b1d547afaa > Jenkins Library: Relocate sonar-m-p to SonarSource group id > --- > > Key: SLING-11376 > URL: https://issues.apache.org/jira/browse/SLING-11376 > Project: Sling > Issue Type: Improvement > Components: Tooling >Reporter: Konrad Windszus >Assignee: Konrad Windszus >Priority: Major > Time Spent: 20m > Remaining Estimate: 0h > > Currently the Jenkins Job says: > {code} > [WARNING] The artifact org.codehaus.mojo:sonar-maven-plugin:jar:3.9.1.2184 > has been relocated to > org.sonarsource.scanner.maven:sonar-maven-plugin:jar:3.9.1.2184: SonarQube > plugin was moved to SonarSource organisation > {code} (from > https://ci-builds.apache.org/job/Sling/job/modules/job/sling-maven-enforcer-rules/job/master/1/console) > We should reference the plugin with full GAV in the Jenkins library. -- This message was sent by Atlassian Jira (v8.20.7#820007)
Re: Improve JSON serialization and response data types
Le ven. 3 juin 2022 à 11:46, Julian Reschke a écrit : > ...I believe the answer is javax.json. Yes, many "newer" Sling modules are using that. I think the homegrown JSON code is here for historical reasons. If someone wants to change that that's fine, but backwards compatibility has to be preserved. The strong modularity of Sling means it's not necessarily a problem (even if not optimal) to use different techniques in different modules. To be evaluated on a case-by-case basis, IMO. -Bertrand
[GitHub] [sling-tooling-jenkins] kwin merged pull request #7: SLING-11376 Use proper GAV for sonar-maven-plugin
kwin merged PR #7: URL: https://github.com/apache/sling-tooling-jenkins/pull/7 -- 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-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: Improve JSON serialization and response data types
Am 03.06.2022 um 11:42 schrieb Christian Schneider: I suspect we use a home grown serialisation to minimise dependencies but I don't know. So I would be interested in what others say. What is our strategy/recommendation in sling when producing json? Christian I believe the answer is javax.json. Best regards, Julian
Re: Improve JSON serialization and response data types
I suspect we use a home grown serialisation to minimise dependencies but I don't know. So I would be interested in what others say. What is our strategy/recommendation in sling when producing json? Christian Am Do., 2. Juni 2022 um 10:07 Uhr schrieb José Correia < menesesj...@gmail.com>: > Hello! > > While working on the Distribution API I noticed some code smells that I > would like to discuss and see if we have a solution already implemented in > any Sling repository: > > >- *Java/JSON serialization* > > Currently, we are implementing our own serializer in the form of a generic > utils class: ServletJsonUtils.java > < > https://github.com/apache/sling-org-apache-sling-distribution-core/blob/master/src/main/java/org/apache/sling/distribution/servlet/ServletJsonUtils.java > >. > This means more code to maintain and higher complexity if we want to change > the format of the JSON responses. > > *Are we already using any JSON serialization library out there?* Was this > done on purpose to reduce dependencies? > > >- *JSON response data types* > > Every JSON response in the API is built on-demand in the servlet layer > < > https://github.com/apache/sling-org-apache-sling-distribution-core/blob/master/src/main/java/org/apache/sling/distribution/servlet/DistributionPackageImporterServlet.java#L119 > >. > This is contributing to increased complexity in these endpoints and makes > it hard to efficiently grasp how the API works. > This is an opinionated topic, but I tend to enjoy APIs that have > well-defined request/response objects since the behavior becomes very easy > to understand, and it increases readability in the transport layer. > > *What do you think?* Are we implementing a similar pattern elsewhere? > > > Cheers, > > José Correia > -- -- Christian Schneider http://www.liquid-reality.de Computer Scientist http://www.adobe.com
[jira] [Assigned] (SLING-11377) Onboard sling-maven-enforcer-rules to SonarCloud
[ https://issues.apache.org/jira/browse/SLING-11377?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Konrad Windszus reassigned SLING-11377: --- Assignee: Konrad Windszus > Onboard sling-maven-enforcer-rules to SonarCloud > > > Key: SLING-11377 > URL: https://issues.apache.org/jira/browse/SLING-11377 > Project: Sling > Issue Type: Task > Components: Build and Source Control >Reporter: Konrad Windszus >Assignee: Konrad Windszus >Priority: Major > > Currently the SonarQube step fails with > {code} > [ERROR] Failed to execute goal > org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.1.2184:sonar > (default-cli) on project maven-enforcer-rules: Project not found. Please > check the 'sonar.projectKey' and 'sonar.organization' properties, the > 'SONAR_TOKEN' environment variable, or contact the project administrator -> > [Help 1] > [ERROR] > [ERROR] To see the full stack trace of the errors, re-run Maven with the -e > switch. > [ERROR] Re-run Maven using the -X switch to enable full debug logging. > [ERROR] > [ERROR] For more information about the errors and possible solutions, please > read the following articles: > [ERROR] [Help 1] > http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException > {code} -- This message was sent by Atlassian Jira (v8.20.7#820007)
[jira] [Commented] (SLING-11377) Onboard sling-maven-enforcer-rules to SonarCloud
[ https://issues.apache.org/jira/browse/SLING-11377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17545804#comment-17545804 ] Konrad Windszus commented on SLING-11377: - [~bellingard] - can you please help onboard https://github.com/apache/sling-maven-enforcer-rules ? > Onboard sling-maven-enforcer-rules to SonarCloud > > > Key: SLING-11377 > URL: https://issues.apache.org/jira/browse/SLING-11377 > Project: Sling > Issue Type: Task > Components: Build and Source Control >Reporter: Konrad Windszus >Priority: Major > > Currently the SonarQube step fails with > {code} > [ERROR] Failed to execute goal > org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.1.2184:sonar > (default-cli) on project maven-enforcer-rules: Project not found. Please > check the 'sonar.projectKey' and 'sonar.organization' properties, the > 'SONAR_TOKEN' environment variable, or contact the project administrator -> > [Help 1] > [ERROR] > [ERROR] To see the full stack trace of the errors, re-run Maven with the -e > switch. > [ERROR] Re-run Maven using the -X switch to enable full debug logging. > [ERROR] > [ERROR] For more information about the errors and possible solutions, please > read the following articles: > [ERROR] [Help 1] > http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException > {code} -- This message was sent by Atlassian Jira (v8.20.7#820007)
[jira] [Created] (SLING-11377) Onboard sling-maven-enforcer-rules to SonarCloud
Konrad Windszus created SLING-11377: --- Summary: Onboard sling-maven-enforcer-rules to SonarCloud Key: SLING-11377 URL: https://issues.apache.org/jira/browse/SLING-11377 Project: Sling Issue Type: Task Components: Build and Source Control Reporter: Konrad Windszus Currently the SonarQube step fails with {code} [ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.1.2184:sonar (default-cli) on project maven-enforcer-rules: Project not found. Please check the 'sonar.projectKey' and 'sonar.organization' properties, the 'SONAR_TOKEN' environment variable, or contact the project administrator -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException {code} -- This message was sent by Atlassian Jira (v8.20.7#820007)
[GitHub] [sling-tooling-jenkins] kwin opened a new pull request, #7: SLING-11376 Use proper GAV for sonar-maven-plugin
kwin opened a new pull request, #7: URL: https://github.com/apache/sling-tooling-jenkins/pull/7 Use fixed version to make builds reproducable -- 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-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Created] (SLING-11376) Jenkins Library: Relocate sonar-m-p to SonarSource group id
Konrad Windszus created SLING-11376: --- Summary: Jenkins Library: Relocate sonar-m-p to SonarSource group id Key: SLING-11376 URL: https://issues.apache.org/jira/browse/SLING-11376 Project: Sling Issue Type: Improvement Components: Tooling Reporter: Konrad Windszus Assignee: Konrad Windszus Currently the Jenkins Job says: {code} [WARNING] The artifact org.codehaus.mojo:sonar-maven-plugin:jar:3.9.1.2184 has been relocated to org.sonarsource.scanner.maven:sonar-maven-plugin:jar:3.9.1.2184: SonarQube plugin was moved to SonarSource organisation {code} We should reference the plugin with full GAV in the Jenkins library. -- This message was sent by Atlassian Jira (v8.20.7#820007)
[jira] [Updated] (SLING-11376) Jenkins Library: Relocate sonar-m-p to SonarSource group id
[ https://issues.apache.org/jira/browse/SLING-11376?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Konrad Windszus updated SLING-11376: Description: Currently the Jenkins Job says: {code} [WARNING] The artifact org.codehaus.mojo:sonar-maven-plugin:jar:3.9.1.2184 has been relocated to org.sonarsource.scanner.maven:sonar-maven-plugin:jar:3.9.1.2184: SonarQube plugin was moved to SonarSource organisation {code} (from https://ci-builds.apache.org/job/Sling/job/modules/job/sling-maven-enforcer-rules/job/master/1/console) We should reference the plugin with full GAV in the Jenkins library. was: Currently the Jenkins Job says: {code} [WARNING] The artifact org.codehaus.mojo:sonar-maven-plugin:jar:3.9.1.2184 has been relocated to org.sonarsource.scanner.maven:sonar-maven-plugin:jar:3.9.1.2184: SonarQube plugin was moved to SonarSource organisation {code} We should reference the plugin with full GAV in the Jenkins library. > Jenkins Library: Relocate sonar-m-p to SonarSource group id > --- > > Key: SLING-11376 > URL: https://issues.apache.org/jira/browse/SLING-11376 > Project: Sling > Issue Type: Improvement > Components: Tooling >Reporter: Konrad Windszus >Assignee: Konrad Windszus >Priority: Major > > Currently the Jenkins Job says: > {code} > [WARNING] The artifact org.codehaus.mojo:sonar-maven-plugin:jar:3.9.1.2184 > has been relocated to > org.sonarsource.scanner.maven:sonar-maven-plugin:jar:3.9.1.2184: SonarQube > plugin was moved to SonarSource organisation > {code} (from > https://ci-builds.apache.org/job/Sling/job/modules/job/sling-maven-enforcer-rules/job/master/1/console) > We should reference the plugin with full GAV in the Jenkins library. -- This message was sent by Atlassian Jira (v8.20.7#820007)
[jira] [Resolved] (SLING-11375) Relocate und update Cargo Maven Plugin
[ https://issues.apache.org/jira/browse/SLING-11375?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Konrad Windszus resolved SLING-11375. - Resolution: Fixed Fixed in https://github.com/apache/sling-parent/commit/1632d1d2698ff45c57ef79c6cdb6ae76a8c941c3 > Relocate und update Cargo Maven Plugin > -- > > Key: SLING-11375 > URL: https://issues.apache.org/jira/browse/SLING-11375 > Project: Sling > Issue Type: Improvement > Components: General >Reporter: Konrad Windszus >Assignee: Konrad Windszus >Priority: Major > Fix For: Parent 48 > > > https://codehaus-cargo.github.io/cargo/Maven+3+Plugin.html > bq. Please be aware that the Maven 2 / Maven 3 plugin of Codehaus Cargo has > been retired with our version 1.9.0 and has been superseded by a Maven 3 only > plugin. -- This message was sent by Atlassian Jira (v8.20.7#820007)
[GitHub] [sling-org-apache-sling-distribution-core] jose-correia commented on a diff in pull request #59: SLING-11366: Provide more exception error context on the JSON API responses
jose-correia commented on code in PR #59: URL: https://github.com/apache/sling-org-apache-sling-distribution-core/pull/59#discussion_r888746447 ## src/main/java/org/apache/sling/distribution/servlet/DistributionAgentServlet.java: ## @@ -71,7 +73,7 @@ protected void doPost(SlingHttpServletRequest request, SlingHttpServletResponse log.debug("distribution response : {}", distributionResponse); } catch (Throwable e) { log.error("an unexpected error has occurred", e); -ServletJsonUtils.writeJson(response, 503, "an unexpected error has occurred", null); +ServletJsonUtils.writeJson(response, 503, e.getMessage(), null); Review Comment: I decided to implement an initial approach to a more structured way of having well-defined external error codes and improve how we propagate the exception metadata. What do you think? [https://github.com/apache/sling-org-apache-sling-distribution-core/pull/60](https://github.com/apache/sling-org-apache-sling-distribution-core/pull/60) -- 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-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Created] (SLING-11375) Relocate und update Cargo Maven Plugin
Konrad Windszus created SLING-11375: --- Summary: Relocate und update Cargo Maven Plugin Key: SLING-11375 URL: https://issues.apache.org/jira/browse/SLING-11375 Project: Sling Issue Type: Improvement Components: General Reporter: Konrad Windszus Assignee: Konrad Windszus Fix For: Parent 48 https://codehaus-cargo.github.io/cargo/Maven+3+Plugin.html bq. Please be aware that the Maven 2 / Maven 3 plugin of Codehaus Cargo has been retired with our version 1.9.0 and has been superseded by a Maven 3 only plugin. -- This message was sent by Atlassian Jira (v8.20.7#820007)
[jira] [Updated] (SLING-11374) Sightly:: Improve exception details :: Operands are not of the same type: error
[ https://issues.apache.org/jira/browse/SLING-11374?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] PuzanovsP updated SLING-11374: -- Description: When exception occurs: org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: Operands are not of the same type: the equality operator can only be applied to String, Number and Boolean types. Trace: Caused by: org.apache.sling.scripting.sightly.compiler.SightlyCompilerException: Operands are not of the same type: the equality operator can only be applied to String, Number and Boolean types. at org.apache.sling.scripting.sightly.compiler.expression.nodes.BinaryOperator.strictEq(BinaryOperator.java:247) [org.apache.sling.scripting.sightly.compiler:1.0.22.1_4_0] at org.apache.sling.scripting.sightly.apps.frontdoor.components.content.twoResponsiveColumns.twoResponsiveColumns_html.render(twoResponsiveColumns_html.java:63) Please improve the log and tell us actually which property mismatched and which type it had. --- When we try to compare Long with Number would be great if it worked actually and not failed with this error. Thanks a lot! was: When exception occurs: org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: Operands are not of the same type: the equality operator can only be applied to String, Number and Boolean types. Please improve the log and tell us actually which property mismatched and which type it had. --- When we try to compare Long with Number would be great if it worked actually and not failed with this error. Thanks a lot! > Sightly:: Improve exception details :: Operands are not of the same type: > error > --- > > Key: SLING-11374 > URL: https://issues.apache.org/jira/browse/SLING-11374 > Project: Sling > Issue Type: Bug > Components: HTL >Reporter: PuzanovsP >Priority: Minor > > When exception occurs: > org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: Operands > are not of the same type: the equality operator can only be applied to > String, Number and Boolean types. > > Trace: > Caused by: > org.apache.sling.scripting.sightly.compiler.SightlyCompilerException: > Operands are not of the same type: the equality operator can only be applied > to String, Number and Boolean types. at > org.apache.sling.scripting.sightly.compiler.expression.nodes.BinaryOperator.strictEq(BinaryOperator.java:247) > [org.apache.sling.scripting.sightly.compiler:1.0.22.1_4_0] at > org.apache.sling.scripting.sightly.apps.frontdoor.components.content.twoResponsiveColumns.twoResponsiveColumns_html.render(twoResponsiveColumns_html.java:63) > > Please improve the log and tell us actually which property mismatched and > which type it had. > --- > When we try to compare Long with Number would be great if it worked actually > and not failed with this error. > Thanks a lot! -- This message was sent by Atlassian Jira (v8.20.7#820007)
[jira] [Created] (SLING-11374) Sightly:: Improve exception details :: Operands are not of the same type: error
PuzanovsP created SLING-11374: - Summary: Sightly:: Improve exception details :: Operands are not of the same type: error Key: SLING-11374 URL: https://issues.apache.org/jira/browse/SLING-11374 Project: Sling Issue Type: Bug Components: HTL Reporter: PuzanovsP When exception occurs: org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: Operands are not of the same type: the equality operator can only be applied to String, Number and Boolean types. Please improve the log and tell us actually which property mismatched and which type it had. --- When we try to compare Long with Number would be great if it worked actually and not failed with this error. Thanks a lot! -- This message was sent by Atlassian Jira (v8.20.7#820007)
[GitHub] [sling-org-apache-sling-distribution-core] jose-correia opened a new pull request, #60: Implement external error codes for easier exception data propagation and tracing
jose-correia opened a new pull request, #60: URL: https://github.com/apache/sling-org-apache-sling-distribution-core/pull/60 This PR adds support for static ERROR_CODES that can be configured in a single place, and allow for: 1. Easier propagation of exception expected outcomes, since the expected description, distributed-tracing error code, and HTTP status come very easily when each exception is thrown, avoiding extensive try/catch scenarios. 2. A single place of change for API error descriptions. 3. This can be extended to add links to external documentation, once the error codes are added there. ### Implementation Each error code is defined in the `ErrorCodes` enum, and contains: - A unique `code`, which needs to be unique for all the errors; - A external-facing `description`; - An expected `HTTP status code` ### Initial Errors ```java UNKNOWN_ERROR("unknown", "An unexpected error has occurred.", 500) DISTRIBUTION_PACKAGE_SIZE_LIMIT_EXCEEDED("package_limit_exceeded", "Package has exceeded the limit bytes size.", 400); ``` ### Notes - This will maintain backward compatibility since we still support the exception without error code - Exception can start implementing error codes simply by extending the `DocumentedException` class -- 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-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [sling-org-apache-sling-testing-clients] sonarcloud[bot] commented on pull request #35: SLING-11364 more precise exceptions
sonarcloud[bot] commented on PR #35: URL: https://github.com/apache/sling-org-apache-sling-testing-clients/pull/35#issuecomment-1145691171 SonarCloud Quality Gate failed. [![Quality Gate failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')](https://sonarcloud.io/dashboard?id=apache_sling-org-apache-sling-testing-clients&pullRequest=35) [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=35&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=35&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=35&resolved=false&types=BUG) [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=35&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=35&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=35&resolved=false&types=VULNERABILITY) [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-clients&pullRequest=35&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-clients&pullRequest=35&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-clients&pullRequest=35&resolved=false&types=SECURITY_HOTSPOT) [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=35&resolved=false&types=CODE_SMELL) [![B](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/B-16px.png 'B')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=35&resolved=false&types=CODE_SMELL) [23 Code Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-clients&pullRequest=35&resolved=false&types=CODE_SMELL) [![13.9%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/0-16px.png '13.9%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-clients&pullRequest=35&metric=new_coverage&view=list) [13.9% Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-clients&pullRequest=35&metric=new_coverage&view=list) [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-clients&pullRequest=35&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-clients&pullRequest=35&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-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Updated] (SLING-11373) The MergingServletResourceProvider does not wrap resources correctly
[ https://issues.apache.org/jira/browse/SLING-11373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Radu Cotescu updated SLING-11373: - Summary: The MergingServletResourceProvider does not wrap resources correctly (was: The MergingServletResourceProvider does not correctly wrap resources) > The MergingServletResourceProvider does not wrap resources correctly > > > Key: SLING-11373 > URL: https://issues.apache.org/jira/browse/SLING-11373 > Project: Sling > Issue Type: Bug > Components: Servlets >Affects Versions: Servlets Resolver 2.7.0 >Reporter: Radu Cotescu >Assignee: Karl Pauls >Priority: Major > Fix For: Servlets Resolver 2.9.8 > > > The {{MergingServletResourceProvider}} does not wrap resources correctly, > forcing script engines that need to solve dependencies via this provider to > call {{ResourceResolver#resolve(String)}}. Unfortunately, there is a case > when the call to {{resolve}} fails: > {noformat} > /apps/components/a/ > a.html > helper.something.html > helper/ [backed by JCR] > partial.html > /apps/components/b [sling:resourceSuperType=components/a] > b.html -> tries to resolve helper.something.html > {noformat} > In the case above, {{b.html}} will get the {{helper}} folder when trying to > resolve {{helper.something.html}}. > If the {{MergingServletResourceProvider}} would correctly wrap resources (and > decorate them accordingly), the script engines could switch to using > {{ResourceResolver#getResource(String)}}, which would not exhibit the same > behaviour. > -- This message was sent by Atlassian Jira (v8.20.7#820007)
[jira] [Updated] (SLING-11373) The MergingServletResourceProvider does not correctly wrap resources
[ https://issues.apache.org/jira/browse/SLING-11373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Radu Cotescu updated SLING-11373: - Description: The {{MergingServletResourceProvider}} does not wrap resources correctly, forcing script engines that need to solve dependencies via this provider to call {{ResourceResolver#resolve(String)}}. Unfortunately, there is a case when the call to {{resolve}} fails: {noformat} /apps/components/a/ a.html helper.something.html helper/ [backed by JCR] partial.html /apps/components/b [sling:resourceSuperType=components/a] b.html -> tries to resolve helper.something.html {noformat} In the case above, {{b.html}} will get the {{helper}} folder when trying to resolve {{helper.something.html}}. If the {{MergingServletResourceProvider}} would correctly wrap resources (and decorate them accordingly), the script engines could switch to using {{ResourceResolver#getResource(String)}}, which would not exhibit the same behaviour. was: The {{MergingServletResourceProvider}} does not wrap resources correctly, forcing script engines that need to solve dependencies via this provider to call {{ResourceResolver#resolve(String)}}. Unfortunately, there is a case when the call to {{resolve}} fails: {noformat} /apps/components/a/ a.html helper.something.html helper/ [backed by JCR] partial.html /apps/components/b [sling:resourceSuperType=components/a] b.html -> tries to resolve helper.something.html {noformat} In the case above, {{b.html}} will get the {{helper}} folder when trying to resolve {{helper.something.html}}. > The MergingServletResourceProvider does not correctly wrap resources > > > Key: SLING-11373 > URL: https://issues.apache.org/jira/browse/SLING-11373 > Project: Sling > Issue Type: Bug > Components: Servlets >Affects Versions: Servlets Resolver 2.7.0 >Reporter: Radu Cotescu >Assignee: Karl Pauls >Priority: Major > Fix For: Servlets Resolver 2.9.8 > > > The {{MergingServletResourceProvider}} does not wrap resources correctly, > forcing script engines that need to solve dependencies via this provider to > call {{ResourceResolver#resolve(String)}}. Unfortunately, there is a case > when the call to {{resolve}} fails: > {noformat} > /apps/components/a/ > a.html > helper.something.html > helper/ [backed by JCR] > partial.html > /apps/components/b [sling:resourceSuperType=components/a] > b.html -> tries to resolve helper.something.html > {noformat} > In the case above, {{b.html}} will get the {{helper}} folder when trying to > resolve {{helper.something.html}}. > If the {{MergingServletResourceProvider}} would correctly wrap resources (and > decorate them accordingly), the script engines could switch to using > {{ResourceResolver#getResource(String)}}, which would not exhibit the same > behaviour. > -- This message was sent by Atlassian Jira (v8.20.7#820007)
[jira] [Created] (SLING-11373) The MergingServletResourceProvider does not correctly wrap resources
Radu Cotescu created SLING-11373: Summary: The MergingServletResourceProvider does not correctly wrap resources Key: SLING-11373 URL: https://issues.apache.org/jira/browse/SLING-11373 Project: Sling Issue Type: Bug Components: Servlets Affects Versions: Servlets Resolver 2.7.0 Reporter: Radu Cotescu Assignee: Karl Pauls Fix For: Servlets Resolver 2.9.8 The {{MergingServletResourceProvider}} does not wrap resources correctly, forcing script engines that need to solve dependencies via this provider to call {{ResourceResolver#resolve(String)}}. Unfortunately, there is a case when the call to {{resolve}} fails: {noformat} /apps/components/a/ a.html helper.something.html helper/ [backed by JCR] partial.html /apps/components/b [sling:resourceSuperType=components/a] b.html -> tries to resolve helper.something.html {noformat} In the case above, {{b.html}} will get the {{helper}} folder when trying to resolve {{helper.something.html}}. -- This message was sent by Atlassian Jira (v8.20.7#820007)