Skip to content

Commit

Permalink
Move workflow pkg
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisdoherty4 committed Jun 30, 2023
1 parent f20a793 commit a4e98b0
Show file tree
Hide file tree
Showing 24 changed files with 20 additions and 16 deletions.
2 changes: 1 addition & 1 deletion internal/agent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/go-logr/logr"
"github.com/tinkerbell/tink/internal/agent/event"
"github.com/tinkerbell/tink/internal/agent/workflow"
"github.com/tinkerbell/tink/internal/workflow"
)

// Agent is the core data structure for handling workflow execution on target nodes. It leverages
Expand Down
2 changes: 1 addition & 1 deletion internal/agent/agent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"github.com/tinkerbell/tink/internal/agent/failure"
"github.com/tinkerbell/tink/internal/agent/runtime"
"github.com/tinkerbell/tink/internal/agent/transport"
"github.com/tinkerbell/tink/internal/agent/workflow"
"github.com/tinkerbell/tink/internal/workflow"
"go.uber.org/zap"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/agent/mock.go

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

3 changes: 2 additions & 1 deletion internal/agent/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ import (
"time"

"github.com/go-logr/logr"

"github.com/tinkerbell/tink/internal/agent/event"
"github.com/tinkerbell/tink/internal/agent/failure"
"github.com/tinkerbell/tink/internal/agent/workflow"
"github.com/tinkerbell/tink/internal/workflow"
)

// ReasonRuntimeError is the default reason used when no reason is provided by the runtime.
Expand Down
2 changes: 1 addition & 1 deletion internal/agent/runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package agent
import (
"context"

"github.com/tinkerbell/tink/internal/agent/workflow"
"github.com/tinkerbell/tink/internal/workflow"
)

// ContainerRuntime is a runtime capable of executing workflow actions.
Expand Down
5 changes: 3 additions & 2 deletions internal/agent/runtime/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ import (
"github.com/docker/docker/api/types/mount"
"github.com/docker/docker/client"
"github.com/go-logr/logr"
"k8s.io/apimachinery/pkg/util/rand"

"github.com/tinkerbell/tink/internal/agent"
"github.com/tinkerbell/tink/internal/agent/runtime/internal"
"github.com/tinkerbell/tink/internal/agent/workflow"
"github.com/tinkerbell/tink/internal/ptr"
"k8s.io/apimachinery/pkg/util/rand"
"github.com/tinkerbell/tink/internal/workflow"
)

var _ agent.ContainerRuntime = &Docker{}
Expand Down
2 changes: 1 addition & 1 deletion internal/agent/runtime/docker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/rs/zerolog"
"github.com/tinkerbell/tink/internal/agent/failure"
"github.com/tinkerbell/tink/internal/agent/runtime"
"github.com/tinkerbell/tink/internal/agent/workflow"
"github.com/tinkerbell/tink/internal/workflow"
"go.uber.org/multierr"

"github.com/docker/docker/api/types"
Expand Down
3 changes: 2 additions & 1 deletion internal/agent/runtime/fake.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ import (
"context"

"github.com/go-logr/logr"

"github.com/tinkerbell/tink/internal/agent"
"github.com/tinkerbell/tink/internal/agent/workflow"
"github.com/tinkerbell/tink/internal/workflow"
)

var _ agent.ContainerRuntime = Fake{}
Expand Down
3 changes: 2 additions & 1 deletion internal/agent/transport/fake.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ import (
"context"

"github.com/go-logr/logr"

"github.com/tinkerbell/tink/internal/agent/event"
"github.com/tinkerbell/tink/internal/agent/workflow"
"github.com/tinkerbell/tink/internal/workflow"
)

func Noop() Fake {
Expand Down
2 changes: 1 addition & 1 deletion internal/agent/transport/grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"github.com/avast/retry-go"
"github.com/go-logr/logr"
"github.com/tinkerbell/tink/internal/agent/event"
"github.com/tinkerbell/tink/internal/agent/workflow"
workflowproto "github.com/tinkerbell/tink/internal/proto/workflow/v2"
"github.com/tinkerbell/tink/internal/workflow"
)

var _ event.Recorder = &GRPC{}
Expand Down
2 changes: 1 addition & 1 deletion internal/agent/transport/grpc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"github.com/rs/zerolog"
"github.com/tinkerbell/tink/internal/agent/event"
"github.com/tinkerbell/tink/internal/agent/transport"
"github.com/tinkerbell/tink/internal/agent/workflow"
workflowproto "github.com/tinkerbell/tink/internal/proto/workflow/v2"
"github.com/tinkerbell/tink/internal/workflow"
"google.golang.org/grpc"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/agent/transport/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"

"github.com/tinkerbell/tink/internal/agent/event"
"github.com/tinkerbell/tink/internal/agent/workflow"
"github.com/tinkerbell/tink/internal/workflow"
)

// WorkflowHandler is responsible for workflow execution.
Expand Down
2 changes: 1 addition & 1 deletion internal/agent/transport/mock.go

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

2 changes: 1 addition & 1 deletion internal/controller/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"

"github.com/tinkerbell/tink/api/v1alpha1"
"github.com/tinkerbell/tink/internal/workflow"
"github.com/tinkerbell/tink/internal/obsolete/workflow"
"k8s.io/apimachinery/pkg/runtime"
clientgoscheme "k8s.io/client-go/kubernetes/scheme"
"k8s.io/client-go/rest"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion internal/server/kubernetes_api_workflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (

"github.com/pkg/errors"
"github.com/tinkerbell/tink/api/v1alpha1"
"github.com/tinkerbell/tink/internal/obsolete/workflow"
"github.com/tinkerbell/tink/internal/proto"
"github.com/tinkerbell/tink/internal/workflow"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
File renamed without changes.

0 comments on commit a4e98b0

Please sign in to comment.