Skip to content

Commit 17aad83

Browse files
committed
WIP-START: Apache Kafka and JDK build matrix
. AK 2.5, 2.6 . Will also shadow build the latest version of AK . Includes shadow builds for 2.4 . Add JDK matrix (8 and 13) . Test to show all system properties
1 parent 54fb957 commit 17aad83

File tree

6 files changed

+80
-5
lines changed

6 files changed

+80
-5
lines changed

.github/workflows/maven.yml

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
33

44
# Tests disabled due to flakiness with under resourced github test machines. Confluent Jira works fine. Will fix later.
5-
name: CI compile only - Java 8 (IT disabled atm, unit tests only)
5+
name: Java 8 (unit tests only)
66

77
on:
88
push:
@@ -12,7 +12,26 @@ on:
1212

1313
jobs:
1414
build:
15-
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
# Why not? because we can.
19+
# 2.0.1, 2.1.1, 2.2.2, 2.3.1, 2.4.1 don't work - needs zstd and some kafka client libs.
20+
# Doesn't mean it couldn't be modified slightly to work...
21+
ak: [2.5.1, 2.6.1]
22+
jdk: ['-P jvm8-release -Djvm8.location=/opt/hostedtoolcache/jdk/8.0.282/x64', '']
23+
experimental: [false]
24+
name: ["Stable AK version"]
25+
include:
26+
- ak: "'[2.4.1,2.5)'" # currently failing
27+
experimental: true
28+
name: "Oldest AK breaking version 2.4.1+ (below 2.5.0) expected to fail"
29+
- ak: "'[2.7.0,4)'" # currently failing
30+
experimental: true
31+
name: "Newest AK version 2.7.0+ expected to fail"
32+
33+
continue-on-error: ${{ matrix.experimental }}
34+
name: "${{ matrix.name }} (AK: ${{ matrix.ak }}) experimental? ${{ matrix.experimental }}"
1635
runs-on: ubuntu-latest
1736

1837
steps:
@@ -71,8 +90,9 @@ jobs:
7190
key: ${{ runner.os }}-m2
7291
restore-keys: ${{ runner.os }}-m2
7392

74-
- name: Test with Maven on Java 8
75-
run: mvn -B package -P jvm8-release -Djvm8.location=/opt/hostedtoolcache/jdk/8.0.282/x64
93+
- name: Test with Maven
94+
#run: mvn -B package -P jvm8-release -Djvm8.location=/opt/hostedtoolcache/jdk/8.0.282/x64 -Dkafka.version=${{ matrix.ak }}
95+
run: mvn -B package ${{ matrix.jdk }} -Dkafka.version=${{ matrix.ak }}
7696
# - name: Test with Maven on Java 9
7797
# run: mvn -B package -P jvm9-release -Djvm9.location=/opt/hostedtoolcache/jdk/9.0.7/x64
7898
# - name: Test with Maven on Java

README.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -753,6 +753,9 @@ See what profiles are active::
753753
See what plugins or dependencies are available to be updated::
754754
`mvn versions:display-plugin-updates versions:display-property-updates versions:display-dependency-updates`
755755

756+
Run a single unit test::
757+
`mvn -Dtest=TestCircle test`
758+
756759
Run a specific integration test method in a submodule project, skipping unit tests::
757760
`mvn -Dit.test=TransactionAndCommitModeTest#testLowMaxPoll -DskipUTs=true verify -DfailIfNoTests=false --projects parallel-consumer-core`
758761

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package io.confluent.csid.utils;
2+
3+
import lombok.extern.slf4j.Slf4j;
4+
import org.assertj.core.presentation.StandardRepresentation;
5+
import org.junit.jupiter.api.Test;
6+
import org.slf4j.helpers.MessageFormatter;
7+
8+
import java.util.Map;
9+
import java.util.Properties;
10+
11+
import static io.confluent.csid.utils.StringTestUtils.pretty;
12+
13+
@Slf4j
14+
class JavaEnvTest {
15+
16+
/**
17+
* Used to check the java environment at runtime
18+
*/
19+
@Test
20+
void checkJavaEnvironment() {
21+
log.error("Java all env: {}", pretty(System.getProperties().entrySet()));
22+
}
23+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package io.confluent.csid.utils;
2+
3+
import lombok.experimental.UtilityClass;
4+
import org.assertj.core.presentation.StandardRepresentation;
5+
6+
@UtilityClass
7+
public class StringTestUtils {
8+
9+
public static final StandardRepresentation STANDARD_REPRESENTATION = new StandardRepresentation();
10+
11+
public static String pretty(Object properties) {
12+
return STANDARD_REPRESENTATION.toStringOf(properties);
13+
}
14+
}

pom.xml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797

9898
<!-- core -->
9999
<slf4j.version>1.7.30</slf4j.version>
100-
<kafka.version>2.5.0</kafka.version>
100+
<kafka.version>2.5.1</kafka.version>
101101
<version.unij>0.1.3</version.unij>
102102

103103
<!-- tests -->
@@ -645,6 +645,18 @@
645645
</execution>
646646
</executions>
647647
</plugin>
648+
<plugin>
649+
<groupId>org.apache.maven.plugins</groupId>
650+
<artifactId>maven-dependency-plugin</artifactId>
651+
<executions>
652+
<execution>
653+
<phase>initialize</phase>
654+
<goals>
655+
<goal>tree</goal>
656+
</goals>
657+
</execution>
658+
</executions>
659+
</plugin>
648660
</plugins>
649661

650662
<!-- Management -->

src/docs/README.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -675,6 +675,9 @@ See what profiles are active::
675675
See what plugins or dependencies are available to be updated::
676676
`mvn versions:display-plugin-updates versions:display-property-updates versions:display-dependency-updates`
677677

678+
Run a single unit test::
679+
`mvn -Dtest=TestCircle test`
680+
678681
Run a specific integration test method in a submodule project, skipping unit tests::
679682
`mvn -Dit.test=TransactionAndCommitModeTest#testLowMaxPoll -DskipUTs=true verify -DfailIfNoTests=false --projects parallel-consumer-core`
680683

0 commit comments

Comments
 (0)