You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by GitBox <gi...@apache.org> on 2022/08/31 20:04:18 UTC

[GitHub] [solr] madrob opened a new pull request, #992: Allow skipping failure for RAT and Source Patterns

madrob opened a new pull request, #992:
URL: https://github.com/apache/solr/pull/992

   I'd like to be able to still run these checks and report on them, but also be able to prevent them from failing the build. Useful in CI environment where I will have the output and also want to make sure other checks get run instead of failing fast here.


-- 
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: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] dweiss commented on a diff in pull request #992: Allow skipping failure for RAT and Source Patterns

Posted by GitBox <gi...@apache.org>.
dweiss commented on code in PR #992:
URL: https://github.com/apache/solr/pull/992#discussion_r960013840


##########
gradle/validation/rat-sources.gradle:
##########
@@ -274,8 +274,16 @@ class RatTask extends DefaultTask {
             }
         }
         if (errors) {
-            throw new GradleException("Found " + errors.size() + " file(s) with errors:\n" +
-                    errors.collect{ msg -> "  - ${msg}" }.join("\n"))
+            def checkProp = "validation.rat.failOnError"
+            def shouldFail = Boolean.valueOf(project.propertyOrDefault(checkProp, true))
+            def message = "Found " + errors.size() + " file(s) with errors: " +
+                    (shouldFail ? "(skip with -P${checkProp}=false)\n" : "\n") +
+                    errors.collect{ msg -> "  - ${msg}" }.join("\n")
+            if (shouldFail) {
+                throw new GradleException(message)
+            } else {
+                logger.lifecycle("NOTE: ${message}")

Review Comment:
   there's a logger.warning (or warn?) method you could use here instead. otherwise lgtm.



-- 
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: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] uschindler commented on pull request #992: Allow skipping failure for RAT and Source Patterns

Posted by GitBox <gi...@apache.org>.
uschindler commented on PR #992:
URL: https://github.com/apache/solr/pull/992#issuecomment-1234374062

   Info: "When executed with --continue, Gradle will execute every task to be executed where all of the dependencies for that task completed without failure, instead of stopping as soon as the first failure is encountered. Each of the encountered failures will be reported at the end of the build.
   
   If a task fails, any subsequent tasks that were depending on it will not be executed. For example, tests will not run if there is a compilation failure in the code under test; because the test task will depend on the compilation task (either directly or indirectly)."


-- 
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: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] madrob merged pull request #992: Allow skipping failure for RAT and Source Patterns

Posted by GitBox <gi...@apache.org>.
madrob merged PR #992:
URL: https://github.com/apache/solr/pull/992


-- 
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: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] uschindler commented on pull request #992: Allow skipping failure for RAT and Source Patterns

Posted by GitBox <gi...@apache.org>.
uschindler commented on PR #992:
URL: https://github.com/apache/solr/pull/992#issuecomment-1234372271

   Hi,
   I am fine with that, but actually in an CI environment this is not needed. On Jenkins all jobs start with `gradlew --continue`, so the GradleException when thrown during task execution is converted to a warning.
   So to me this seems useless as CI already works well, but it was merged already,


-- 
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: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] uschindler commented on pull request #992: Allow skipping failure for RAT and Source Patterns

Posted by GitBox <gi...@apache.org>.
uschindler commented on PR #992:
URL: https://github.com/apache/solr/pull/992#issuecomment-1234375287

   But as check tasks are last in execution (only "check" depends on it), this is fine).


-- 
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: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org