Skip to content

Commit

Permalink
Changed default bucketnames
Browse files Browse the repository at this point in the history
  • Loading branch information
frikky committed Sep 3, 2023
1 parent 26fc9bc commit e96537a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion codegen.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
Expand Down
6 changes: 3 additions & 3 deletions db-connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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]
Expand Down Expand Up @@ -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)
Expand Down
12 changes: 6 additions & 6 deletions shared.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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",
Expand All @@ -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"
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit e96537a

Please sign in to comment.