Fixed a url replacement bug for versions
This commit is contained in:
@@ -121,9 +121,6 @@ var autoDeploy = map[string]string{
|
|||||||
// "shuffle-tools-fork:1.0.0": "frikky/shuffle:shuffle-tools-fork_1.0.0",
|
// "shuffle-tools-fork:1.0.0": "frikky/shuffle:shuffle-tools-fork_1.0.0",
|
||||||
}
|
}
|
||||||
|
|
||||||
//"testing:1.0.0": "frikky/shuffle:testing_1.0.0",
|
|
||||||
//fmt.Sprintf("%s_%s", workflowExecution.ExecutionId, action.ID)
|
|
||||||
|
|
||||||
// New Worker mappings
|
// New Worker mappings
|
||||||
// visited, appendActions, nextActions, notFound, queueNodes, toRemove, executed, env
|
// visited, appendActions, nextActions, notFound, queueNodes, toRemove, executed, env
|
||||||
var portMappings map[string]int
|
var portMappings map[string]int
|
||||||
@@ -4043,6 +4040,19 @@ func sendAppRequest(ctx context.Context, incomingUrl, appName string, port int,
|
|||||||
appName = strings.Replace(appName, "_", "-", -1)
|
appName = strings.Replace(appName, "_", "-", -1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Shitty hardcoded fix for now
|
||||||
|
if strings.Contains(appName, "1.0.0") {
|
||||||
|
appName = strings.Replace(appName, "1.0.0", "1-0-0", 1)
|
||||||
|
} else if strings.Contains(appName, "1.1.0") {
|
||||||
|
appName = strings.Replace(appName, "1.1.0", "1-1-0", 1)
|
||||||
|
} else if strings.Contains(appName, "1.2.0") {
|
||||||
|
appName = strings.Replace(appName, "1.2.0", "1-2-0", 1)
|
||||||
|
} else if strings.Contains(appName, "1.4.0") {
|
||||||
|
appName = strings.Replace(appName, "1.4.0", "1-4-0", 1)
|
||||||
|
} else if strings.Contains(appName, "2.0.0") {
|
||||||
|
appName = strings.Replace(appName, "2.0.0", "2-0-0", 1)
|
||||||
|
}
|
||||||
|
|
||||||
streamUrl := fmt.Sprintf("http://%s:%d/api/v1/run", appName, port)
|
streamUrl := fmt.Sprintf("http://%s:%d/api/v1/run", appName, port)
|
||||||
// log.Printf("[DEBUG][%s] Worker URL: %s, Backend URL: %s, Target App: %s", workflowExecution.ExecutionId, parsedRequest.BaseUrl, parsedRequest.Url, streamUrl)
|
// log.Printf("[DEBUG][%s] Worker URL: %s, Backend URL: %s, Target App: %s", workflowExecution.ExecutionId, parsedRequest.BaseUrl, parsedRequest.Url, streamUrl)
|
||||||
req, err := http.NewRequest(
|
req, err := http.NewRequest(
|
||||||
|
|||||||
Reference in New Issue
Block a user