Skip to content

[SPARK-3479] [Build] Report failed test category - #2606

Closed
nchammas wants to merge 1 commit into
apache:masterfrom
nchammas:report-failed-test-category
Closed

[SPARK-3479] [Build] Report failed test category#2606
nchammas wants to merge 1 commit into
apache:masterfrom
nchammas:report-failed-test-category

Conversation

@nchammas

Copy link
Copy Markdown
Contributor

This PR allows SparkQA (i.e. Jenkins) to report in its posts to GitHub what category of test failed, if one can be determined.

The failure categories are:

  • general failure
  • RAT checks failed
  • Scala style checks failed
  • Python style checks failed
  • Build failed
  • Spark unit tests failed
  • PySpark unit tests failed
  • MiMa checks failed

This PR also fixes the diffing logic used to determine if a patch introduces new classes.

@nchammas

Copy link
Copy Markdown
ContributorAuthor

I'm gonna post several test commits here to try out the various failure modes and confirm that they are reported correctly.

@nchammas
nchammasforce-pushed the report-failed-test-category branch from 0f6dcd3 to cc243c9CompareSeptember 30, 2014 22:41
@SparkQA

Copy link
Copy Markdown

QA tests have started for PR 2606 at commit 935f8c0.

  • This patch merges cleanly.

@SparkQA

Copy link
Copy Markdown

QA tests have finished for PR 2606 at commit 935f8c0.

  • This patch fails some tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@AmplabJenkins

Copy link
Copy Markdown

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/21072/

@AmplabJenkins

Copy link
Copy Markdown

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/21070/

@AmplabJenkins

Copy link
Copy Markdown

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/21080/

@nchammas

Copy link
Copy Markdown
ContributorAuthor

Jenkins failed to checkout the patch.

Jenkins, retest this please.

@nchammas

Copy link
Copy Markdown
ContributorAuthor

Jenkins, retest this please.

@AmplabJenkins

Copy link
Copy Markdown

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/21081/

@nchammas

Copy link
Copy Markdown
ContributorAuthor

Jenkins, retest this please.

@SparkQA

Copy link
Copy Markdown

QA tests have started for PR 2606 at commit d5624ac.

  • This patch merges cleanly.

@SparkQA

Copy link
Copy Markdown

QA tests have finished for PR 2606 at commit d5624ac.

  • This patch fails Python style tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • class PStatsParam(AccumulatorParam):

@AmplabJenkins

Copy link
Copy Markdown

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/21083/

@AmplabJenkins

Copy link
Copy Markdown

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/21084/

@nchammas

Copy link
Copy Markdown
ContributorAuthor

Grr, Jenkins flakiness checking out stuff from git...

Oi Jenkins! Retest this please.

@nchammas

Copy link
Copy Markdown
ContributorAuthor

Jenkins, retest this please.

@SparkQA

Copy link
Copy Markdown

QA tests have started for PR 2606 at commit 4f5f338.

  • This patch merges cleanly.

@SparkQA

Copy link
Copy Markdown

QA tests have finished for PR 2606 at commit 4f5f338.

  • This patch fails RAT tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • class PStatsParam(AccumulatorParam):

@AmplabJenkins

Copy link
Copy Markdown

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/21085/

@SparkQA

Copy link
Copy Markdown

QA tests have started for PR 2606 at commit 7289777.

  • This patch merges cleanly.

@SparkQA

Copy link
Copy Markdown

QA tests have started for PR 2606 at commit 833e064.

  • This patch merges cleanly.

@SparkQA

Copy link
Copy Markdown

QA tests have finished for PR 2606 at commit 7289777.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@AmplabJenkins

Copy link
Copy Markdown

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/21086/

@SparkQA

Copy link
Copy Markdown

QA tests have finished for PR 2606 at commit 833e064.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@AmplabJenkins

Copy link
Copy Markdown

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/21087/

@SparkQA

Copy link
Copy Markdown

QA tests have started for PR 2606 at commit 1fea6ce.

  • This patch merges cleanly.

