Skip to content

Commit 5f3b310

Browse files
authored
Build reliablity fixes (apache#15048)
* disable parallel builds; enable batch mode to get rid of transfer progress * restore .m2 from setup-java if not found * some change to sql * add ws * fix quote * fix quote * undo querytest change * nullhandling in mvtest * init more * skip commitid plugin * add-back 1.0C to build ; remove redundant skip-s from copy-resources; add comment
1 parent fa61e65 commit 5f3b310

File tree

8 files changed

+27
-10
lines changed

8 files changed

+27
-10
lines changed

.github/workflows/standard-its.yml

+1
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ jobs:
159159
with:
160160
path: ~/.m2/repository
161161
key: maven-${{ runner.os }}-8-${{ github.sha }}
162+
restore-keys: setup-java-Linux-maven-${{ hashFiles('**/pom.xml') }}
162163

163164
- name: Maven build
164165
if: steps.maven-restore.outputs.cache-hit != 'true'

.github/workflows/unit-and-integration-tests-unified.yml

+1
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ jobs:
7272
with:
7373
path: ~/.m2/repository
7474
key: maven-${{ runner.os }}-${{ matrix.jdk }}-${{ github.sha }}
75+
restore-keys: setup-java-Linux-maven-${{ hashFiles('**/pom.xml') }}
7576

7677
- name: Cache targets
7778
id: target

extensions-contrib/materialized-view-selection/src/test/java/org/apache/druid/query/materializedview/DatasourceOptimizerTest.java

+6-1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
import org.apache.druid.client.DruidServer;
3535
import org.apache.druid.client.selector.HighestPriorityTierSelectorStrategy;
3636
import org.apache.druid.client.selector.RandomServerSelectorStrategy;
37+
import org.apache.druid.common.config.NullHandling;
3738
import org.apache.druid.curator.CuratorTestBase;
3839
import org.apache.druid.indexing.materializedview.DerivativeDataSourceMetadata;
3940
import org.apache.druid.jackson.DefaultObjectMapper;
@@ -72,6 +73,10 @@
7273

7374
public class DatasourceOptimizerTest extends CuratorTestBase
7475
{
76+
static {
77+
NullHandling.initializeForTests();
78+
}
79+
7580
@Rule
7681
public final TestDerbyConnector.DerbyConnectorRule derbyConnectorRule = new TestDerbyConnector.DerbyConnectorRule();
7782
private DerivativeDataSourceManager derivativesManager;
@@ -142,7 +147,7 @@ public void testOptimize() throws InterruptedException
142147
Set<String> metrics = Sets.newHashSet("cost");
143148
DerivativeDataSourceMetadata metadata = new DerivativeDataSourceMetadata(baseDataSource, dims, metrics);
144149
metadataStorageCoordinator.insertDataSourceMetadata(dataSource, metadata);
145-
// insert base datasource segments
150+
// insert base datasource segments
146151
List<Boolean> baseResult = Lists.transform(
147152
ImmutableList.of(
148153
"2011-04-01/2011-04-02",

extensions-contrib/materialized-view-selection/src/test/java/org/apache/druid/query/materializedview/MaterializedViewQueryQueryToolChestTest.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import com.fasterxml.jackson.databind.ObjectMapper;
2424
import com.google.common.base.Function;
2525
import com.google.common.collect.ImmutableMap;
26+
import org.apache.druid.common.config.NullHandling;
2627
import org.apache.druid.data.input.MapBasedRow;
2728
import org.apache.druid.jackson.DefaultObjectMapper;
2829
import org.apache.druid.java.util.common.DateTimes;
@@ -55,6 +56,10 @@
5556

5657
public class MaterializedViewQueryQueryToolChestTest
5758
{
59+
static {
60+
NullHandling.initializeForTests();
61+
}
62+
5863
private static final ObjectMapper JSON_MAPPER = new DefaultObjectMapper();
5964

6065
@Test
@@ -244,7 +249,5 @@ public void testGetRealQuery()
244249
));
245250

246251
Assert.assertEquals(realQuery, materializedViewQueryQueryToolChest.getRealQuery(materializedViewQuery));
247-
248252
}
249-
250253
}

extensions-contrib/materialized-view-selection/src/test/java/org/apache/druid/query/materializedview/MaterializedViewQueryTest.java

+5
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import com.google.common.collect.ImmutableMap;
2626
import com.google.common.collect.Iterables;
2727
import com.google.common.collect.Lists;
28+
import org.apache.druid.common.config.NullHandling;
2829
import org.apache.druid.java.util.common.HumanReadableBytes;
2930
import org.apache.druid.math.expr.ExprMacroTable;
3031
import org.apache.druid.query.Query;
@@ -45,6 +46,10 @@
4546

4647
public class MaterializedViewQueryTest
4748
{
49+
static {
50+
NullHandling.initializeForTests();
51+
}
52+
4853
private static final ObjectMapper JSON_MAPPER = TestHelper.makeJsonMapper();
4954
private DataSourceOptimizer optimizer;
5055

integration-tests/script/copy_resources_template.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ cp -R docker $SHARED_DIR/docker
3030

3131
pushd ../
3232
rm -rf distribution/target/apache-druid-$DRUID_VERSION-integration-test-bin
33-
mvn -Pskip-static-checks,skip-tests -T1C -Danimal.sniffer.skip=true -Dcheckstyle.skip=true -Dweb.console.skip=true -Dcyclonedx.skip=true -Denforcer.skip=true -Dforbiddenapis.skip=true -Dmaven.javadoc.skip=true -Dpmd.skip=true -Dspotbugs.skip=true install -Pintegration-test
33+
# using parallel build here may not yield significant speedups
34+
mvn -B -Pskip-static-checks,skip-tests -Dweb.console.skip=true install -Pintegration-test
3435
mv distribution/target/apache-druid-$DRUID_VERSION-integration-test-bin/bin $SHARED_DIR/docker/bin
3536
mv distribution/target/apache-druid-$DRUID_VERSION-integration-test-bin/lib $SHARED_DIR/docker/lib
3637
mv distribution/target/apache-druid-$DRUID_VERSION-integration-test-bin/extensions $SHARED_DIR/docker/extensions

it.sh

+6-6
Original file line numberDiff line numberDiff line change
@@ -232,17 +232,17 @@ case $CMD in
232232
mvn -q clean install dependency:go-offline -P dist $MAVEN_IGNORE
233233
;;
234234
"build" )
235-
mvn clean install -P dist $MAVEN_IGNORE -T1.0C $*
235+
mvn -B clean install -P dist $MAVEN_IGNORE -T1.0C $*
236236
;;
237237
"dist" )
238-
mvn install -P dist $MAVEN_IGNORE -pl :distribution
238+
mvn -B install -P dist $MAVEN_IGNORE -pl :distribution
239239
;;
240240
"tools" )
241-
mvn install -pl :druid-it-tools
241+
mvn -B install -pl :druid-it-tools
242242
;;
243243
"image" )
244244
cd $DRUID_DEV/integration-tests-ex/image
245-
mvn install -P test-image $MAVEN_IGNORE
245+
mvn -B install -P test-image $MAVEN_IGNORE
246246
;;
247247
"gen")
248248
# Generate the docker-compose.yaml files. Mostly for debugging
@@ -264,7 +264,7 @@ case $CMD in
264264
"run" )
265265
require_category
266266
reuse_override
267-
mvn $TEST_OPTIONS -P IT-$CATEGORY -pl $MAVEN_PROJECT
267+
mvn -B $TEST_OPTIONS -P IT-$CATEGORY -pl $MAVEN_PROJECT
268268
;;
269269
"test" )
270270
require_category
@@ -275,7 +275,7 @@ case $CMD in
275275
# Run the test. On failure, still shut down the cluster.
276276
# Return Maven's return code as the script's return code.
277277
set +e
278-
mvn $TEST_OPTIONS -P IT-$CATEGORY -pl $MAVEN_PROJECT
278+
mvn -B $TEST_OPTIONS -P IT-$CATEGORY -pl $MAVEN_PROJECT
279279
RESULT=$?
280280
set -e
281281
$IT_CASES_DIR/cluster.sh down $CATEGORY

pom.xml

+1
Original file line numberDiff line numberDiff line change
@@ -2106,6 +2106,7 @@
21062106
<maven.javadoc.skip>true</maven.javadoc.skip>
21072107
<pmd.skip>true</pmd.skip>
21082108
<spotbugs.skip>true</spotbugs.skip>
2109+
<maven.gitcommitid.skip>true</maven.gitcommitid.skip>
21092110
</properties>
21102111
</profile>
21112112
<profile>

0 commit comments

Comments
 (0)