Merge branch '2.0.0' of github.com:Shuffle/Shuffle into 2.0.0

This commit is contained in:
Aditya
2024-10-29 17:49:38 +05:30
5 changed files with 24 additions and 4 deletions
+19
View File
@@ -1645,6 +1645,25 @@ class AppBase:
#return value.json()
return {"success": False}
def update_file(self, file_id, content):
full_execution = self.full_execution
workflow_id = full_execution["workflow"]["id"]
org_id = full_execution["workflow"]["execution_org"]["id"]
new_headers = {
"Authorization": f"Bearer {self.authorization}",
"User-Agent": "Shuffle 1.1.0",
}
upload_path = "/api/v1/files/%s/edit?execution_id=%s" % (file_id, full_execution["execution_id"])
files={"shuffle_file": ("filename", content)}
ret = requests.put("%s%s" % (self.url, upload_path), files=files, headers=new_headers, verify=False, proxies=self.proxy_config)
print(ret.status_code)
return ret.json()
# Wrapper for set_files
def set_file(self, infiles):
return self.set_files(infiles)
+1 -1
View File
@@ -20,7 +20,7 @@ require (
github.com/gorilla/mux v1.8.1
github.com/h2non/filetype v1.1.3
github.com/satori/go.uuid v1.2.0
github.com/shuffle/shuffle-shared v0.6.77
github.com/shuffle/shuffle-shared v0.6.78
golang.org/x/crypto v0.22.0
google.golang.org/api v0.176.1
google.golang.org/grpc v1.63.2
+2
View File
@@ -336,6 +336,8 @@ github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4=
github.com/shuffle/shuffle-shared v0.6.74 h1:os3BDSFZnl4U8ZgsTAY8IsTDADcMXhbc1rS9UMa0BIY=
github.com/shuffle/shuffle-shared v0.6.74/go.mod h1:RAJiSFjmuKmijKTbbEf9A6Ojb+3/te7g71lED7JjPus=
github.com/shuffle/shuffle-shared v0.6.78 h1:INWlC0bzPqXLTGEGz2Id3pXXp4RPbUpWgqgbCBbGJ4A=
github.com/shuffle/shuffle-shared v0.6.78/go.mod h1:RAJiSFjmuKmijKTbbEf9A6Ojb+3/te7g71lED7JjPus=
github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
+2
View File
@@ -3726,7 +3726,9 @@ func sendWorkerRequest(workflowExecution shuffle.ExecutionRequest, image string,
newresp, err := client.Do(req)
if err != nil {
// Connection refused?
log.Printf("[ERROR] Error running worker request to %s (1): %s", streamUrl, err)
if strings.Contains(fmt.Sprintf("%s", err), "connection refused") || strings.Contains(fmt.Sprintf("%s", err), "EOF") {
workerImage := fmt.Sprintf("%s/%s/shuffle-worker:%s", baseimageregistry, baseimagename, workerVersion)
-3
View File
@@ -1301,9 +1301,6 @@ func handleExecutionResult(workflowExecution shuffle.WorkflowExecution) {
log.Printf("[ERROR] Unable to create docker client (3): %s", err)
return
}
}
if isKubernetes == "true" {
defer dockercli.Close()
}