Skip to content

Commit

Permalink
Reproducer for fabric8 binary compatibility issues
Browse files Browse the repository at this point in the history
  • Loading branch information
mjurc committed Aug 31, 2024
1 parent b1c0fba commit f7d4cb6
Show file tree
Hide file tree
Showing 8 changed files with 205 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,42 @@
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
replay_pid*

target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/

### IntelliJ IDEA ###
.idea/modules.xml
.idea/jarRepositories.xml
.idea/compiler.xml
.idea/libraries/
*.iws
*.iml
*.ipr

### Eclipse ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/

### VS Code ###
.vscode/

### Mac OS ###
.DS_Store
38 changes: 38 additions & 0 deletions fabric8-binary-compatibility/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/

### IntelliJ IDEA ###
.idea/modules.xml
.idea/jarRepositories.xml
.idea/compiler.xml
.idea/libraries/
*.iws
*.iml
*.ipr

### Eclipse ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/

### VS Code ###
.vscode/

### Mac OS ###
.DS_Store
17 changes: 17 additions & 0 deletions fabric8-binary-compatibility/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
## Reproducer for ConfigBuilder binary compatibility issue

This is a very simple reproducer for [fabric8 ConfigBuilder binary compatibility issue](https://github.com/fabric8io/kubernetes-client/issues/6249).

One module has a method using ConfigBuilder, the other runs a test that runs
the method with specified version of fabric8 OpenShift client.

To run the reproducer:
```
mvn clean install -Dfabric8.openshift-client.build-version=${COMPILE_TIME_VERSION} -Dfabric8.openshift-client.runtime-version=${RUNTIME_VERSION}
```

For example, the following combinations will make the test fail:
```
mvn clean install -Dfabric8.openshift-client.build-version=6.13.1 -Dfabric8.openshift-client.runtime-version=6.13.3
mvn clean install -Dfabric8.openshift-client.build-version=6.13.3 -Dfabric8.openshift-client.runtime-version=6.13.1
```
22 changes: 22 additions & 0 deletions fabric8-binary-compatibility/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>org.acme</groupId>
<artifactId>fabric8-binary-compatibility</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<module>simpleclient</module>
<module>simpleclient-test</module>
</modules>

<properties>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

</project>
40 changes: 40 additions & 0 deletions fabric8-binary-compatibility/simpleclient-test/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.acme</groupId>
<artifactId>fabric8-binary-compatibility</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>

<artifactId>simpleclient-test</artifactId>

<properties>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<fabric8.openshift-client.runtime-version>6.13.3</fabric8.openshift-client.runtime-version>
</properties>

<dependencies>
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>openshift-client</artifactId>
<version>${fabric8.openshift-client.runtime-version}</version>
</dependency>
<dependency>
<groupId>org.acme</groupId>
<artifactId>simpleclient</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.11.0</version>
<scope>test</scope>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import org.junit.jupiter.api.Test;

public class SimpleClientTest {

@Test
void simpleClientConfigBuilderTest() {
SimpleClient.tryCreateClientConfig();
}

}
29 changes: 29 additions & 0 deletions fabric8-binary-compatibility/simpleclient/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.acme</groupId>
<artifactId>fabric8-binary-compatibility</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>

<artifactId>simpleclient</artifactId>

<properties>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<fabric8.openshift-client.build-version>6.13.1</fabric8.openshift-client.build-version>
</properties>

<dependencies>
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>openshift-client</artifactId>
<version>${fabric8.openshift-client.build-version}</version>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import io.fabric8.openshift.client.OpenShiftConfig;
import io.fabric8.openshift.client.OpenShiftConfigBuilder;

public class SimpleClient {

public static void tryCreateClientConfig() {
OpenShiftConfig config = new OpenShiftConfigBuilder().withTrustCerts(true).withNamespace("test").build();
}

}

0 comments on commit f7d4cb6

Please sign in to comment.