Skip to content

Commit 311171f

Browse files
committed
Made Singul work better onprem. Moving to test.
1 parent 5314d6e commit 311171f

File tree

5 files changed

+17
-10
lines changed

5 files changed

+17
-10
lines changed

app_upload/stitcher.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1010,8 +1010,8 @@ func main() {
10101010
bucketName = os.Args[5]
10111011
}
10121012

1013-
appname := "shuffle-tools"
1014-
appversion := "1.2.0"
1013+
appname := "shuffle-ai"
1014+
appversion := "1.0.0"
10151015
err := deployConfigToBackend(appfolder, appname, appversion)
10161016
if err != nil {
10171017
log.Printf("[WARNING] Failed uploading config: %s", err)

blobs.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ func GetDefaultWorkflowByType(workflow Workflow, orgId string, categoryAction Ca
205205
},
206206
WorkflowAppActionParameter{
207207
Name: "standard",
208+
Description: "The standard to use from https://github.com/Shuffle/standards/tree/main",
208209
Value: "OCSF",
209210
Multiline: false,
210211
},

db-connector.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,12 +1169,7 @@ func Fixexecution(ctx context.Context, workflowExecution WorkflowExecution) (Wor
11691169
dbsave := false
11701170
workflowExecution.Workflow.Image = ""
11711171

1172-
//newExec := cleanupProtectedKeys(*exec)
1173-
//exec = &newExec
11741172
workflowExecution = cleanupProtectedKeys(workflowExecution)
1175-
1176-
// FIXME: May be a problem here with setting it at all times~
1177-
//if workflowExecution.Status != "EXECUTING" {
11781173
validation, err := GetExecutionValidation(ctx, workflowExecution.ExecutionId)
11791174
if err == nil {
11801175
if workflowExecution.NotificationsCreated > 0 {
@@ -13561,11 +13556,16 @@ func GetCacheKeyCount(ctx context.Context, orgId string, category string) (int,
1356113556
}
1356213557

1356313558
func GetAllCacheKeys(ctx context.Context, orgId string, category string, max int, inputcursor string) ([]CacheKeyData, string, error) {
13559+
if (os.Getenv("SHUFFLE_SWARM_CONFIG") == "run" || project.Environment == "worker") {
13560+
return []CacheKeyData{}, "", errors.New("Not available in worker mode")
13561+
}
13562+
1356413563
nameKey := "org_cache"
1356513564
if strings.ToLower(category) == "default" {
1356613565
category = ""
1356713566
}
1356813567

13568+
1356913569
category = strings.ReplaceAll(strings.ToLower(category), " ", "_")
1357013570
cacheKey := fmt.Sprintf("%s_%s_%s_%s", nameKey, inputcursor, orgId, category)
1357113571
// Look for

health.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2048,9 +2048,15 @@ func GetStaticWorkflowHealth(ctx context.Context, workflow Workflow) (Workflow,
20482048
startnodeFound = true
20492049
}
20502050

2051+
if strings.ToLower(strings.ReplaceAll(action.Name, " ", "_")) == "translate_standard" {
2052+
newActions = append(newActions, action)
2053+
continue
2054+
}
2055+
20512056
for _, field := range action.Parameters {
20522057
if (field.Name == "app_name" || field.Name == "appname") && (field.Value == "" || field.Value == "noapp") {
2053-
parsedError := fmt.Sprintf("Singul AI action %s is an app to use", action.Label)
2058+
2059+
parsedError := fmt.Sprintf("Singul action %s requires an app to use", action.Label)
20542060
if !ArrayContains(workflow.Errors, parsedError) {
20552061
workflow.Errors = append(workflow.Errors, parsedError)
20562062
}

shared.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31003,8 +31003,8 @@ func SanitizeFuzzySubstring(haystack, secret string, maxDistance int) string {
3100331003

3100431004
// Basic cleanup.
3100531005
func cleanupProtectedKeys(exec WorkflowExecution) WorkflowExecution {
31006-
isDisabled := os.Getenv("SHUFFLE_PROTECTED_CLEANUP_DISABLED")
31007-
if isDisabled == "true" {
31006+
// Basic checks to return
31007+
if os.Getenv("SHUFFLE_PROTECTED_CLEANUP_DISABLED") == "true" || project.Environment == "worker" {
3100831008
return exec
3100931009
}
3101031010

0 commit comments

Comments
 (0)