Skip to content

Commit 68f3726

Browse files
committed
Bump version used for upgrade test
1 parent aa158d4 commit 68f3726

File tree

16 files changed

+18
-334
lines changed

16 files changed

+18
-334
lines changed

app/src/main/java/io/apicurio/registry/storage/impl/sql/AbstractSqlRegistryStorage.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ private void applyUpgrader(Handle handle, String cname) {
286286
@SuppressWarnings("unchecked")
287287
Class<IDbUpgrader> upgraderClass = (Class<IDbUpgrader>) Class.forName(cname);
288288
IDbUpgrader upgrader = upgraderClass.getConstructor().newInstance();
289-
upgrader.upgrade(this, handle);
289+
upgrader.upgrade( handle);
290290
} catch (Exception e) {
291291
throw new RuntimeException(e);
292292
}

app/src/main/java/io/apicurio/registry/storage/impl/sql/IDbUpgrader.java

-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
package io.apicurio.registry.storage.impl.sql;
1818

19-
import io.apicurio.registry.storage.RegistryStorage;
2019
import io.apicurio.registry.storage.impl.sql.jdb.Handle;
2120

2221
/**
@@ -35,6 +34,4 @@ public interface IDbUpgrader {
3534
* @param registryStorage
3635
* @param dbHandle
3736
*/
38-
public void upgrade(RegistryStorage registryStorage, Handle dbHandle) throws Exception;
39-
4037
}

app/src/main/java/io/apicurio/registry/storage/impl/sql/upgrader/AvroCanonicalHashUpgrader.java

-149
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
15
1+
14

app/src/main/resources/io/apicurio/registry/storage/impl/sql/h2.ddl

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
CREATE TABLE apicurio (prop_name VARCHAR(255) NOT NULL, prop_value VARCHAR(255));
66
ALTER TABLE apicurio ADD PRIMARY KEY (prop_name);
7-
INSERT INTO apicurio (prop_name, prop_value) VALUES ('db_version', 15);
7+
INSERT INTO apicurio (prop_name, prop_value) VALUES ('db_version', 14);
88

99
CREATE TABLE sequences (tenantId VARCHAR(128) NOT NULL, name VARCHAR(32) NOT NULL, seq_value BIGINT NOT NULL);
1010
ALTER TABLE sequences ADD PRIMARY KEY (tenantId, name);

app/src/main/resources/io/apicurio/registry/storage/impl/sql/mssql.ddl

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
CREATE TABLE apicurio (prop_name VARCHAR(255) NOT NULL, prop_value VARCHAR(255));
66
ALTER TABLE apicurio ADD PRIMARY KEY (prop_name);
7-
INSERT INTO apicurio (prop_name, prop_value) VALUES ('db_version', 15);
7+
INSERT INTO apicurio (prop_name, prop_value) VALUES ('db_version', 14);
88

99
CREATE TABLE sequences (tenantId VARCHAR(128) NOT NULL, name VARCHAR(32) NOT NULL, value BIGINT NOT NULL);
1010
ALTER TABLE sequences ADD PRIMARY KEY (tenantId, name);

app/src/main/resources/io/apicurio/registry/storage/impl/sql/mysql.ddl

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
CREATE TABLE apicurio (prop_name VARCHAR(255) NOT NULL, prop_value VARCHAR(255));
66
ALTER TABLE apicurio ADD PRIMARY KEY (prop_name);
7-
INSERT INTO apicurio (prop_name, prop_value) VALUES ('db_version', 15);
7+
INSERT INTO apicurio (prop_name, prop_value) VALUES ('db_version', 14);
88

99
CREATE TABLE sequences (tenantId VARCHAR(128) NOT NULL, name VARCHAR(32) NOT NULL, value BIGINT NOT NULL);
1010
ALTER TABLE sequences ADD PRIMARY KEY (tenantId, name);

app/src/main/resources/io/apicurio/registry/storage/impl/sql/postgresql.ddl

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
CREATE TABLE apicurio (prop_name VARCHAR(255) NOT NULL, prop_value VARCHAR(255));
66
ALTER TABLE apicurio ADD PRIMARY KEY (prop_name);
7-
INSERT INTO apicurio (prop_name, prop_value) VALUES ('db_version', 15);
7+
INSERT INTO apicurio (prop_name, prop_value) VALUES ('db_version', 14);
88

