From e96537a715842f762d67b9710b3958469683cb28 Mon Sep 17 00:00:00 2001 From: Frikky Date: Sun, 3 Sep 2023 22:01:16 +0200 Subject: [PATCH] Changed default bucketnames --- codegen.go | 2 +- db-connector.go | 6 +++--- shared.go | 12 ++++++------ 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/codegen.go b/codegen.go index 6d9971d..02dd80a 100755 --- a/codegen.go +++ b/codegen.go @@ -1223,7 +1223,7 @@ func GenerateYaml(swagger *openapi3.Swagger, newmd5 string) (*openapi3.Swagger, Description: "Add or edit headers", Multiline: true, Required: false, - Example: "Content-Type=application/json\nAccept=application/json", + Example: "Content-Type=application/json\nAccept=application/json\r\n", Schema: SchemaDefinition{ Type: "string", }, diff --git a/db-connector.go b/db-connector.go index f456caa..dd7c17f 100755 --- a/db-connector.go +++ b/db-connector.go @@ -1114,7 +1114,7 @@ func getExecutionFileValue(ctx context.Context, workflowExecution WorkflowExecut } } - bucket := project.StorageClient.Bucket("shuffler.appspot.com") + bucket := project.StorageClient.Bucket(project.BucketName) obj := bucket.Object(fullParsedPath) fileReader, err := obj.NewReader(ctx) if err != nil { @@ -1480,7 +1480,7 @@ func getCloudFileApp(ctx context.Context, workflowApp WorkflowApp, id string) (W if len(workflowApp.Name) == 0 { return workflowApp, nil } - //project.BucketName := "shuffler.appspot.com" + //project.BucketName := project.BucketName if strings.HasSuffix(id, ".") { id = id[:len(id)-1] @@ -3259,7 +3259,7 @@ func GetOpenApiDatastore(ctx context.Context, id string) (ParsedOpenApi, error) err := project.Dbclient.Get(ctx, key, api) //if (err != nil || len(api.Body) == 0) && !strings.Contains(fmt.Sprintf("%s", err), "no such") { if err != nil || len(api.Body) == 0 { - //project.BucketName := "shuffler.appspot.com" + //project.BucketName := project.BucketName fullParsedPath := fmt.Sprintf("extra_specs/%s/openapi.json", id) //gs://shuffler.appspot.com/extra_specs/0373ed696a3a2cba0a2b6838068f2b80 //log.Printf("[DEBUG] Couldn't find openapi for %s. Checking filepath gs://%s/%s (size too big). Error: %s", id, project.BucketName, fullParsedPath, err) diff --git a/shared.go b/shared.go index 2046e28..9113c12 100755 --- a/shared.go +++ b/shared.go @@ -10936,8 +10936,8 @@ func compressExecution(ctx context.Context, workflowExecution WorkflowExecution, if len(workflowExecution.ExecutionArgument) > maxSize { itemSize := len(workflowExecution.ExecutionArgument) baseResult := fmt.Sprintf(`{ - "success": False, - "reason": "Result too large to handle (https://github.com/frikky/shuffle/issues/171)." + "success": false, + "reason": "Result too large to handle (https://github.com/frikky/shuffle/issues/171).", "size": %d, "extra": "", "id": "%s_%s" @@ -10959,7 +10959,7 @@ func compressExecution(ctx context.Context, workflowExecution WorkflowExecution, workflowExecution.ExecutionArgument = baseResult } else { workflowExecution.ExecutionArgument = fmt.Sprintf(`{ - "success": False, + "success": false, "reason": "Result too large to handle (https://github.com/frikky/shuffle/issues/171).", "size": %d, "extra": "replace", @@ -10976,8 +10976,8 @@ func compressExecution(ctx context.Context, workflowExecution WorkflowExecution, itemSize := len(item.Result) baseResult := fmt.Sprintf(`{ - "success": False, - "reason": "Result too large to handle (https://github.com/frikky/shuffle/issues/171)." + "success": false, + "reason": "Result too large to handle (https://github.com/frikky/shuffle/issues/171).", "size": %d, "extra": "", "id": "%s_%s" @@ -11012,7 +11012,7 @@ func compressExecution(ctx context.Context, workflowExecution WorkflowExecution, } item.Result = fmt.Sprintf(`{ - "success": False, + "success": false, "reason": "Result too large to handle (https://github.com/frikky/shuffle/issues/171).", "size": %d, "extra": "replace",