Răsfoiți Sursa

fix issue with sonar refs (#3510)

Alex Meijer 4 luni în urmă
părinte
comite
bac0a90731

+ 2 - 2
.github/workflows/sonar.yaml

@@ -98,8 +98,8 @@ jobs:
           args: >
             -Dsonar.scm.revision=${{ github.event.workflow_run.head_sha }}
             -Dsonar.pullrequest.key=${{ steps.set-vars.outputs.SONAR_PR_NUM }}
-            -Dsonar.pullrequest.branch="${{ steps.set-vars.outputs.SONAR_HEAD }}"
-            -Dsonar.pullrequest.base="${{ steps.set-vars.outputs.SONAR_BASE }}"
+            -Dsonar.pullrequest.branch=${{ steps.set-vars.outputs.SONAR_HEAD }}
+            -Dsonar.pullrequest.base=${{ steps.set-vars.outputs.SONAR_BASE }}
             -Dsonar.projectKey=opencost_opencost
             -Dsonar.organization=opencost
       - name: SonarQube Quality Gate check

+ 2 - 0
pkg/cmd/costmodel/config.go

@@ -22,6 +22,7 @@ func DefaultConfig() *Config {
 		CarbonEstimatesEnabled: env.IsCarbonEstimatesEnabled(),
 		CloudCostEnabled:       env.IsCloudCostEnabled(),
 		MCPServerEnabled:       env.IsMCPServerEnabled(),
+		CustomCostEnabled:      env.IsCustomCostEnabled(),
 	}
 }
 
@@ -31,4 +32,5 @@ func (c *Config) log() {
 	log.Infof("Cloud Costs enabled: %t", c.CloudCostEnabled)
 	log.Infof("Custom Costs enabled: %t", c.CustomCostEnabled)
 	log.Infof("MCP Server enabled: %t", c.MCPServerEnabled)
+	log.Infof("Custom Costs enabled: %t", c.CustomCostEnabled)
 }

+ 1 - 1
pkg/cmd/costmodel/costmodel.go

@@ -72,7 +72,7 @@ func Execute(conf *Config) error {
 	}
 
 	var customCostPipelineService *customcost.PipelineService
-	if conf.CloudCostEnabled {
+	if conf.CustomCostEnabled {
 		customCostPipelineService = costmodel.InitializeCustomCost(router)
 	}