Fixed app sdk startnode failing when branches coming into it
This commit is contained in:
@@ -53,7 +53,7 @@ ORBORUS_CONTAINER_NAME= # Used to FIND the containername. cgroup v2: issue 50
|
||||
|
||||
SHUFFLE_BASE_IMAGE_NAME=frikky
|
||||
SHUFFLE_BASE_IMAGE_REGISTRY=ghcr.io
|
||||
SHUFFLE_BASE_IMAGE_TAG_SUFFIX="-0.8.80"
|
||||
SHUFFLE_BASE_IMAGE_TAG_SUFFIX="-1.0.0"
|
||||
|
||||
# Used for auto-cleanup of containers. REALLY important at scale.
|
||||
SHUFFLE_CONTAINER_AUTO_CLEANUP=false
|
||||
|
||||
@@ -380,17 +380,17 @@ class AppBase:
|
||||
if not finished:
|
||||
# Not sure why this would work tho :)
|
||||
action_result["status"] = "FAILURE"
|
||||
action_result["result"] = f"POST failed to get info!"
|
||||
self.logger.info(f"[DEBUG] Before typeerror stream result - NOT finished")
|
||||
action_result["result"] = json.dumps({"success": False, "reason": "POST error: Failed connecting to %s over 5 retries" % url})
|
||||
self.logger.info(f"[DEBUG] Before typeerror stream result - NOT finished after 5 requests")
|
||||
ret = requests.post("%s%s" % (self.base_url, stream_path), headers=headers, json=action_result)
|
||||
|
||||
self.logger.info(f"""[DEBUG] Successful request result request: Status= {ret.status_code} & Response= {ret.text}. Action status: {action_result["status"]}""")
|
||||
except requests.exceptions.ConnectionError as e:
|
||||
self.logger.info(f"[DEBUG] Unexpected ConnectionError happened: {e}")
|
||||
except TypeError as e:
|
||||
#self.logger.exception(e)
|
||||
action_result["status"] = "FAILURE"
|
||||
action_result["result"] = f"POST error: {e}"
|
||||
action_result["result"] = json.dumps({"success": False, "reason": "Typeerror when sending to backend URL %s" % url})
|
||||
|
||||
self.logger.info(f"[DEBUG] Before typeerror stream result: {e}")
|
||||
ret = requests.post("%s%s" % (self.base_url, stream_path), headers=headers, json=action_result)
|
||||
#self.logger.info(f"[DEBUG] Result: {ret.status_code}")
|
||||
@@ -2471,6 +2471,12 @@ class AppBase:
|
||||
except KeyError:
|
||||
return True, ""
|
||||
|
||||
# Startnode should always run - no need to check incoming
|
||||
try:
|
||||
if action["id"] == fullexecution["start"]:
|
||||
return True, ""
|
||||
except Exception as error:
|
||||
self.logger.info(f"[WARNING] Failed checking startnode: {error}")
|
||||
|
||||
available_checks = [
|
||||
"=",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
### DEFAULT
|
||||
NAME=shuffle-app_sdk
|
||||
VERSION=1.0.1
|
||||
VERSION=1.0.2
|
||||
|
||||
docker rmi docker.pkg.github.com/frikky/shuffle/$NAME:$VERSION --force
|
||||
docker build . -f Dockerfile -t frikky/shuffle:app_sdk -t frikky/$NAME:$VERSION -t docker.pkg.github.com/frikky/shuffle/$NAME:$VERSION -t ghcr.io/frikky/$NAME:$VERSION -t ghcr.io/frikky/$NAME:nightly
|
||||
|
||||
@@ -2,7 +2,7 @@ module main
|
||||
|
||||
go 1.16
|
||||
|
||||
replace github.com/shuffle/shuffle-shared => ../../../shuffle-shared
|
||||
//replace github.com/shuffle/shuffle-shared => ../../../shuffle-shared
|
||||
|
||||
//replace github.com/frikky/kin-openapi => ../../../../git/kin-openapi
|
||||
//replace github.com/frikky/go-elasticsearch => ../../../../git/go-elasticsearch
|
||||
@@ -24,7 +24,7 @@ require (
|
||||
github.com/h2non/filetype v1.1.3
|
||||
github.com/nirasan/go-oauth-pkce-code-verifier v0.0.0-20170819232839-0fbfe93532da // indirect
|
||||
github.com/satori/go.uuid v1.2.0
|
||||
github.com/shuffle/shuffle-shared v0.2.38
|
||||
github.com/shuffle/shuffle-shared v0.2.44
|
||||
go4.org v0.0.0-20201209231011-d4a079459e60 // indirect
|
||||
golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce
|
||||
google.golang.org/api v0.65.0
|
||||
|
||||
@@ -981,7 +981,8 @@ func handleInfo(resp http.ResponseWriter, request *http.Request) {
|
||||
}
|
||||
|
||||
org, err := shuffle.GetOrg(ctx, userInfo.ActiveOrg.Id)
|
||||
if err == nil {
|
||||
//if err == nil {
|
||||
if len(org.Id) > 0 {
|
||||
userInfo.ActiveOrg = shuffle.OrgMini{
|
||||
Id: org.Id,
|
||||
Name: org.Name,
|
||||
@@ -990,6 +991,7 @@ func handleInfo(resp http.ResponseWriter, request *http.Request) {
|
||||
Image: org.Image,
|
||||
}
|
||||
}
|
||||
//}
|
||||
|
||||
userInfo.ActiveOrg.Users = []shuffle.UserMini{}
|
||||
userOrgs := []shuffle.OrgMini{}
|
||||
@@ -1000,7 +1002,8 @@ func handleInfo(resp http.ResponseWriter, request *http.Request) {
|
||||
}
|
||||
|
||||
org, err := shuffle.GetOrg(ctx, item)
|
||||
if err == nil {
|
||||
_ = err
|
||||
if len(org.Id) > 0 {
|
||||
userOrgs = append(userOrgs, shuffle.OrgMini{
|
||||
Id: org.Id,
|
||||
Name: org.Name,
|
||||
|
||||
Reference in New Issue
Block a user