mirror of https://github.com/apache/druid.git
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:
parent
fa61e654e4
commit
5f3b310115
|
@ -159,6 +159,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
path: ~/.m2/repository
|
path: ~/.m2/repository
|
||||||
key: maven-${{ runner.os }}-8-${{ github.sha }}
|
key: maven-${{ runner.os }}-8-${{ github.sha }}
|
||||||
|
restore-keys: setup-java-Linux-maven-${{ hashFiles('**/pom.xml') }}
|
||||||
|
|
||||||
- name: Maven build
|
- name: Maven build
|
||||||
if: steps.maven-restore.outputs.cache-hit != 'true'
|
if: steps.maven-restore.outputs.cache-hit != 'true'
|
||||||
|
|
|
@ -72,6 +72,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
path: ~/.m2/repository
|
path: ~/.m2/repository
|
||||||
key: maven-${{ runner.os }}-${{ matrix.jdk }}-${{ github.sha }}
|
key: maven-${{ runner.os }}-${{ matrix.jdk }}-${{ github.sha }}
|
||||||
|
restore-keys: setup-java-Linux-maven-${{ hashFiles('**/pom.xml') }}
|
||||||
|
|
||||||
- name: Cache targets
|
- name: Cache targets
|
||||||
id: target
|
id: target
|
||||||
|
|
|
@ -34,6 +34,7 @@ import org.apache.druid.client.BrokerServerView;
|
||||||
import org.apache.druid.client.DruidServer;
|
import org.apache.druid.client.DruidServer;
|
||||||
import org.apache.druid.client.selector.HighestPriorityTierSelectorStrategy;
|
import org.apache.druid.client.selector.HighestPriorityTierSelectorStrategy;
|
||||||
import org.apache.druid.client.selector.RandomServerSelectorStrategy;
|
import org.apache.druid.client.selector.RandomServerSelectorStrategy;
|
||||||
|
import org.apache.druid.common.config.NullHandling;
|
||||||
import org.apache.druid.curator.CuratorTestBase;
|
import org.apache.druid.curator.CuratorTestBase;
|
||||||
import org.apache.druid.indexing.materializedview.DerivativeDataSourceMetadata;
|
import org.apache.druid.indexing.materializedview.DerivativeDataSourceMetadata;
|
||||||
import org.apache.druid.jackson.DefaultObjectMapper;
|
import org.apache.druid.jackson.DefaultObjectMapper;
|
||||||
|
@ -72,6 +73,10 @@ import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
public class DatasourceOptimizerTest extends CuratorTestBase
|
public class DatasourceOptimizerTest extends CuratorTestBase
|
||||||
{
|
{
|
||||||
|
static {
|
||||||
|
NullHandling.initializeForTests();
|
||||||
|
}
|
||||||
|
|
||||||
@Rule
|
@Rule
|
||||||
public final TestDerbyConnector.DerbyConnectorRule derbyConnectorRule = new TestDerbyConnector.DerbyConnectorRule();
|
public final TestDerbyConnector.DerbyConnectorRule derbyConnectorRule = new TestDerbyConnector.DerbyConnectorRule();
|
||||||
private DerivativeDataSourceManager derivativesManager;
|
private DerivativeDataSourceManager derivativesManager;
|
||||||
|
@ -142,7 +147,7 @@ public class DatasourceOptimizerTest extends CuratorTestBase
|
||||||
Set<String> metrics = Sets.newHashSet("cost");
|
Set<String> metrics = Sets.newHashSet("cost");
|
||||||
DerivativeDataSourceMetadata metadata = new DerivativeDataSourceMetadata(baseDataSource, dims, metrics);
|
DerivativeDataSourceMetadata metadata = new DerivativeDataSourceMetadata(baseDataSource, dims, metrics);
|
||||||
metadataStorageCoordinator.insertDataSourceMetadata(dataSource, metadata);
|
metadataStorageCoordinator.insertDataSourceMetadata(dataSource, metadata);
|
||||||
// insert base datasource segments
|
// insert base datasource segments
|
||||||
List<Boolean> baseResult = Lists.transform(
|
List<Boolean> baseResult = Lists.transform(
|
||||||
ImmutableList.of(
|
ImmutableList.of(
|
||||||
"2011-04-01/2011-04-02",
|
"2011-04-01/2011-04-02",
|
||||||
|
|
|
@ -23,6 +23,7 @@ import com.fasterxml.jackson.core.type.TypeReference;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.google.common.base.Function;
|
import com.google.common.base.Function;
|
||||||
import com.google.common.collect.ImmutableMap;
|
import com.google.common.collect.ImmutableMap;
|
||||||
|
import org.apache.druid.common.config.NullHandling;
|
||||||
import org.apache.druid.data.input.MapBasedRow;
|
import org.apache.druid.data.input.MapBasedRow;
|
||||||
import org.apache.druid.jackson.DefaultObjectMapper;
|
import org.apache.druid.jackson.DefaultObjectMapper;
|
||||||
import org.apache.druid.java.util.common.DateTimes;
|
import org.apache.druid.java.util.common.DateTimes;
|
||||||
|
@ -55,6 +56,10 @@ import java.util.stream.Collectors;
|
||||||
|
|
||||||
public class MaterializedViewQueryQueryToolChestTest
|
public class MaterializedViewQueryQueryToolChestTest
|
||||||
{
|
{
|
||||||
|
static {
|
||||||
|
NullHandling.initializeForTests();
|
||||||
|
}
|
||||||
|
|
||||||
private static final ObjectMapper JSON_MAPPER = new DefaultObjectMapper();
|
private static final ObjectMapper JSON_MAPPER = new DefaultObjectMapper();
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -244,7 +249,5 @@ public class MaterializedViewQueryQueryToolChestTest
|
||||||
));
|
));
|
||||||
|
|
||||||
Assert.assertEquals(realQuery, materializedViewQueryQueryToolChest.getRealQuery(materializedViewQuery));
|
Assert.assertEquals(realQuery, materializedViewQueryQueryToolChest.getRealQuery(materializedViewQuery));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,6 +25,7 @@ import com.fasterxml.jackson.databind.jsontype.NamedType;
|
||||||
import com.google.common.collect.ImmutableMap;
|
import com.google.common.collect.ImmutableMap;
|
||||||
import com.google.common.collect.Iterables;
|
import com.google.common.collect.Iterables;
|
||||||
import com.google.common.collect.Lists;
|
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.java.util.common.HumanReadableBytes;
|
||||||
import org.apache.druid.math.expr.ExprMacroTable;
|
import org.apache.druid.math.expr.ExprMacroTable;
|
||||||
import org.apache.druid.query.Query;
|
import org.apache.druid.query.Query;
|
||||||
|
@ -45,6 +46,10 @@ import java.io.IOException;
|
||||||
|
|
||||||
public class MaterializedViewQueryTest
|
public class MaterializedViewQueryTest
|
||||||
{
|
{
|
||||||
|
static {
|
||||||
|
NullHandling.initializeForTests();
|
||||||
|
}
|
||||||
|
|
||||||
private static final ObjectMapper JSON_MAPPER = TestHelper.makeJsonMapper();
|
private static final ObjectMapper JSON_MAPPER = TestHelper.makeJsonMapper();
|
||||||
private DataSourceOptimizer optimizer;
|
private DataSourceOptimizer optimizer;
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,8 @@ cp -R docker $SHARED_DIR/docker
|
||||||
|
|
||||||
pushd ../
|
pushd ../
|
||||||
rm -rf distribution/target/apache-druid-$DRUID_VERSION-integration-test-bin
|
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/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/lib $SHARED_DIR/docker/lib
|
||||||
mv distribution/target/apache-druid-$DRUID_VERSION-integration-test-bin/extensions $SHARED_DIR/docker/extensions
|
mv distribution/target/apache-druid-$DRUID_VERSION-integration-test-bin/extensions $SHARED_DIR/docker/extensions
|
||||||
|
|
12
it.sh
12
it.sh
|
@ -232,17 +232,17 @@ case $CMD in
|
||||||
mvn -q clean install dependency:go-offline -P dist $MAVEN_IGNORE
|
mvn -q clean install dependency:go-offline -P dist $MAVEN_IGNORE
|
||||||
;;
|
;;
|
||||||
"build" )
|
"build" )
|
||||||
mvn clean install -P dist $MAVEN_IGNORE -T1.0C $*
|
mvn -B clean install -P dist $MAVEN_IGNORE -T1.0C $*
|
||||||
;;
|
;;
|
||||||
"dist" )
|
"dist" )
|
||||||
mvn install -P dist $MAVEN_IGNORE -pl :distribution
|
mvn -B install -P dist $MAVEN_IGNORE -pl :distribution
|
||||||
;;
|
;;
|
||||||
"tools" )
|
"tools" )
|
||||||
mvn install -pl :druid-it-tools
|
mvn -B install -pl :druid-it-tools
|
||||||
;;
|
;;
|
||||||
"image" )
|
"image" )
|
||||||
cd $DRUID_DEV/integration-tests-ex/image
|
cd $DRUID_DEV/integration-tests-ex/image
|
||||||
mvn install -P test-image $MAVEN_IGNORE
|
mvn -B install -P test-image $MAVEN_IGNORE
|
||||||
;;
|
;;
|
||||||
"gen")
|
"gen")
|
||||||
# Generate the docker-compose.yaml files. Mostly for debugging
|
# Generate the docker-compose.yaml files. Mostly for debugging
|
||||||
|
@ -264,7 +264,7 @@ case $CMD in
|
||||||
"run" )
|
"run" )
|
||||||
require_category
|
require_category
|
||||||
reuse_override
|
reuse_override
|
||||||
mvn $TEST_OPTIONS -P IT-$CATEGORY -pl $MAVEN_PROJECT
|
mvn -B $TEST_OPTIONS -P IT-$CATEGORY -pl $MAVEN_PROJECT
|
||||||
;;
|
;;
|
||||||
"test" )
|
"test" )
|
||||||
require_category
|
require_category
|
||||||
|
@ -275,7 +275,7 @@ case $CMD in
|
||||||
# Run the test. On failure, still shut down the cluster.
|
# Run the test. On failure, still shut down the cluster.
|
||||||
# Return Maven's return code as the script's return code.
|
# Return Maven's return code as the script's return code.
|
||||||
set +e
|
set +e
|
||||||
mvn $TEST_OPTIONS -P IT-$CATEGORY -pl $MAVEN_PROJECT
|
mvn -B $TEST_OPTIONS -P IT-$CATEGORY -pl $MAVEN_PROJECT
|
||||||
RESULT=$?
|
RESULT=$?
|
||||||
set -e
|
set -e
|
||||||
$IT_CASES_DIR/cluster.sh down $CATEGORY
|
$IT_CASES_DIR/cluster.sh down $CATEGORY
|
||||||
|
|
1
pom.xml
1
pom.xml
|
@ -2106,6 +2106,7 @@
|
||||||
<maven.javadoc.skip>true</maven.javadoc.skip>
|
<maven.javadoc.skip>true</maven.javadoc.skip>
|
||||||
<pmd.skip>true</pmd.skip>
|
<pmd.skip>true</pmd.skip>
|
||||||
<spotbugs.skip>true</spotbugs.skip>
|
<spotbugs.skip>true</spotbugs.skip>
|
||||||
|
<maven.gitcommitid.skip>true</maven.gitcommitid.skip>
|
||||||
</properties>
|
</properties>
|
||||||
</profile>
|
</profile>
|
||||||
<profile>
|
<profile>
|
||||||
|
|
Loading…
Reference in New Issue