Build reliablity fixes (#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
This commit is contained in:
Zoltan Haindrich 2023-09-28 21:27:52 +02:00 committed by GitHub
parent fa61e654e4
commit 5f3b310115
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 27 additions and 10 deletions

View File

@ -159,6 +159,7 @@ jobs:
with:
path: ~/.m2/repository
key: maven-${{ runner.os }}-8-${{ github.sha }}
restore-keys: setup-java-Linux-maven-${{ hashFiles('**/pom.xml') }}
- name: Maven build
if: steps.maven-restore.outputs.cache-hit != 'true'

View File

@ -72,6 +72,7 @@ jobs:
with:
path: ~/.m2/repository
key: maven-${{ runner.os }}-${{ matrix.jdk }}-${{ github.sha }}
restore-keys: setup-java-Linux-maven-${{ hashFiles('**/pom.xml') }}
- name: Cache targets
id: target

View File

@ -34,6 +34,7 @@ import org.apache.druid.client.BrokerServerView;
import org.apache.druid.client.DruidServer;
import org.apache.druid.client.selector.HighestPriorityTierSelectorStrategy;
import org.apache.druid.client.selector.RandomServerSelectorStrategy;
import org.apache.druid.common.config.NullHandling;
import org.apache.druid.curator.CuratorTestBase;
import org.apache.druid.indexing.materializedview.DerivativeDataSourceMetadata;
import org.apache.druid.jackson.DefaultObjectMapper;
@ -72,6 +73,10 @@ import java.util.concurrent.TimeUnit;
public class DatasourceOptimizerTest extends CuratorTestBase
{
static {
NullHandling.initializeForTests();
}
@Rule
public final TestDerbyConnector.DerbyConnectorRule derbyConnectorRule = new TestDerbyConnector.DerbyConnectorRule();
private DerivativeDataSourceManager derivativesManager;

View File

@ -23,6 +23,7 @@ import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.base.Function;
import com.google.common.collect.ImmutableMap;
import org.apache.druid.common.config.NullHandling;
import org.apache.druid.data.input.MapBasedRow;
import org.apache.druid.jackson.DefaultObjectMapper;
import org.apache.druid.java.util.common.DateTimes;
@ -55,6 +56,10 @@ import java.util.stream.Collectors;
public class MaterializedViewQueryQueryToolChestTest
{
static {
NullHandling.initializeForTests();
}
private static final ObjectMapper JSON_MAPPER = new DefaultObjectMapper();
@Test
@ -244,7 +249,5 @@ public class MaterializedViewQueryQueryToolChestTest
));
Assert.assertEquals(realQuery, materializedViewQueryQueryToolChest.getRealQuery(materializedViewQuery));
}
}

View File

@ -25,6 +25,7 @@ import com.fasterxml.jackson.databind.jsontype.NamedType;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
import org.apache.druid.common.config.NullHandling;
import org.apache.druid.java.util.common.HumanReadableBytes;
import org.apache.druid.math.expr.ExprMacroTable;
import org.apache.druid.query.Query;
@ -45,6 +46,10 @@ import java.io.IOException;
public class MaterializedViewQueryTest
{
static {
NullHandling.initializeForTests();
}
private static final ObjectMapper JSON_MAPPER = TestHelper.makeJsonMapper();
private DataSourceOptimizer optimizer;

View File

@ -30,7 +30,8 @@ cp -R docker $SHARED_DIR/docker
pushd ../
rm -rf distribution/target/apache-druid-$DRUID_VERSION-integration-test-bin
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
# using parallel build here may not yield significant speedups
mvn -B -Pskip-static-checks,skip-tests -Dweb.console.skip=true install -Pintegration-test
mv distribution/target/apache-druid-$DRUID_VERSION-integration-test-bin/bin $SHARED_DIR/docker/bin
mv distribution/target/apache-druid-$DRUID_VERSION-integration-test-bin/lib $SHARED_DIR/docker/lib
mv distribution/target/apache-druid-$DRUID_VERSION-integration-test-bin/extensions $SHARED_DIR/docker/extensions

12
it.sh
View File

@ -232,17 +232,17 @@ case $CMD in
mvn -q clean install dependency:go-offline -P dist $MAVEN_IGNORE
;;
"build" )
mvn clean install -P dist $MAVEN_IGNORE -T1.0C $*
mvn -B clean install -P dist $MAVEN_IGNORE -T1.0C $*
;;
"dist" )
mvn install -P dist $MAVEN_IGNORE -pl :distribution
mvn -B install -P dist $MAVEN_IGNORE -pl :distribution
;;
"tools" )
mvn install -pl :druid-it-tools
mvn -B install -pl :druid-it-tools
;;
"image" )
cd $DRUID_DEV/integration-tests-ex/image
mvn install -P test-image $MAVEN_IGNORE
mvn -B install -P test-image $MAVEN_IGNORE
;;
"gen")
# Generate the docker-compose.yaml files. Mostly for debugging
@ -264,7 +264,7 @@ case $CMD in
"run" )
require_category
reuse_override
mvn $TEST_OPTIONS -P IT-$CATEGORY -pl $MAVEN_PROJECT
mvn -B $TEST_OPTIONS -P IT-$CATEGORY -pl $MAVEN_PROJECT
;;
"test" )
require_category
@ -275,7 +275,7 @@ case $CMD in
# Run the test. On failure, still shut down the cluster.
# Return Maven's return code as the script's return code.
set +e
mvn $TEST_OPTIONS -P IT-$CATEGORY -pl $MAVEN_PROJECT
mvn -B $TEST_OPTIONS -P IT-$CATEGORY -pl $MAVEN_PROJECT
RESULT=$?
set -e
$IT_CASES_DIR/cluster.sh down $CATEGORY

View File

@ -2106,6 +2106,7 @@
<maven.javadoc.skip>true</maven.javadoc.skip>
<pmd.skip>true</pmd.skip>
<spotbugs.skip>true</spotbugs.skip>
<maven.gitcommitid.skip>true</maven.gitcommitid.skip>
</properties>
</profile>
<profile>