@SparkQA

Copy link
Copy Markdown

QA tests have finished for PR 2606 at commit 1fea6ce.

  • This patch fails to build.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • abstract class RDDD[T: ClassTag](

@AmplabJenkins

Copy link
Copy Markdown

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/21116/

@SparkQA

Copy link
Copy Markdown

QA tests have started for PR 2606 at commit 28ffbab.

  • This patch merges cleanly.

@SparkQA

Copy link
Copy Markdown

QA tests have finished for PR 2606 at commit f137249.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • class Dummy()

@AmplabJenkins

Copy link
Copy Markdown

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/21143/

@nchammas

Copy link
Copy Markdown
ContributorAuthor

Hmm, I expected a failure in the PySpark doctests, not here.

@nchammas

Copy link
Copy Markdown
ContributorAuthor

Jenkins, retest this please.

@AmplabJenkins

Copy link
Copy Markdown

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/21147/

@nchammas

Copy link
Copy Markdown
ContributorAuthor

Another checkout timeout.

@nchammas

Copy link
Copy Markdown
ContributorAuthor

Jenkins, retest this please.

@SparkQA

Copy link
Copy Markdown

QA tests have started for PR 2606 at commit f137249.

  • This patch merges cleanly.

@SparkQA

Copy link
Copy Markdown

QA tests have finished for PR 2606 at commit f137249.

  • This patch fails PySpark unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • class Dummy()

@AmplabJenkins

Copy link
Copy Markdown

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/21152/

@nchammas
nchammasforce-pushed the report-failed-test-category branch from f137249 to d67df03CompareOctober 1, 2014 20:48
@SparkQA

Copy link
Copy Markdown

QA tests have started for PR 2606 at commit d67df03.

  • This patch merges cleanly.

@SparkQA

Copy link
Copy Markdown

QA tests have finished for PR 2606 at commit d67df03.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@AmplabJenkins

Copy link
Copy Markdown

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/21154/

@nchammas

Copy link
Copy Markdown
ContributorAuthor

cc @pwendell This PR is ready for review.

Here are examples of the messages posted when:

@nchammasnchammas changed the title [SPARK-3479] [Build] [WIP] Report failed test category[SPARK-3479] [Build] Report failed test categoryOct 2, 2014
Comment threaddev/run-tests-jenkins

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can do a valid diff regardless of the merge-ability of the patch, so I moved this out of the if block.

@JoshRosen

Copy link
Copy Markdown
Contributor

This looks great! Thanks for adding the extra comments to explain the $sha and $ghprbActualCommit variables, since they can be kind of confusing.

@nchammas

Copy link
Copy Markdown
ContributorAuthor

@pwendell@JoshRosen Is this PR ready to be merged in?

@JoshRosen

Copy link
Copy Markdown
Contributor

Sure, this looks fine to me so I'm going to merge it now. Thanks!

@asfgitasfgit closed this in 69c3f44Oct 6, 2014
@nchammas
nchammas deleted the report-failed-test-category branch October 8, 2014 01:05
nchammas added a commit that referenced this pull request Aug 21, 2026
…h modern GitHub Actions grouping
### What changes were proposed in this pull request?
Remove the old `CURRENT_BLOCK` and `ERROR_CODES` testing infrastructure and replace it with an updated `titled_block` context manager that also groups log output on GitHub Actions. Move section titles from the various helper functions into titled blocks in `main()`. Exit codes are no longer driven by the old blocks. If the tests fail, the script exits with a non-zero code, usually `1`.
Make sure that titled blocks cannot be nested, and that all large blocks of output have a suitable title block at the top level `main()` function. That means I moved the following checks and calls up to `main()`:
- `run_java_style_checks`
- `build_spark_unidoc_sbt`
- `SKIP_PACKAGING` flag check
- `SKIP_UNIDOC` flag check
Fold `group_in_github_actions` into the new `titled_block`.
Remove `build_spark_documentation`, which is not used by anything.
### Why are the changes needed?
Amusingly, I added this testing infrastructure 12 years ago in #2606 (later refactored into Python in #5694). It was built for Jenkins, which we do not use anymore. The block and error codes are not used by any part of our current test infrastructure on GitHub Actions.
The new `titled_block` context manager takes care of printing block titles as before, and also subsumes the log grouping behavior from `group_in_github_actions` (introduced in #54524) since it is useful for more than just sbt.
We have a [separate job for building the docs][docs], so I assume we don't want to revive the currently-dead `build_spark_documentation`.
[docs]: https://github.com/apache/spark/blob/2e83cd8444d787203ed2e594f78a1c54bfcaff42/.github/workflows/build_and_test.yml#L1218-L1240
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
CI for this PR. Some illustrative screenshots of the new log groups:
<img width="375" src="https://github.com/user-attachments/assets/80da8dff-15a5-4569-b224-580d7bf029de" />
<img width="286" src="https://github.com/user-attachments/assets/32469a0c-77bf-44f9-ac16-c3a12662fcc7" />
The purple debug lines are from my fork and are not related to this PR.
### Was this patch authored or co-authored using generative AI tooling?
I wrote this with assistance from GitHub Copilot.
Closes#57770 from nchammas/run-tests-titled-block.
Authored-by: Nicholas Chammas <nicholas.chammas@gmail.com>
Signed-off-by: Nicholas Chammas <nicholas.chammas@gmail.com>
nchammas added a commit that referenced this pull request Aug 21, 2026
…h modern GitHub Actions grouping
### What changes were proposed in this pull request?
Remove the old `CURRENT_BLOCK` and `ERROR_CODES` testing infrastructure and replace it with an updated `titled_block` context manager that also groups log output on GitHub Actions. Move section titles from the various helper functions into titled blocks in `main()`. Exit codes are no longer driven by the old blocks. If the tests fail, the script exits with a non-zero code, usually `1`.
Make sure that titled blocks cannot be nested, and that all large blocks of output have a suitable title block at the top level `main()` function. That means I moved the following checks and calls up to `main()`:
- `run_java_style_checks`
- `build_spark_unidoc_sbt`
- `SKIP_PACKAGING` flag check
- `SKIP_UNIDOC` flag check
Fold `group_in_github_actions` into the new `titled_block`.
Remove `build_spark_documentation`, which is not used by anything.
### Why are the changes needed?
Amusingly, I added this testing infrastructure 12 years ago in #2606 (later refactored into Python in #5694). It was built for Jenkins, which we do not use anymore. The block and error codes are not used by any part of our current test infrastructure on GitHub Actions.
The new `titled_block` context manager takes care of printing block titles as before, and also subsumes the log grouping behavior from `group_in_github_actions` (introduced in #54524) since it is useful for more than just sbt.
We have a [separate job for building the docs][docs], so I assume we don't want to revive the currently-dead `build_spark_documentation`.
[docs]: https://github.com/apache/spark/blob/2e83cd8444d787203ed2e594f78a1c54bfcaff42/.github/workflows/build_and_test.yml#L1218-L1240
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
CI for this PR. Some illustrative screenshots of the new log groups:
<img width="375" src="https://github.com/user-attachments/assets/80da8dff-15a5-4569-b224-580d7bf029de" />
<img width="286" src="https://github.com/user-attachments/assets/32469a0c-77bf-44f9-ac16-c3a12662fcc7" />
The purple debug lines are from my fork and are not related to this PR.
### Was this patch authored or co-authored using generative AI tooling?
I wrote this with assistance from GitHub Copilot.
Closes#57770 from nchammas/run-tests-titled-block.
Authored-by: Nicholas Chammas <nicholas.chammas@gmail.com>
Signed-off-by: Nicholas Chammas <nicholas.chammas@gmail.com>
(cherry picked from commit cef67d7)
Signed-off-by: Nicholas Chammas <nicholas.chammas@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@nchammas@SparkQA@AmplabJenkins@JoshRosen