spark-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sean Owen <>
Subject Re: Adding JIRA ID as the prefix for the test case name
Date Tue, 12 Nov 2019 23:14:33 GMT
Let's suggest "SPARK-12345:" but not go back and change a bunch of test cases.
I'd add this only when a test specifically targets a certain issue.
It's a nice-to-have, not super essential, just because in the rare
case you need to understand why a test asserts something, you can go
back and find what added it in the git history without much trouble.

On Mon, Nov 11, 2019 at 10:46 AM Hyukjin Kwon <> wrote:
> Hi all,
> Maybe it's not a big deal but it brought some confusions time to time into Spark dev
and community. I think it's time to discuss about when/which format to add a JIRA ID as a
prefix for the test case name in Scala test cases.
> Currently we have many test case names with prefixes as below:
> test("SPARK-XXXXX blah blah")
> test("SPARK-XXXXX: blah blah")
> test("SPARK-XXXXX - blah blah")
> test("[SPARK-XXXXX] blah blah")
> …
> It is a good practice to have the JIRA ID in general because, for instance,
> it makes us put less efforts to track commit histories (or even when the files
> are totally moved), or to track related information of tests failed.
> Considering Spark's getting big, I think it's good to document.
> I would like to suggest this and document it in our guideline:
> 1. Add a prefix into a test name when a PR adds a couple of tests.
> 2. Uses "SPARK-XXXX: test name" format which is used in our code base most
>       often[1].
> We should make it simple and clear but closer to the actual practice. So, I would like
to listen to what other people think. I would appreciate if you guys give some feedback about
when to add the JIRA prefix. One alternative is that, we only add the prefix when the JIRA's
type is bug.
> [1]
> git grep -E 'test\("\SPARK-([0-9]+):' | wc -l
>      923
> git grep -E 'test\("\SPARK-([0-9]+) ' | wc -l
>      477
> git grep -E 'test\("\[SPARK-([0-9]+)\]' | wc -l
>       16
> git grep -E 'test\("\SPARK-([0-9]+) -' | wc -l
>       13

To unsubscribe e-mail:

View raw message