fix: correctly pull the deployment id from an app's helm values when executing dokku run under the k3s scheduler

- Fix the internal identifier of deployment_id -> deployment_id
- Add tests for both enter and run.
This commit is contained in:
Jose Diaz-Gonzalez committed 2024-11-04 14:44:25 -05:00
1 parent ef061ef32b
commit fd2cfe8080
10 files changed
+35 -18

No files matched your search

+6 -1
View File
@@ -1085,7 +1085,12 @@ func TriggerSchedulerRun(scheduler string, appName string, envCount int, args []
return fmt.Errorf("Error getting helm values: %w", err)
}
deploymentIDValue, ok := values["deploment_id"].(string)
globalValues, ok := values["global"].(map[string]interface{})
if !ok {
return errors.New("Global helm values not found")
}
deploymentIDValue, ok := globalValues["deployment_id"].(string)
if !ok {
return fmt.Errorf("Deployment ID is not a string")
}