You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by wm...@apache.org on 2024/09/06 12:58:45 UTC
(incubator-kie-kogito-serverless-operator) branch main updated: kie-kogito-serverless-operator-528: Disable partial DB Migrator work (#529)
This is an automated email from the ASF dual-hosted git repository.
wmedvedeo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-kie-kogito-serverless-operator.git
The following commit(s) were added to refs/heads/main by this push:
new 6438a233 kie-kogito-serverless-operator-528: Disable partial DB Migrator work (#529)
6438a233 is described below
commit 6438a2335d302cc32681fee0c32355461bf048f5
Author: Walter Medvedeo <wm...@gmail.com>
AuthorDate: Fri Sep 6 14:58:41 2024 +0200
kie-kogito-serverless-operator-528: Disable partial DB Migrator work (#529)
---
controllers/platform/services/services.go | 16 ++++++++++------
version/version.go | 6 +++---
2 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/controllers/platform/services/services.go b/controllers/platform/services/services.go
index dbba7221..3636b0f0 100644
--- a/controllers/platform/services/services.go
+++ b/controllers/platform/services/services.go
@@ -21,7 +21,6 @@ package services
import (
"fmt"
- "strconv"
"github.com/apache/incubator-kie-kogito-serverless-operator/controllers/cfg"
"github.com/apache/incubator-kie-kogito-serverless-operator/utils/kubernetes"
@@ -225,10 +224,12 @@ func (d DataIndexHandler) ConfigurePersistence(containerSpec *corev1.Container)
c := containerSpec.DeepCopy()
c.Image = d.GetServiceImageName(constants.PersistenceTypePostgreSQL)
c.Env = append(c.Env, persistence.ConfigurePostgreSQLEnv(p.PostgreSQL, d.GetServiceName(), d.platform.Namespace)...)
- migrateDBOnStart := strconv.FormatBool(d.platform.Spec.Services.DataIndex.Persistence.MigrateDBOnStartUp)
- // specific to DataIndex
- c.Env = append(c.Env, corev1.EnvVar{Name: quarkusHibernateORMDatabaseGeneration, Value: "update"}, corev1.EnvVar{Name: quarkusFlywayMigrateAtStart, Value: migrateDBOnStart})
+ // TODO upcoming work as part of the DB Migrator incorporation should continue where
+ // assignments like -> migrateDBOnStart := strconv.FormatBool(d.platform.Spec.Services.DataIndex.Persistence.MigrateDBOnStartUp) introduces nil pointer references,
+ // since Services, and services Persistence are optional references.
+ // specific to DataIndex
+ c.Env = append(c.Env, corev1.EnvVar{Name: quarkusHibernateORMDatabaseGeneration, Value: "update"}, corev1.EnvVar{Name: quarkusFlywayMigrateAtStart, Value: "true"})
return c
}
return containerSpec
@@ -391,9 +392,12 @@ func (j JobServiceHandler) ConfigurePersistence(containerSpec *corev1.Container)
c.Image = j.GetServiceImageName(constants.PersistenceTypePostgreSQL)
p := persistence.RetrievePostgreSQLConfiguration(j.platform.Spec.Services.JobService.Persistence, j.platform.Spec.Persistence, j.GetServiceName())
c.Env = append(c.Env, persistence.ConfigurePostgreSQLEnv(p.PostgreSQL, j.GetServiceName(), j.platform.Namespace)...)
+ // TODO upcoming work as part of the DB Migrator incorporation should continue where
+ // assignments like -> migrateDBOnStart := strconv.FormatBool(j.platform.Spec.Services.JobService.Persistence.MigrateDBOnStartUp) introduces nil pointer references,
+ // since Services, and services Persistence are optional references.
+
// Specific to Job Service
- migrateDBOnStart := strconv.FormatBool(j.platform.Spec.Services.JobService.Persistence.MigrateDBOnStartUp)
- c.Env = append(c.Env, corev1.EnvVar{Name: "QUARKUS_FLYWAY_MIGRATE_AT_START", Value: migrateDBOnStart})
+ c.Env = append(c.Env, corev1.EnvVar{Name: "QUARKUS_FLYWAY_MIGRATE_AT_START", Value: "true"})
c.Env = append(c.Env, corev1.EnvVar{Name: "KOGITO_JOBS_SERVICE_LOADJOBERRORSTRATEGY", Value: "FAIL_SERVICE"})
return c
}
diff --git a/version/version.go b/version/version.go
index eb0eb353..349e5d03 100644
--- a/version/version.go
+++ b/version/version.go
@@ -31,7 +31,7 @@ const (
// When released, this version should reflect the `major.minor` version in the registry.
// For example, docker.io/apache/incubator-kie-sonataflow-operator:10.0
tagVersion = "main"
- serviceTagVersion = "weekly-latest"
+ serviceTagVersion = "main"
)
// GetOperatorVersion gets the current binary version of the operator. Do not use it to compose image tags!
@@ -45,8 +45,8 @@ func GetTagVersion() string {
}
// GetServiceTagVersion gets the current tag version for the service images.
-// TODO, unify all with tagVersion="main", when "main" tag is produced for DI and JS.
-// Right now, Apache community only produces "weekly-latest", and "timestamped tags" for these services.
+// TODO, double check Apache community continues producing JS and DI "main" tag images.
+// The "weekly-latest" tags are no longer produced.
func GetServiceTagVersion() string {
return serviceTagVersion
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org