Merge branch 'launch' of https://github.com/frikky/shuffle into launch
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
|
||||
### DEFAULT
|
||||
NAME=shuffle-app_sdk
|
||||
VERSION=0.9.50
|
||||
VERSION=0.9.51
|
||||
|
||||
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
-2
@@ -47,10 +47,10 @@ services:
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
environment:
|
||||
- SHUFFLE_WORKER_VERSION=nightly
|
||||
- SHUFFLE_WORKER_VERSION=0.9.52
|
||||
- ORG_ID=${ORG_ID}
|
||||
- ENVIRONMENT_NAME=${ENVIRONMENT_NAME}
|
||||
- BASE_URL=http://${OUTER_HOSTNAME}:${BACKEND_PORT}
|
||||
- BASE_URL=https://frikky-shuffle-5gvr4xx62w64-5001.githubpreview.dev
|
||||
- DOCKER_API_VERSION=1.40
|
||||
- SHUFFLE_BASE_IMAGE_NAME=${SHUFFLE_BASE_IMAGE_NAME}
|
||||
- SHUFFLE_BASE_IMAGE_REGISTRY=${SHUFFLE_BASE_IMAGE_REGISTRY}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
NAME=shuffle-worker
|
||||
VERSION=0.9.50
|
||||
VERSION=0.9.52
|
||||
|
||||
echo "Running docker build with $NAME:$VERSION"
|
||||
#CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o worker.bin .
|
||||
|
||||
@@ -595,6 +595,8 @@ github.com/shuffle/shuffle-shared v0.1.78 h1://YsgQ85Ep40AA3pLUXb+85BUrNz5sqGqh0
|
||||
github.com/shuffle/shuffle-shared v0.1.78/go.mod h1:cW8LBv8P24rCPyJqGV6czxqrpnrv/R1d97EOqNgIvSk=
|
||||
github.com/shuffle/shuffle-shared v0.1.81 h1:/lOt7NSuMTWlRzgOKg2e7j95eakg3MgW6i/4Fp30kd4=
|
||||
github.com/shuffle/shuffle-shared v0.1.81/go.mod h1:cW8LBv8P24rCPyJqGV6czxqrpnrv/R1d97EOqNgIvSk=
|
||||
github.com/shuffle/shuffle-shared v0.1.83 h1:xfmcqceBGXJVUyZNBmI+c6RKndrtKJyBIqdHD86v/XA=
|
||||
github.com/shuffle/shuffle-shared v0.1.83/go.mod h1:cW8LBv8P24rCPyJqGV6czxqrpnrv/R1d97EOqNgIvSk=
|
||||
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
|
||||
github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc=
|
||||
github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc=
|
||||
|
||||
@@ -1163,7 +1163,6 @@ func handleExecutionResult(workflowExecution shuffle.WorkflowExecution) {
|
||||
// if everything is generated during execution
|
||||
//log.Printf("[DEBUG][%s] Deployed with CALLBACK_URL %s and BASE_URL %s", workflowExecution.ExecutionId, appCallbackUrl, baseUrl)
|
||||
env := []string{
|
||||
fmt.Sprintf("ACTION=%s", string(actionData)),
|
||||
fmt.Sprintf("EXECUTIONID=%s", workflowExecution.ExecutionId),
|
||||
fmt.Sprintf("AUTHORIZATION=%s", workflowExecution.Authorization),
|
||||
fmt.Sprintf("CALLBACK_URL=%s", baseUrl),
|
||||
@@ -1171,6 +1170,40 @@ func handleExecutionResult(workflowExecution shuffle.WorkflowExecution) {
|
||||
fmt.Sprintf("TZ=%s", timezone),
|
||||
}
|
||||
|
||||
if len(actionData) >= 100000 {
|
||||
log.Printf("[WARNING] Omitting some data from action execution. Length: %d. Fix in SDK!", len(actionData))
|
||||
newParams := []shuffle.WorkflowAppActionParameter{}
|
||||
for _, param := range action.Parameters {
|
||||
paramData, err := json.Marshal(param)
|
||||
if err != nil {
|
||||
log.Printf("[WARNING] Failed to marshal param %s: %s", param.Name, err)
|
||||
newParams = append(newParams, param)
|
||||
continue
|
||||
}
|
||||
|
||||
if len(paramData) >= 50000 {
|
||||
log.Printf("[WARNING] Removing a lot of data from param %s with length %d", param.Name, len(paramData))
|
||||
param.Value = "SHUFFLE_AUTO_REMOVED"
|
||||
}
|
||||
|
||||
newParams = append(newParams, param)
|
||||
}
|
||||
|
||||
action.Parameters = newParams
|
||||
actionData, err = json.Marshal(action)
|
||||
if err == nil {
|
||||
log.Printf("[DEBUG] Ran data replace on action %s. new length: %d", action.Name, len(actionData))
|
||||
} else {
|
||||
log.Printf("[WARNING] Failed to marshal new actionData: %s", err)
|
||||
|
||||
}
|
||||
} else {
|
||||
log.Printf("[DEBUG] Actiondata is NOT 100000 in length. Adding as normal.")
|
||||
}
|
||||
|
||||
actionEnv := fmt.Sprintf("ACTION=%s", string(actionData))
|
||||
env = append(env, actionEnv)
|
||||
|
||||
if strings.ToLower(os.Getenv("SHUFFLE_PASS_APP_PROXY")) == "true" {
|
||||
//log.Printf("APPENDING PROXY TO THE APP!")
|
||||
env = append(env, fmt.Sprintf("HTTP_PROXY=%s", os.Getenv("HTTP_PROXY")))
|
||||
|
||||
Reference in New Issue
Block a user