[ 
https://issues.apache.org/jira/browse/CASSANDRA-17939?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17614138#comment-17614138
 ] 

Andres de la Peña edited comment on CASSANDRA-17939 at 10/8/22 9:57 AM:
------------------------------------------------------------------------

I have updated the PR adding support for specifying multiple Python dtests, 
which are specified in the env var {{REPEATED_DTESTS}} as a comma-separated 
list:
{code:java}
  -e 
REPEATED_DTESTS=cfid_test.py,pending_range_test.py::TestPendingRangeMovements::test_pending_range,cdc_test.py
{code}
I have also rearranged the optional steps so the pre-commit workflows is as 
simple as possible. As for the separate workflows, I have added approval steps 
so the multiplexer jobs can be started individually. With those changes the new 
jobs can mostly replace the old multiplexer, which was only able to run a type 
of test at a time.

The old dtest multiplexer has been divided into two companion jobs, so we can 
start runs with and without vnodes into the same push. The old utest 
multiplexer job is renamed from "repeated_utest" to "repeated_ant_test", 
because its only purpose is running ant targets that are not covered by other 
tests. The new name should make it easier to distinguish it from the new jobs.

I have also slightly altered the names of some job in order to standarize the 
names of the jobs.

The proposed changes in CircleCI config are relatively broad, and they require 
to pass different arguments to the {{generate.sh}} script. However, I think 
that the new workflow contains all we need to make sure that a single push can 
contain all the test repetitions that we need. Most of the tests will be 
automatically detected by {{{}git diff{}}}, and specifying whatever other tests 
are relevant should be relatively easy:
{code:java}
.circleci/generate.sh -m \
  -e REPEATED_TESTS_COUNT=5 \
  -e 
REPEATED_UTESTS=org.apache.cassandra.cql3.DurationTest,org.apache.cassandra.cql3.validation.entities.DateTypeTest
 \
  -e 
REPEATED_JVM_DTESTS=org.apache.cassandra.distributed.test.AlterTest#getAndSetCompressionParametersTest
 \
  -e 
REPEATED_UTESTS_LONG=org.apache.cassandra.io.sstable.CQLSSTableWriterLongTest#testWideRow
 \
  -e 
REPEATED_DTESTS=cfid_test.py,pending_range_test.py::TestPendingRangeMovements::test_pending_range
{code}
||PR||CI||
|[trunk|https://github.com/apache/cassandra/pull/1899]|[j8_pre-commit|https://app.circleci.com/pipelines/github/adelapena/cassandra/2201/workflows/901e73ba-1bac-40d2-9201-3c268bfb6c6f]
 
[j8_separate|https://app.circleci.com/pipelines/github/adelapena/cassandra/2201/workflows/4197f71d-e003-485c-881a-6ca4731d080f]
 
[j11_pre-commit|https://app.circleci.com/pipelines/github/adelapena/cassandra/2201/workflows/736d8b7f-5c1f-4687-a974-6dc153eb7f01]
[j11_separate|https://app.circleci.com/pipelines/github/adelapena/cassandra/2201/workflows/9e69a83d-a11c-44b9-b623-e3263b2d8579]
 |


was (Author: adelapena):
I have updated the PR adding support for specifying multiple Python dtests, 
which are specified in the env var {{REPEATED_DTESTS}} as a comma-separated 
list:
{code:java}
  -e 
REPEATED_DTESTS=cfid_test.py,pending_range_test.py::TestPendingRangeMovements::test_pending_range,cdc_test.py
{code}
I have also rearranged the optional steps so the pre-commit workflows is as 
simple as possible. As for the separate workflows, I have added approval steps 
so the multiplexer jobs can be started individually. With those changes the new 
jobs can mostly replace the old multiplexer, which was only able to run a type 
of test at a time.

The old dtest multiplexer has been divided into two companion jobs, so we can 
start runs with and without vnodes into the same push. The old utest 
multiplexer job is renamed from "repeated_utest" to "repeated_ant_test", 
because its only purpose is running ant targets that are not covered by other 
tests. The new name should make it easier to distinguish it from the new jobs.

I have also slightly altered the names of some job in order to standarize the 
names of the jobs.

The proposed changes in CircleCI config are relatively broad, and they require 
to pass different arguments to the {{generate.sh}} script. However, I think 
that the new workflow contains all we need to make sure that a single push can 
contain all the test repetitions that we need. Most of the tests will be 
automatically detected by {{{}git diff{}}}, and specifying whatever other tests 
are relevant should be relatively easy:
{code:java}
.circleci/generate.sh -m \
  -e REPEATED_TESTS_COUNT=5 \
  -e 
REPEATED_UTESTS=org.apache.cassandra.cql3.DurationTest,org.apache.cassandra.cql3.validation.entities.DateTypeTest
 \
  -e 
REPEATED_JVM_DTESTS=org.apache.cassandra.distributed.test.AlterTest#getAndSetCompressionParametersTest
 \
  -e 
REPEATED_UTESTS_LONG=org.apache.cassandra.io.sstable.CQLSSTableWriterLongTest#testWideRow
 \
  -e 
REPEATED_DTESTS=cfid_test.py,pending_range_test.py::TestPendingRangeMovements::test_pending_range
{code}
||PR||CI||
|[trunk|https://github.com/apache/cassandra/pull/1899]|[j8_pre-commit|https://app.circleci.com/pipelines/github/adelapena/cassandra/2194/workflows/f5476f5b-0a57-4be6-a091-480e0e4eb1a2]
 
[j11_pre-commit|https://app.circleci.com/pipelines/github/adelapena/cassandra/2194/workflows/9b9efedd-cf5c-4b1c-bbef-7f2dba772642]
 
[j8_separate|https://app.circleci.com/pipelines/github/adelapena/cassandra/2193/workflows/cceb3619-78cd-4495-9a11-1819205255de]
 
[j11_separate|https://app.circleci.com/pipelines/github/adelapena/cassandra/2193/workflows/a9467538-0d5c-4538-b6d5-1d3139dd4dba]|

> CircleCI: Automatically detect and repeat new or modified JUnit tests
> ---------------------------------------------------------------------
>
>                 Key: CASSANDRA-17939
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-17939
>             Project: Cassandra
>          Issue Type: Task
>          Components: CI
>            Reporter: Andres de la Peña
>            Priority: Normal
>             Fix For: 3.0.x, 3.11.x, 4.0.x, 4.x
>
>
> The purpose of this ticket is adding a new CircleCI job that automatically 
> detects new or modified test classes and runs them repeatedly. That way we 
> wouldn't need to manually specify those tests with {{.circleci/generate.sh}}.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to