tchughesiv commented on code in PR #372:
URL: 
https://github.com/apache/incubator-kie-kogito-serverless-operator/pull/372#discussion_r1478454966


##########
controllers/platform/services/properties_services_test.go:
##########
@@ -231,36 +219,30 @@ func setPlatformName(name string) plfmOptionFn {
 
 func setJobServiceJDBC(jdbc string) plfmOptionFn {
        return func(p *operatorapi.SonataFlowPlatform) {
-               if p.Spec.Services == nil {
-                       p.Spec.Services = &operatorapi.ServicesPlatformSpec{}
-               }
                if p.Spec.Services.JobService == nil {
                        p.Spec.Services.JobService = &operatorapi.ServiceSpec{}
                }
                if p.Spec.Services.JobService.Persistence == nil {
-                       p.Spec.Services.JobService.Persistence = 
&operatorapi.PersistenceOptions{}
+                       p.Spec.Services.JobService.Persistence = 
&operatorapi.PersistencePlatformSpec{}
                }
-               if p.Spec.Services.JobService.Persistence.PostgreSql == nil {
-                       p.Spec.Services.JobService.Persistence.PostgreSql = 
&operatorapi.PersistencePostgreSql{}
+               if p.Spec.Services.JobService.Persistence.PostgreSQL == nil {
+                       p.Spec.Services.JobService.Persistence.PostgreSQL = 
&operatorapi.PersistencePostgreSQL{}
                }
-               p.Spec.Services.JobService.Persistence.PostgreSql.JdbcUrl = jdbc
+               p.Spec.Services.JobService.Persistence.PostgreSQL.JdbcUrl = jdbc
        }
 }
 
 func setDataIndexJDBC(jdbc string) plfmOptionFn {
        return func(p *operatorapi.SonataFlowPlatform) {
-               if p.Spec.Services == nil {
-                       p.Spec.Services = &operatorapi.ServicesPlatformSpec{}
-               }

Review Comment:
   same



##########
controllers/profiles/common/properties/application_test.go:
##########
@@ -658,18 +652,15 @@ func setPlatformName(name string) plfmOptionFn {
 
 func setJobServiceJDBC(jdbc string) plfmOptionFn {
        return func(p *operatorapi.SonataFlowPlatform) {
-               if p.Spec.Services == nil {
-                       p.Spec.Services = &operatorapi.ServicesPlatformSpec{}
-               }

Review Comment:
   same



##########
controllers/profiles/common/properties/application_test.go:
##########
@@ -622,9 +622,6 @@ func generatePlatform(opts ...plfmOptionFn) 
*operatorapi.SonataFlowPlatform {
 
 func setJobServiceEnabledValue(v *bool) plfmOptionFn {
        return func(p *operatorapi.SonataFlowPlatform) {
-               if p.Spec.Services == nil {
-                       p.Spec.Services = &operatorapi.ServicesPlatformSpec{}
-               }

Review Comment:
   revert



##########
controllers/profiles/common/properties/application_test.go:
##########
@@ -634,9 +631,6 @@ func setJobServiceEnabledValue(v *bool) plfmOptionFn {
 
 func setDataIndexEnabledValue(v *bool) plfmOptionFn {
        return func(p *operatorapi.SonataFlowPlatform) {
-               if p.Spec.Services == nil {
-                       p.Spec.Services = &operatorapi.ServicesPlatformSpec{}
-               }

Review Comment:
   same



##########
controllers/platform/services/services.go:
##########
@@ -427,7 +459,7 @@ func isJobServiceSet(platform 
*operatorapi.SonataFlowPlatform) bool {
 }
 
 func isServicesSet(platform *operatorapi.SonataFlowPlatform) bool {
-       return platform != nil && platform.Spec.Services != nil

Review Comment:
   add back `platform.Spec.Services != nil` 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to