Skip to content

Commit

Permalink
Merge pull request #303 from Clever/wag-v8
Browse files Browse the repository at this point in the history
Update to Wag v8 and Go 1.16
  • Loading branch information
taylor-sutton authored Aug 4, 2021
2 parents 0808758 + beb09fe commit 2e91fa5
Show file tree
Hide file tree
Showing 42 changed files with 537 additions and 270 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ jobs:
build:
working_directory: /go/src/github.com/Clever/workflow-manager
docker:
- image: circleci/golang:1.13-stretch-node
- image: circleci/golang:1.16-stretch-node
steps:
- checkout
- setup_remote_docker
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ PKGS := $(PKGS) $(PKG)/gen-go/server/db/dynamodb

WAG_VERSION := latest

$(eval $(call golang-version-check,1.13))
$(eval $(call golang-version-check,1.16))

all: test build

Expand Down
12 changes: 6 additions & 6 deletions executor/workflow_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"github.com/Clever/workflow-manager/resources"
"github.com/Clever/workflow-manager/store"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/codes"
"go.opentelemetry.io/otel/label"
"gopkg.in/Clever/kayvee-go.v6/logger"

"github.com/aws/aws-sdk-go/aws"
Expand Down Expand Up @@ -117,7 +117,7 @@ func updatePendingWorkflow(ctx context.Context, m *sqs.Message, wm WorkflowManag
}

wfID := *m.Body
span.SetAttributes(label.String("workflow-id", wfID))
span.SetAttributes(attribute.String("workflow-id", wfID))
wf, err := thestore.GetWorkflowByID(ctx, wfID)
if err != nil {
if _, ok := err.(models.NotFound); ok {
Expand All @@ -127,13 +127,13 @@ func updatePendingWorkflow(ctx context.Context, m *sqs.Message, wm WorkflowManag
// this could indicate an error in starting the workflow.
// if that happened, it is logged separately.
deleteMsg()
span.SetAttributes(label.String("result", "workflow-not-found"))
span.SetAttributes(attribute.String("result", "workflow-not-found"))
return "", fmt.Errorf("workflow id not found: %s", wfID)
}
// other error, e.g. throttling. Try again later
requeueMsg()
deleteMsg()
span.SetAttributes(label.String("result", "database-error"))
span.SetAttributes(attribute.String("result", "database-error"))
return "", err
}

Expand All @@ -145,10 +145,10 @@ func updatePendingWorkflow(ctx context.Context, m *sqs.Message, wm WorkflowManag
// and re-queue a new message if the workflow remains pending.
defer func() {
if storeSaveFailed {
span.SetAttributes(label.String("result", "requeue-store-save-failed"))
span.SetAttributes(attribute.String("result", "requeue-store-save-failed"))
requeueMsg()
} else if !resources.WorkflowStatusIsDone(&wf) {
span.SetAttributes(label.String("result", "requeue-workflow-not-done"))
span.SetAttributes(attribute.String("result", "requeue-workflow-not-done"))
requeueMsg()
}
deleteMsg()
Expand Down
10 changes: 2 additions & 8 deletions gen-go/models/bad_request.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 2 additions & 8 deletions gen-go/models/cancel_reason.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 2 additions & 8 deletions gen-go/models/conflict.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 2 additions & 8 deletions gen-go/models/internal_error.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

65 changes: 57 additions & 8 deletions gen-go/models/job.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 2e91fa5

Please sign in to comment.