test(emr): move Hive and Spark steps to nightly checks (#8738)

* test(emr): move Hive steps to nightly checks alongside session checks
* test(emr): declare nightly Hive and Spark timeout
This commit is contained in:
Andre Kurait authored and GitHub committed 2026-11-17 16:50:18 -04:00
1 parent 79897e645a
commit 6a5a464ca8
5 files changed
+27 -30

No files matched your search

+4 -8
View File
@@ -22,16 +22,12 @@ import sys
AUGMENTATION_WEIGHT = 10 # one augmentation ~ 5.4s ~ 10 average test classes
# Classes that take far longer than the suite's average, by class name, which a package rename
# leaves alone, with the seconds they take on GitHub's runners. Each of these two is worth some
# 220 average classes, and the shard that held them both ran over 200s longer than any other
# (1246s of Surefire's 1500s, against 641s to 869s for the rest). A shard's other classes are
# packed around them; a class that stops being this slow only leaves the shards a little uneven.
# They took 651s and 402s on 2026-11-12, once their cases had grown, and weighed at 280s and 260s
# their shard ran into Surefire's 1500s while the others finished in 16 to 20 minutes.
# Classes that take far longer than the suite's average, keyed by class name so package renames
# retain their weight. The EMR runner took 651s on GitHub's runners on 2026-11-12; at its old
# 280s weight, its shard ran into Surefire's 1500s while others finished in 16 to 20 minutes.
# Hive steps now run only in nightly checks and no longer need a routine-shard weight.
SLOW_CLASSES = {
'EmrDockerRunnerDockerIntegrationTest': 650,
'EmrHiveStepsDockerIntegrationTest': 400,
}
SECONDS_PER_CLASS = 1.2 # the suite's mean: 4212s over 3451 classes on 2026-11-09
+4 -4
View File
@@ -113,19 +113,19 @@ starts SwfLambdaIntegrationTest && ecr public.ecr.aws/lambda/python:3.12
starts ElbV2LambdaTargetDataPlaneIntegrationTest && ecr public.ecr.aws/lambda/python:3.14
# EmrDockerRunnerDockerIntegrationTest runs EMR steps and EMR Serverless job runs in the emr-7.5.0 image the runner's
# default template names (EmrServerlessSparkRunner), 3.5 GB, so it is queued last, behind the Lambda runtimes;
# EmrHiveStepsDockerIntegrationTest runs a cluster's other steps in it. Of the nightly checks,
# Of the nightly checks, EmrHiveStepsNightlyIntegrationTest runs a cluster's other steps in it,
# EmrServerlessCustomImageNightlyIntegrationTest builds its custom image on it,
# EmrFlociContainerNightlyIntegrationTest runs a cluster's steps in it from Floci in a container, and
# EmrPigStepsNightlyIntegrationTest a cluster's Pig steps.
starts EmrDockerRunnerDockerIntegrationTest EmrHiveStepsDockerIntegrationTest EmrServerlessCustomImageNightlyIntegrationTest \
starts EmrDockerRunnerDockerIntegrationTest EmrHiveStepsNightlyIntegrationTest EmrServerlessCustomImageNightlyIntegrationTest \
EmrFlociContainerNightlyIntegrationTest EmrPigStepsNightlyIntegrationTest EmrNotebookExecutionNightlyIntegrationTest \
&& ecr public.ecr.aws/emr-serverless/spark/emr-7.5.0:latest
# EmrServerlessHiveDockerIntegrationTest runs EMR Serverless Hive job runs, and EmrHiveStepsDockerIntegrationTest EMR
# EmrServerlessHiveDockerIntegrationTest runs EMR Serverless Hive job runs, and EmrHiveStepsNightlyIntegrationTest EMR
# Hive steps, in the emr-7.5.0 Hive image the runner's default Hive template names, 2.7 GB; every EMR cluster runs its
# HDFS in it, EmrDockerRunnerDockerIntegrationTest's and the nightly EmrFlociContainerNightlyIntegrationTest's,
# EmrPigStepsNightlyIntegrationTest's and EmrSessionServerNightlyIntegrationTest's included (an emr-spark-* cluster's
# Hadoop comes from it too).
starts EmrServerlessHiveDockerIntegrationTest EmrHiveStepsDockerIntegrationTest EmrDockerRunnerDockerIntegrationTest \
starts EmrServerlessHiveDockerIntegrationTest EmrHiveStepsNightlyIntegrationTest EmrDockerRunnerDockerIntegrationTest \
EmrFlociContainerNightlyIntegrationTest EmrPigStepsNightlyIntegrationTest EmrSessionServerNightlyIntegrationTest \
EmrNotebookExecutionNightlyIntegrationTest \
&& ecr public.ecr.aws/emr-serverless/hive/emr-7.5.0:latest
+11 -14
View File
@@ -98,11 +98,11 @@ class PartitionTest(unittest.TestCase):
self.assertEqual([['p/EmrDockerRunnerDockerIntegrationTest'], plain], shards)
def test_a_group_holding_a_slow_class_is_placed_before_a_larger_group(self):
self.source('p/EmrHiveStepsDockerIntegrationTest', '@TestProfile(Docker.class)')
self.source('p/EmrDockerRunnerDockerIntegrationTest', '@TestProfile(Docker.class)')
for name in ('p/A', 'p/B', 'p/C', 'p/D'):
self.source(name, '@TestProfile(Zeta.class)')
shards = self.shards(['p/A', 'p/B', 'p/C', 'p/D', 'p/EmrHiveStepsDockerIntegrationTest'], 2)
self.assertEqual(['p/EmrHiveStepsDockerIntegrationTest'], shards[0])
shards = self.shards(['p/A', 'p/B', 'p/C', 'p/D', 'p/EmrDockerRunnerDockerIntegrationTest'], 2)
self.assertEqual(['p/EmrDockerRunnerDockerIntegrationTest'], shards[0])
def test_a_slow_class_without_a_profile_is_placed_before_the_others(self):
plain = ['p/A', 'p/B', 'p/C']
@@ -111,27 +111,24 @@ class PartitionTest(unittest.TestCase):
def test_a_slow_class_is_known_by_its_name_whatever_its_package(self):
plain = ['some/other/C%03d' % n for n in range(40)]
shards = self.shards(['some/where/EmrHiveStepsDockerIntegrationTest'] + plain, 2)
self.assertEqual(['some/where/EmrHiveStepsDockerIntegrationTest'], shards[0])
shards = self.shards(['some/where/EmrDockerRunnerDockerIntegrationTest'] + plain, 2)
self.assertEqual(['some/where/EmrDockerRunnerDockerIntegrationTest'], shards[0])
def test_two_slow_classes_of_one_profile_are_separate_from_each_other_and_ordinary_members(self):
def test_a_slow_class_is_separate_from_ordinary_members_of_its_profile(self):
self.source('p/EmrDockerRunnerDockerIntegrationTest', '@TestProfile(Docker.class)')
self.source('p/EmrHiveStepsDockerIntegrationTest', '@TestProfile(Docker.class)')
self.source('p/A', '@TestProfile(Docker.class)')
self.source('p/B', '@TestProfile(Docker.class)')
classes = ['p/EmrDockerRunnerDockerIntegrationTest', 'p/EmrHiveStepsDockerIntegrationTest', 'p/A', 'p/B']
shards = self.shards(classes, 3)
self.assertEqual([['p/EmrDockerRunnerDockerIntegrationTest'],
['p/EmrHiveStepsDockerIntegrationTest'], ['p/A', 'p/B']], shards)
classes = ['p/EmrDockerRunnerDockerIntegrationTest', 'p/A', 'p/B']
self.assertEqual([['p/EmrDockerRunnerDockerIntegrationTest'], ['p/A', 'p/B']],
self.shards(classes, 2))
def test_a_slow_class_that_no_longer_exists_is_named_and_changes_nothing(self):
self.classes.write_text('p/A\np/EmrHiveStepsDockerIntegrationTest\n')
self.classes.write_text('p/A\np/B\n')
result = self.invoke(2, 1)
self.assertEqual(0, result.returncode, result.stderr)
self.assertEqual('p/EmrHiveStepsDockerIntegrationTest\n', result.stdout)
self.assertEqual('p/A\n', result.stdout)
self.assertIn('::warning title=partition.sh::stale SLOW_CLASSES key: no test class named '
'EmrDockerRunnerDockerIntegrationTest', result.stderr)
self.assertNotIn('EmrHiveStepsDockerIntegrationTest', result.stderr)
def test_invalid_shard_arguments_fail_without_emitting_assignments(self):
self.classes.write_text('p/A\np/B\n')
+4 -3
View File
@@ -32,10 +32,11 @@ jobs:
# twenty minutes for the build, the image and the prefetch: EmrPigStepsNightlyIntegrationTest's 30,
# EmrFlociContainerNightlyIntegrationTest's 20 and 4 for its setup,
# EmrServerlessCustomImageNightlyIntegrationTest's 85 and 21 for its setup,
# EmrServerlessSparkConnectNightlyIntegrationTest's 30, EmrSessionServerNightlyIntegrationTest's 40, and
# EmrNotebookExecutionNightlyIntegrationTest's 40, 270 in all. A check added, or a bound raised, raises this with it,
# EmrServerlessSparkConnectNightlyIntegrationTest's 30, EmrSessionServerNightlyIntegrationTest's 40,
# EmrHiveStepsNightlyIntegrationTest's five two-minute tests, one five-minute test and six-minute setup, and
# EmrNotebookExecutionNightlyIntegrationTest's 40, 291 in all. A check added, or a bound raised, raises this with it,
# so a slow check fails with its own message rather than the job being cancelled with none.
timeout-minutes: 290
timeout-minutes: 311
# A fork's schedule would spend its owner's minutes on checks it never asked for; a draft waits until it is
# ready for review, as the CI shards do.
if: >-