99
CREATE TABLE sequences (tenantId VARCHAR(128) NOT NULL, name VARCHAR(32) NOT NULL, value BIGINT NOT NULL);
1010
ALTER TABLE sequences ADD PRIMARY KEY (tenantId, name);

app/src/main/resources/io/apicurio/registry/storage/impl/sql/upgrades/15/h2.upgrade.ddl

-8
This file was deleted.

app/src/main/resources/io/apicurio/registry/storage/impl/sql/upgrades/15/postgresql.upgrade.ddl

-8
This file was deleted.

integration-tests/src/test/java/io/apicurio/deployment/KafkaSqlDeploymentManager.java

+4-5
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
import java.util.concurrent.TimeoutException;
3333

3434
import static io.apicurio.deployment.KubernetesTestResources.*;
35-
import static io.apicurio.deployment.RegistryDeploymentManager.kubernetesClient;
3635
import static io.apicurio.deployment.RegistryDeploymentManager.prepareTestsInfra;
36+
import static io.apicurio.deployment.k8s.K8sClientManager.kubernetesClient;
3737

3838
public class KafkaSqlDeploymentManager {
3939

@@ -65,12 +65,11 @@ private static void prepareKafkaDbUpgradeTests(String registryImage) throws Exce
6565
prepareTestsInfra(KAFKA_RESOURCES, APPLICATION_2_1_KAFKA_RESOURCES, false, null, false);
6666
prepareKafkaSqlMigrationData(ApicurioRegistryBaseIT.getRegistryBaseUrl());
6767

68-
final RollableScalableResource<Deployment> deploymentResource = kubernetesClient().apps().deployments().inNamespace(TEST_NAMESPACE).withName(APPLICATION_DEPLOYMENT);
6968
//Once all the data has been introduced, the old deployment is deleted.
7069
deleteRegistryDeployment();
7170

7271
//The Registry version 2.3 is deployed, the version introducing artifact references.
73-
prepareTestsInfra(null, APPLICATION_2_3_KAFKA_RESOURCES, false, null, false);
72+
prepareTestsInfra(null, APPLICATION_2_4_KAFKA_RESOURCES, false, null, false);
7473
prepareKafkaSqlReferencesMigrationData(ApicurioRegistryBaseIT.getRegistryBaseUrl());
7574

7675
//Once the references data is ready, we delete this old deployment and finally the current one is deployed.
@@ -81,9 +80,9 @@ private static void prepareKafkaDbUpgradeTests(String registryImage) throws Exce
8180
}
8281

