diff --git a/apps/workspace-engine/svc/controllers/jobdispatch/jobagents/argo/application_upserter.go b/apps/workspace-engine/pkg/jobagents/argo/application_upserter.go similarity index 100% rename from apps/workspace-engine/svc/controllers/jobdispatch/jobagents/argo/application_upserter.go rename to apps/workspace-engine/pkg/jobagents/argo/application_upserter.go diff --git a/apps/workspace-engine/svc/controllers/jobdispatch/jobagents/argo/argoapp_test.go b/apps/workspace-engine/pkg/jobagents/argo/argoapp_test.go similarity index 100% rename from apps/workspace-engine/svc/controllers/jobdispatch/jobagents/argo/argoapp_test.go rename to apps/workspace-engine/pkg/jobagents/argo/argoapp_test.go diff --git a/apps/workspace-engine/svc/controllers/jobdispatch/jobagents/argo/argocd.go b/apps/workspace-engine/pkg/jobagents/argo/argocd.go similarity index 98% rename from apps/workspace-engine/svc/controllers/jobdispatch/jobagents/argo/argocd.go rename to apps/workspace-engine/pkg/jobagents/argo/argocd.go index 43154acaf..2a5a42c7b 100644 --- a/apps/workspace-engine/svc/controllers/jobdispatch/jobagents/argo/argocd.go +++ b/apps/workspace-engine/pkg/jobagents/argo/argocd.go @@ -12,9 +12,9 @@ import ( "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/trace" + "workspace-engine/pkg/jobagents/types" "workspace-engine/pkg/oapi" "workspace-engine/pkg/templatefuncs" - "workspace-engine/svc/controllers/jobdispatch/jobagents/types" ) var tracer = otel.Tracer("workspace-engine/jobagents/argo") diff --git a/apps/workspace-engine/svc/controllers/jobdispatch/jobagents/argo/argocd_plan.go b/apps/workspace-engine/pkg/jobagents/argo/argocd_plan.go similarity index 98% rename from apps/workspace-engine/svc/controllers/jobdispatch/jobagents/argo/argocd_plan.go rename to apps/workspace-engine/pkg/jobagents/argo/argocd_plan.go index 0391446d1..d6fcec7f5 100644 --- a/apps/workspace-engine/svc/controllers/jobdispatch/jobagents/argo/argocd_plan.go +++ b/apps/workspace-engine/pkg/jobagents/argo/argocd_plan.go @@ -12,8 +12,8 @@ import ( "github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1" "github.com/charmbracelet/log" + "workspace-engine/pkg/jobagents/types" "workspace-engine/pkg/oapi" - "workspace-engine/svc/controllers/jobdispatch/jobagents/types" ) const ( diff --git a/apps/workspace-engine/svc/controllers/jobdispatch/jobagents/argo/argocd_verification.go b/apps/workspace-engine/pkg/jobagents/argo/argocd_verification.go similarity index 100% rename from apps/workspace-engine/svc/controllers/jobdispatch/jobagents/argo/argocd_verification.go rename to apps/workspace-engine/pkg/jobagents/argo/argocd_verification.go diff --git a/apps/workspace-engine/svc/controllers/jobdispatch/jobagents/argoworkflows/workflow.go b/apps/workspace-engine/pkg/jobagents/argoworkflows/workflow.go similarity index 98% rename from apps/workspace-engine/svc/controllers/jobdispatch/jobagents/argoworkflows/workflow.go rename to apps/workspace-engine/pkg/jobagents/argoworkflows/workflow.go index 426776efb..1b93856e5 100644 --- a/apps/workspace-engine/svc/controllers/jobdispatch/jobagents/argoworkflows/workflow.go +++ b/apps/workspace-engine/pkg/jobagents/argoworkflows/workflow.go @@ -11,9 +11,9 @@ import ( "github.com/goccy/go-yaml" "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/trace" + "workspace-engine/pkg/jobagents/types" "workspace-engine/pkg/oapi" "workspace-engine/pkg/templatefuncs" - "workspace-engine/svc/controllers/jobdispatch/jobagents/types" ) var tracer = otel.Tracer("workspace-engine/jobagents/argo-workflow") diff --git a/apps/workspace-engine/svc/controllers/jobdispatch/jobagents/argoworkflows/workflow_submitter.go b/apps/workspace-engine/pkg/jobagents/argoworkflows/workflow_submitter.go similarity index 100% rename from apps/workspace-engine/svc/controllers/jobdispatch/jobagents/argoworkflows/workflow_submitter.go rename to apps/workspace-engine/pkg/jobagents/argoworkflows/workflow_submitter.go diff --git a/apps/workspace-engine/svc/controllers/jobdispatch/jobagents/argoworkflows/workflow_test.go b/apps/workspace-engine/pkg/jobagents/argoworkflows/workflow_test.go similarity index 99% rename from apps/workspace-engine/svc/controllers/jobdispatch/jobagents/argoworkflows/workflow_test.go rename to apps/workspace-engine/pkg/jobagents/argoworkflows/workflow_test.go index e3fcda581..ff5babb6a 100644 --- a/apps/workspace-engine/svc/controllers/jobdispatch/jobagents/argoworkflows/workflow_test.go +++ b/apps/workspace-engine/pkg/jobagents/argoworkflows/workflow_test.go @@ -11,8 +11,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + argo_workflows "workspace-engine/pkg/jobagents/argoworkflows" "workspace-engine/pkg/oapi" - argo_workflows "workspace-engine/svc/controllers/jobdispatch/jobagents/argoworkflows" ) // ----- Mocks ----- diff --git a/apps/workspace-engine/svc/controllers/jobdispatch/jobagents/github/config.go b/apps/workspace-engine/pkg/jobagents/github/config.go similarity index 100% rename from apps/workspace-engine/svc/controllers/jobdispatch/jobagents/github/config.go rename to apps/workspace-engine/pkg/jobagents/github/config.go diff --git a/apps/workspace-engine/svc/controllers/jobdispatch/jobagents/github/githubaction.go b/apps/workspace-engine/pkg/jobagents/github/githubaction.go similarity index 100% rename from apps/workspace-engine/svc/controllers/jobdispatch/jobagents/github/githubaction.go rename to apps/workspace-engine/pkg/jobagents/github/githubaction.go diff --git a/apps/workspace-engine/svc/controllers/jobdispatch/jobagents/github/githubaction_test.go b/apps/workspace-engine/pkg/jobagents/github/githubaction_test.go similarity index 100% rename from apps/workspace-engine/svc/controllers/jobdispatch/jobagents/github/githubaction_test.go rename to apps/workspace-engine/pkg/jobagents/github/githubaction_test.go diff --git a/apps/workspace-engine/svc/controllers/jobdispatch/jobagents/github/workflow_dispatcher.go b/apps/workspace-engine/pkg/jobagents/github/workflow_dispatcher.go similarity index 100% rename from apps/workspace-engine/svc/controllers/jobdispatch/jobagents/github/workflow_dispatcher.go rename to apps/workspace-engine/pkg/jobagents/github/workflow_dispatcher.go diff --git a/apps/workspace-engine/svc/controllers/jobdispatch/jobagents/registry.go b/apps/workspace-engine/pkg/jobagents/registry.go similarity index 97% rename from apps/workspace-engine/svc/controllers/jobdispatch/jobagents/registry.go rename to apps/workspace-engine/pkg/jobagents/registry.go index 146666bf0..3e6705dad 100644 --- a/apps/workspace-engine/svc/controllers/jobdispatch/jobagents/registry.go +++ b/apps/workspace-engine/pkg/jobagents/registry.go @@ -7,8 +7,8 @@ import ( "github.com/google/uuid" "workspace-engine/pkg/config" + "workspace-engine/pkg/jobagents/types" "workspace-engine/pkg/oapi" - "workspace-engine/svc/controllers/jobdispatch/jobagents/types" ) type Getter interface { diff --git a/apps/workspace-engine/svc/controllers/jobdispatch/jobagents/terraformcloud/config.go b/apps/workspace-engine/pkg/jobagents/terraformcloud/config.go similarity index 100% rename from apps/workspace-engine/svc/controllers/jobdispatch/jobagents/terraformcloud/config.go rename to apps/workspace-engine/pkg/jobagents/terraformcloud/config.go diff --git a/apps/workspace-engine/svc/controllers/jobdispatch/jobagents/terraformcloud/tfe.go b/apps/workspace-engine/pkg/jobagents/terraformcloud/tfe.go similarity index 98% rename from apps/workspace-engine/svc/controllers/jobdispatch/jobagents/terraformcloud/tfe.go rename to apps/workspace-engine/pkg/jobagents/terraformcloud/tfe.go index d2a9351c4..6308c22fb 100644 --- a/apps/workspace-engine/svc/controllers/jobdispatch/jobagents/terraformcloud/tfe.go +++ b/apps/workspace-engine/pkg/jobagents/terraformcloud/tfe.go @@ -6,8 +6,8 @@ import ( "os" "github.com/charmbracelet/log" + "workspace-engine/pkg/jobagents/types" "workspace-engine/pkg/oapi" - "workspace-engine/svc/controllers/jobdispatch/jobagents/types" ) var _ types.Dispatchable = (*TFE)(nil) diff --git a/apps/workspace-engine/svc/controllers/jobdispatch/jobagents/terraformcloud/tfe_test.go b/apps/workspace-engine/pkg/jobagents/terraformcloud/tfe_test.go similarity index 100% rename from apps/workspace-engine/svc/controllers/jobdispatch/jobagents/terraformcloud/tfe_test.go rename to apps/workspace-engine/pkg/jobagents/terraformcloud/tfe_test.go diff --git a/apps/workspace-engine/svc/controllers/jobdispatch/jobagents/terraformcloud/workspace.go b/apps/workspace-engine/pkg/jobagents/terraformcloud/workspace.go similarity index 100% rename from apps/workspace-engine/svc/controllers/jobdispatch/jobagents/terraformcloud/workspace.go rename to apps/workspace-engine/pkg/jobagents/terraformcloud/workspace.go diff --git a/apps/workspace-engine/svc/controllers/jobdispatch/jobagents/testrunner/testrunner.go b/apps/workspace-engine/pkg/jobagents/testrunner/testrunner.go similarity index 97% rename from apps/workspace-engine/svc/controllers/jobdispatch/jobagents/testrunner/testrunner.go rename to apps/workspace-engine/pkg/jobagents/testrunner/testrunner.go index 8a00073cf..5b2419759 100644 --- a/apps/workspace-engine/svc/controllers/jobdispatch/jobagents/testrunner/testrunner.go +++ b/apps/workspace-engine/pkg/jobagents/testrunner/testrunner.go @@ -6,8 +6,8 @@ import ( "fmt" "time" + "workspace-engine/pkg/jobagents/types" "workspace-engine/pkg/oapi" - "workspace-engine/svc/controllers/jobdispatch/jobagents/types" ) var _ types.Dispatchable = &TestRunner{} diff --git a/apps/workspace-engine/svc/controllers/jobdispatch/jobagents/testrunner/testrunner_test.go b/apps/workspace-engine/pkg/jobagents/testrunner/testrunner_test.go similarity index 100% rename from apps/workspace-engine/svc/controllers/jobdispatch/jobagents/testrunner/testrunner_test.go rename to apps/workspace-engine/pkg/jobagents/testrunner/testrunner_test.go diff --git a/apps/workspace-engine/svc/controllers/jobdispatch/jobagents/types/types.go b/apps/workspace-engine/pkg/jobagents/types/types.go similarity index 100% rename from apps/workspace-engine/svc/controllers/jobdispatch/jobagents/types/types.go rename to apps/workspace-engine/pkg/jobagents/types/types.go diff --git a/apps/workspace-engine/svc/controllers/deploymentplanresult/controller.go b/apps/workspace-engine/svc/controllers/deploymentplanresult/controller.go index ea11acf90..baaf00a60 100644 --- a/apps/workspace-engine/svc/controllers/deploymentplanresult/controller.go +++ b/apps/workspace-engine/svc/controllers/deploymentplanresult/controller.go @@ -15,12 +15,12 @@ import ( "go.opentelemetry.io/otel/codes" "workspace-engine/pkg/config" "workspace-engine/pkg/db" + "workspace-engine/pkg/jobagents" "workspace-engine/pkg/oapi" "workspace-engine/pkg/reconcile" "workspace-engine/pkg/reconcile/events" "workspace-engine/pkg/reconcile/postgres" "workspace-engine/svc" - "workspace-engine/svc/controllers/jobdispatch/jobagents" ) var tracer = otel.Tracer("workspace-engine/svc/controllers/deploymentplanresult") diff --git a/apps/workspace-engine/svc/controllers/deploymentplanresult/controller_test.go b/apps/workspace-engine/svc/controllers/deploymentplanresult/controller_test.go index 8c881715f..a4f77019a 100644 --- a/apps/workspace-engine/svc/controllers/deploymentplanresult/controller_test.go +++ b/apps/workspace-engine/svc/controllers/deploymentplanresult/controller_test.go @@ -12,10 +12,10 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "workspace-engine/pkg/db" + "workspace-engine/pkg/jobagents" + "workspace-engine/pkg/jobagents/types" "workspace-engine/pkg/oapi" "workspace-engine/pkg/reconcile" - "workspace-engine/svc/controllers/jobdispatch/jobagents" - "workspace-engine/svc/controllers/jobdispatch/jobagents/types" ) // --- mocks --- diff --git a/apps/workspace-engine/svc/controllers/deploymentplanresult/getters_postgres.go b/apps/workspace-engine/svc/controllers/deploymentplanresult/getters_postgres.go index a22347864..8938c44a1 100644 --- a/apps/workspace-engine/svc/controllers/deploymentplanresult/getters_postgres.go +++ b/apps/workspace-engine/svc/controllers/deploymentplanresult/getters_postgres.go @@ -5,9 +5,9 @@ import ( "github.com/google/uuid" "workspace-engine/pkg/db" - "workspace-engine/svc/controllers/jobdispatch/jobagents" - "workspace-engine/svc/controllers/jobdispatch/jobagents/argo" - "workspace-engine/svc/controllers/jobdispatch/jobagents/testrunner" + "workspace-engine/pkg/jobagents" + "workspace-engine/pkg/jobagents/argo" + "workspace-engine/pkg/jobagents/testrunner" ) type PostgresGetter struct{} diff --git a/apps/workspace-engine/svc/controllers/jobdispatch/controller.go b/apps/workspace-engine/svc/controllers/jobdispatch/controller.go index a0d524fc2..4eac2017c 100644 --- a/apps/workspace-engine/svc/controllers/jobdispatch/controller.go +++ b/apps/workspace-engine/svc/controllers/jobdispatch/controller.go @@ -12,15 +12,15 @@ import ( "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/codes" "workspace-engine/pkg/config" + "workspace-engine/pkg/jobagents" + "workspace-engine/pkg/jobagents/argo" + argoworkflow "workspace-engine/pkg/jobagents/argoworkflows" + "workspace-engine/pkg/jobagents/github" + "workspace-engine/pkg/jobagents/terraformcloud" + "workspace-engine/pkg/jobagents/testrunner" "workspace-engine/pkg/oapi" "workspace-engine/pkg/reconcile" "workspace-engine/pkg/reconcile/postgres" - "workspace-engine/svc/controllers/jobdispatch/jobagents" - "workspace-engine/svc/controllers/jobdispatch/jobagents/argo" - argoworkflow "workspace-engine/svc/controllers/jobdispatch/jobagents/argoworkflows" - "workspace-engine/svc/controllers/jobdispatch/jobagents/github" - "workspace-engine/svc/controllers/jobdispatch/jobagents/terraformcloud" - "workspace-engine/svc/controllers/jobdispatch/jobagents/testrunner" ) var ( diff --git a/apps/workspace-engine/svc/controllers/jobdispatch/getters_postgres.go b/apps/workspace-engine/svc/controllers/jobdispatch/getters_postgres.go index 65a8295e0..d3e1607ee 100644 --- a/apps/workspace-engine/svc/controllers/jobdispatch/getters_postgres.go +++ b/apps/workspace-engine/svc/controllers/jobdispatch/getters_postgres.go @@ -8,9 +8,9 @@ import ( "github.com/google/uuid" "github.com/jackc/pgx/v5" "workspace-engine/pkg/db" + "workspace-engine/pkg/jobagents" "workspace-engine/pkg/oapi" "workspace-engine/pkg/selector" - "workspace-engine/svc/controllers/jobdispatch/jobagents" ) var _ Getter = &PostgresGetter{} diff --git a/apps/workspace-engine/svc/controllers/jobdispatch/setters.go b/apps/workspace-engine/svc/controllers/jobdispatch/setters.go index e84a57a1e..cdf2623f7 100644 --- a/apps/workspace-engine/svc/controllers/jobdispatch/setters.go +++ b/apps/workspace-engine/svc/controllers/jobdispatch/setters.go @@ -3,10 +3,10 @@ package jobdispatch import ( "context" + "workspace-engine/pkg/jobagents/argo" + "workspace-engine/pkg/jobagents/github" + "workspace-engine/pkg/jobagents/testrunner" "workspace-engine/pkg/oapi" - "workspace-engine/svc/controllers/jobdispatch/jobagents/argo" - "workspace-engine/svc/controllers/jobdispatch/jobagents/github" - "workspace-engine/svc/controllers/jobdispatch/jobagents/testrunner" ) type Setter interface {