8382
private static void deleteRegistryDeployment() {
84-
final RollableScalableResource<Deployment> deploymentResource = kubernetesClient.apps().deployments().inNamespace(TEST_NAMESPACE).withName(APPLICATION_DEPLOYMENT);
83+
final RollableScalableResource<Deployment> deploymentResource = kubernetesClient().apps().deployments().inNamespace(TEST_NAMESPACE).withName(APPLICATION_DEPLOYMENT);
8584

86-
kubernetesClient.apps().deployments().inNamespace(TEST_NAMESPACE).withName(APPLICATION_DEPLOYMENT).delete();
85+
kubernetesClient().apps().deployments().inNamespace(TEST_NAMESPACE).withName(APPLICATION_DEPLOYMENT).delete();
8786

8887
//Wait for the deployment to be deleted
8988
CompletableFuture<List<Deployment>> deployment = deploymentResource

integration-tests/src/test/java/io/apicurio/deployment/KubernetesTestResources.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ public class KubernetesTestResources {
3636
protected static final String APPLICATION_KAFKA_MULTITENANT_RESOURCES = "/infra/kafka/registry-multitenant-kafka.yml";
3737

3838
protected static final String APPLICATION_2_1_SQL_RESOURCES = "/infra/sql/registry-sql-2-1.yml";
39-
protected static final String APPLICATION_2_3_SQL_RESOURCES = "/infra/sql/registry-sql-2-3.yml";
39+
protected static final String APPLICATION_2_4_SQL_RESOURCES = "/infra/sql/registry-sql-2-4.yml";
4040

4141
protected static final String APPLICATION_2_1_KAFKA_RESOURCES = "/infra/kafka/registry-kafka-2.1.yml";
42-
protected static final String APPLICATION_2_3_KAFKA_RESOURCES = "/infra/kafka/registry-kafka-2.3.yml";
42+
protected static final String APPLICATION_2_4_KAFKA_RESOURCES = "/infra/kafka/registry-kafka-2.4.yml";
4343

4444
protected static final String TENANT_MANAGER_RESOURCES = "/infra/tenant-manager/tenant-manager.yml";
4545
protected static final String TENANT_MANAGER_DATABASE = "/infra/tenant-manager/tenant-manager-database.yml";

integration-tests/src/test/java/io/apicurio/deployment/SqlDeploymentManager.java

+4-6
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,9 @@
4444
import java.util.concurrent.TimeUnit;
4545
import java.util.concurrent.TimeoutException;
4646

47-
import static io.apicurio.deployment.k8s.K8sClientManager.kubernetesClient;
48-
import static io.apicurio.deployment.KubernetesTestResources.*;
4947
import static io.apicurio.deployment.KubernetesTestResources.*;
50-
import static io.apicurio.deployment.RegistryDeploymentManager.kubernetesClient;
5148
import static io.apicurio.deployment.RegistryDeploymentManager.prepareTestsInfra;
49+
import static io.apicurio.deployment.k8s.K8sClientManager.kubernetesClient;
5250

5351
public class SqlDeploymentManager {
5452

@@ -82,7 +80,7 @@ private static void prepareSqlDbUpgradeTests(String registryImage) throws Except
8280
deleteRegistryDeployment();
8381

8482
//The Registry version 2.3 is deployed, the version introducing artifact references.
85-
prepareTestsInfra(null, APPLICATION_2_3_SQL_RESOURCES, false, null, false);
83+
prepareTestsInfra(null, APPLICATION_2_4_SQL_RESOURCES, false, null, false);
8684
prepareSqlReferencesMigrationData();
8785

8886
//Once the references data is ready, we delete this old deployment and finally the current one is deployed.
@@ -93,9 +91,9 @@ private static void prepareSqlDbUpgradeTests(String registryImage) throws Except
9391
}
9492

9593
private static void deleteRegistryDeployment() {
96-
final RollableScalableResource<Deployment> deploymentResource = kubernetesClient.apps().deployments().inNamespace(TEST_NAMESPACE).withName(APPLICATION_DEPLOYMENT);
94+
final RollableScalableResource<Deployment> deploymentResource = kubernetesClient().apps().deployments().inNamespace(TEST_NAMESPACE).withName(APPLICATION_DEPLOYMENT);
9795

98-
kubernetesClient.apps().deployments().inNamespace(TEST_NAMESPACE).withName(APPLICATION_DEPLOYMENT).delete();
96+
kubernetesClient().apps().deployments().inNamespace(TEST_NAMESPACE).withName(APPLICATION_DEPLOYMENT).delete();
9997

10098
//Wait for the deployment to be deleted
10199
CompletableFuture<List<Deployment>> deployment = deploymentResource

integration-tests/src/test/resources/infra/kafka/registry-kafka-2.3.yml integration-tests/src/test/resources/infra/kafka/registry-kafka-2.4.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ spec:
2323
fieldPath: metadata.namespace
2424
- name: KAFKA_BOOTSTRAP_SERVERS
2525
value: kafka-service:9092
26-
image: quay.io/apicurio/apicurio-registry-kafkasql:2.1.2.Final
26+
image: quay.io/apicurio/apicurio-registry-kafkasql:2.4.4.Final
2727
imagePullPolicy: Always
2828
livenessProbe:
2929
failureThreshold: 3

integration-tests/src/test/resources/infra/sql/registry-sql-2-3.yml integration-tests/src/test/resources/infra/sql/registry-sql-2-4.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ spec:
3939
value: "3s"
4040
- name: TENANT_MANAGER_URL
4141
value: "http://tenant-manager-service:8585"
42-
image: quay.io/apicurio/apicurio-registry-sql:2.3.0.Final
42+
image: quay.io/apicurio/apicurio-registry-sql:2.4.4.Final
4343
imagePullPolicy: Always
4444
livenessProbe:
4545
failureThreshold: 3

0 commit comments

Comments
 (0)