From 7ba7f9dec349afe0f571c1f0a470c8af7a0afbf2 Mon Sep 17 00:00:00 2001 From: Aditya Choudhari Date: Thu, 9 Apr 2026 09:58:24 -0700 Subject: [PATCH 1/2] refactor: extract job agents package out of controller package --- .../jobagents/argo/application_upserter.go | 0 .../jobagents/argo/argoapp_test.go | 0 .../jobdispatch => pkg}/jobagents/argo/argocd.go | 2 +- .../jobagents/argo/argocd_plan.go | 2 +- .../jobagents/argo/argocd_verification.go | 0 .../jobagents/argoworkflows/workflow.go | 2 +- .../jobagents/argoworkflows/workflow_submitter.go | 0 .../jobagents/argoworkflows/workflow_test.go | 2 +- .../jobdispatch => pkg}/jobagents/github/config.go | 0 .../jobagents/github/githubaction.go | 0 .../jobagents/github/githubaction_test.go | 0 .../jobagents/github/workflow_dispatcher.go | 0 .../jobdispatch => pkg}/jobagents/registry.go | 2 +- .../jobagents/terraformcloud/config.go | 0 .../jobagents/terraformcloud/tfe.go | 2 +- .../jobagents/terraformcloud/tfe_test.go | 0 .../jobagents/terraformcloud/workspace.go | 0 .../jobagents/testrunner/testrunner.go | 2 +- .../jobagents/testrunner/testrunner_test.go | 0 .../jobdispatch => pkg}/jobagents/types/types.go | 0 .../controllers/deploymentplanresult/controller.go | 2 +- .../deploymentplanresult/controller_test.go | 4 ++-- .../deploymentplanresult/getters_postgres.go | 6 +++--- .../svc/controllers/jobdispatch/controller.go | 12 ++++++------ .../svc/controllers/jobdispatch/getters_postgres.go | 2 +- .../svc/controllers/jobdispatch/setters.go | 6 +++--- 26 files changed, 23 insertions(+), 23 deletions(-) rename apps/workspace-engine/{svc/controllers/jobdispatch => pkg}/jobagents/argo/application_upserter.go (100%) rename apps/workspace-engine/{svc/controllers/jobdispatch => pkg}/jobagents/argo/argoapp_test.go (100%) rename apps/workspace-engine/{svc/controllers/jobdispatch => pkg}/jobagents/argo/argocd.go (98%) rename apps/workspace-engine/{svc/controllers/jobdispatch => pkg}/jobagents/argo/argocd_plan.go (98%) rename apps/workspace-engine/{svc/controllers/jobdispatch => pkg}/jobagents/argo/argocd_verification.go (100%) rename apps/workspace-engine/{svc/controllers/jobdispatch => pkg}/jobagents/argoworkflows/workflow.go (98%) rename apps/workspace-engine/{svc/controllers/jobdispatch => pkg}/jobagents/argoworkflows/workflow_submitter.go (100%) rename apps/workspace-engine/{svc/controllers/jobdispatch => pkg}/jobagents/argoworkflows/workflow_test.go (99%) rename apps/workspace-engine/{svc/controllers/jobdispatch => pkg}/jobagents/github/config.go (100%) rename apps/workspace-engine/{svc/controllers/jobdispatch => pkg}/jobagents/github/githubaction.go (100%) rename apps/workspace-engine/{svc/controllers/jobdispatch => pkg}/jobagents/github/githubaction_test.go (100%) rename apps/workspace-engine/{svc/controllers/jobdispatch => pkg}/jobagents/github/workflow_dispatcher.go (100%) rename apps/workspace-engine/{svc/controllers/jobdispatch => pkg}/jobagents/registry.go (97%) rename apps/workspace-engine/{svc/controllers/jobdispatch => pkg}/jobagents/terraformcloud/config.go (100%) rename apps/workspace-engine/{svc/controllers/jobdispatch => pkg}/jobagents/terraformcloud/tfe.go (98%) rename apps/workspace-engine/{svc/controllers/jobdispatch => pkg}/jobagents/terraformcloud/tfe_test.go (100%) rename apps/workspace-engine/{svc/controllers/jobdispatch => pkg}/jobagents/terraformcloud/workspace.go (100%) rename apps/workspace-engine/{svc/controllers/jobdispatch => pkg}/jobagents/testrunner/testrunner.go (97%) rename apps/workspace-engine/{svc/controllers/jobdispatch => pkg}/jobagents/testrunner/testrunner_test.go (100%) rename apps/workspace-engine/{svc/controllers/jobdispatch => pkg}/jobagents/types/types.go (100%) 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 43154acaf2..8d86b2d5f1 100644 --- a/apps/workspace-engine/svc/controllers/jobdispatch/jobagents/argo/argocd.go +++ b/apps/workspace-engine/pkg/jobagents/argo/argocd.go @@ -14,7 +14,7 @@ import ( "go.opentelemetry.io/otel/trace" "workspace-engine/pkg/oapi" "workspace-engine/pkg/templatefuncs" - "workspace-engine/svc/controllers/jobdispatch/jobagents/types" + "workspace-engine/pkg/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 0391446d10..4f60c965b0 100644 --- a/apps/workspace-engine/svc/controllers/jobdispatch/jobagents/argo/argocd_plan.go +++ b/apps/workspace-engine/pkg/jobagents/argo/argocd_plan.go @@ -13,7 +13,7 @@ import ( "github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1" "github.com/charmbracelet/log" "workspace-engine/pkg/oapi" - "workspace-engine/svc/controllers/jobdispatch/jobagents/types" + "workspace-engine/pkg/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 426776efb5..52d7ae8c56 100644 --- a/apps/workspace-engine/svc/controllers/jobdispatch/jobagents/argoworkflows/workflow.go +++ b/apps/workspace-engine/pkg/jobagents/argoworkflows/workflow.go @@ -13,7 +13,7 @@ import ( "go.opentelemetry.io/otel/trace" "workspace-engine/pkg/oapi" "workspace-engine/pkg/templatefuncs" - "workspace-engine/svc/controllers/jobdispatch/jobagents/types" + "workspace-engine/pkg/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 e3fcda581f..489f43e50f 100644 --- a/apps/workspace-engine/svc/controllers/jobdispatch/jobagents/argoworkflows/workflow_test.go +++ b/apps/workspace-engine/pkg/jobagents/argoworkflows/workflow_test.go @@ -12,7 +12,7 @@ import ( "github.com/stretchr/testify/require" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "workspace-engine/pkg/oapi" - argo_workflows "workspace-engine/svc/controllers/jobdispatch/jobagents/argoworkflows" + argo_workflows "workspace-engine/pkg/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 146666bf0d..585713bfc9 100644 --- a/apps/workspace-engine/svc/controllers/jobdispatch/jobagents/registry.go +++ b/apps/workspace-engine/pkg/jobagents/registry.go @@ -8,7 +8,7 @@ import ( "github.com/google/uuid" "workspace-engine/pkg/config" "workspace-engine/pkg/oapi" - "workspace-engine/svc/controllers/jobdispatch/jobagents/types" + "workspace-engine/pkg/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 d2a9351c4d..7778511caf 100644 --- a/apps/workspace-engine/svc/controllers/jobdispatch/jobagents/terraformcloud/tfe.go +++ b/apps/workspace-engine/pkg/jobagents/terraformcloud/tfe.go @@ -7,7 +7,7 @@ import ( "github.com/charmbracelet/log" "workspace-engine/pkg/oapi" - "workspace-engine/svc/controllers/jobdispatch/jobagents/types" + "workspace-engine/pkg/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 8a00073cf0..a0c69e51f5 100644 --- a/apps/workspace-engine/svc/controllers/jobdispatch/jobagents/testrunner/testrunner.go +++ b/apps/workspace-engine/pkg/jobagents/testrunner/testrunner.go @@ -7,7 +7,7 @@ import ( "time" "workspace-engine/pkg/oapi" - "workspace-engine/svc/controllers/jobdispatch/jobagents/types" + "workspace-engine/pkg/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 ea11acf90c..edb12c0cb8 100644 --- a/apps/workspace-engine/svc/controllers/deploymentplanresult/controller.go +++ b/apps/workspace-engine/svc/controllers/deploymentplanresult/controller.go @@ -20,7 +20,7 @@ import ( "workspace-engine/pkg/reconcile/events" "workspace-engine/pkg/reconcile/postgres" "workspace-engine/svc" - "workspace-engine/svc/controllers/jobdispatch/jobagents" + "workspace-engine/pkg/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 8c881715f2..1faad6143c 100644 --- a/apps/workspace-engine/svc/controllers/deploymentplanresult/controller_test.go +++ b/apps/workspace-engine/svc/controllers/deploymentplanresult/controller_test.go @@ -14,8 +14,8 @@ import ( "workspace-engine/pkg/db" "workspace-engine/pkg/oapi" "workspace-engine/pkg/reconcile" - "workspace-engine/svc/controllers/jobdispatch/jobagents" - "workspace-engine/svc/controllers/jobdispatch/jobagents/types" + "workspace-engine/pkg/jobagents" + "workspace-engine/pkg/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 a223478647..8938c44a15 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 a0d524fc2b..e01c64a61f 100644 --- a/apps/workspace-engine/svc/controllers/jobdispatch/controller.go +++ b/apps/workspace-engine/svc/controllers/jobdispatch/controller.go @@ -15,12 +15,12 @@ import ( "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" + "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" ) var ( diff --git a/apps/workspace-engine/svc/controllers/jobdispatch/getters_postgres.go b/apps/workspace-engine/svc/controllers/jobdispatch/getters_postgres.go index 65a8295e04..d235586821 100644 --- a/apps/workspace-engine/svc/controllers/jobdispatch/getters_postgres.go +++ b/apps/workspace-engine/svc/controllers/jobdispatch/getters_postgres.go @@ -10,7 +10,7 @@ import ( "workspace-engine/pkg/db" "workspace-engine/pkg/oapi" "workspace-engine/pkg/selector" - "workspace-engine/svc/controllers/jobdispatch/jobagents" + "workspace-engine/pkg/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 e84a57a1e8..82a2592206 100644 --- a/apps/workspace-engine/svc/controllers/jobdispatch/setters.go +++ b/apps/workspace-engine/svc/controllers/jobdispatch/setters.go @@ -4,9 +4,9 @@ import ( "context" "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" + "workspace-engine/pkg/jobagents/argo" + "workspace-engine/pkg/jobagents/github" + "workspace-engine/pkg/jobagents/testrunner" ) type Setter interface { From e09c6ceedeb4f370e514e3211efc975824ee2fda Mon Sep 17 00:00:00 2001 From: Aditya Choudhari Date: Thu, 9 Apr 2026 10:10:50 -0700 Subject: [PATCH 2/2] fmt --- apps/workspace-engine/pkg/jobagents/argo/argocd.go | 2 +- apps/workspace-engine/pkg/jobagents/argo/argocd_plan.go | 2 +- .../pkg/jobagents/argoworkflows/workflow.go | 2 +- .../pkg/jobagents/argoworkflows/workflow_test.go | 2 +- apps/workspace-engine/pkg/jobagents/registry.go | 2 +- apps/workspace-engine/pkg/jobagents/terraformcloud/tfe.go | 2 +- .../workspace-engine/pkg/jobagents/testrunner/testrunner.go | 2 +- .../svc/controllers/deploymentplanresult/controller.go | 2 +- .../svc/controllers/deploymentplanresult/controller_test.go | 4 ++-- .../svc/controllers/jobdispatch/controller.go | 6 +++--- .../svc/controllers/jobdispatch/getters_postgres.go | 2 +- .../workspace-engine/svc/controllers/jobdispatch/setters.go | 2 +- 12 files changed, 15 insertions(+), 15 deletions(-) diff --git a/apps/workspace-engine/pkg/jobagents/argo/argocd.go b/apps/workspace-engine/pkg/jobagents/argo/argocd.go index 8d86b2d5f1..2a5a42c7be 100644 --- a/apps/workspace-engine/pkg/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/pkg/jobagents/types" ) var tracer = otel.Tracer("workspace-engine/jobagents/argo") diff --git a/apps/workspace-engine/pkg/jobagents/argo/argocd_plan.go b/apps/workspace-engine/pkg/jobagents/argo/argocd_plan.go index 4f60c965b0..d6fcec7f5f 100644 --- a/apps/workspace-engine/pkg/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/oapi" "workspace-engine/pkg/jobagents/types" + "workspace-engine/pkg/oapi" ) const ( diff --git a/apps/workspace-engine/pkg/jobagents/argoworkflows/workflow.go b/apps/workspace-engine/pkg/jobagents/argoworkflows/workflow.go index 52d7ae8c56..1b93856e5e 100644 --- a/apps/workspace-engine/pkg/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/pkg/jobagents/types" ) var tracer = otel.Tracer("workspace-engine/jobagents/argo-workflow") diff --git a/apps/workspace-engine/pkg/jobagents/argoworkflows/workflow_test.go b/apps/workspace-engine/pkg/jobagents/argoworkflows/workflow_test.go index 489f43e50f..ff5babb6a9 100644 --- a/apps/workspace-engine/pkg/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" - "workspace-engine/pkg/oapi" argo_workflows "workspace-engine/pkg/jobagents/argoworkflows" + "workspace-engine/pkg/oapi" ) // ----- Mocks ----- diff --git a/apps/workspace-engine/pkg/jobagents/registry.go b/apps/workspace-engine/pkg/jobagents/registry.go index 585713bfc9..3e6705dad3 100644 --- a/apps/workspace-engine/pkg/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/oapi" "workspace-engine/pkg/jobagents/types" + "workspace-engine/pkg/oapi" ) type Getter interface { diff --git a/apps/workspace-engine/pkg/jobagents/terraformcloud/tfe.go b/apps/workspace-engine/pkg/jobagents/terraformcloud/tfe.go index 7778511caf..6308c22fbf 100644 --- a/apps/workspace-engine/pkg/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/oapi" "workspace-engine/pkg/jobagents/types" + "workspace-engine/pkg/oapi" ) var _ types.Dispatchable = (*TFE)(nil) diff --git a/apps/workspace-engine/pkg/jobagents/testrunner/testrunner.go b/apps/workspace-engine/pkg/jobagents/testrunner/testrunner.go index a0c69e51f5..5b2419759d 100644 --- a/apps/workspace-engine/pkg/jobagents/testrunner/testrunner.go +++ b/apps/workspace-engine/pkg/jobagents/testrunner/testrunner.go @@ -6,8 +6,8 @@ import ( "fmt" "time" - "workspace-engine/pkg/oapi" "workspace-engine/pkg/jobagents/types" + "workspace-engine/pkg/oapi" ) var _ types.Dispatchable = &TestRunner{} diff --git a/apps/workspace-engine/svc/controllers/deploymentplanresult/controller.go b/apps/workspace-engine/svc/controllers/deploymentplanresult/controller.go index edb12c0cb8..baaf00a600 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/pkg/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 1faad6143c..a4f77019ac 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/oapi" - "workspace-engine/pkg/reconcile" "workspace-engine/pkg/jobagents" "workspace-engine/pkg/jobagents/types" + "workspace-engine/pkg/oapi" + "workspace-engine/pkg/reconcile" ) // --- mocks --- diff --git a/apps/workspace-engine/svc/controllers/jobdispatch/controller.go b/apps/workspace-engine/svc/controllers/jobdispatch/controller.go index e01c64a61f..4eac2017c4 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/oapi" - "workspace-engine/pkg/reconcile" - "workspace-engine/pkg/reconcile/postgres" "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" ) var ( diff --git a/apps/workspace-engine/svc/controllers/jobdispatch/getters_postgres.go b/apps/workspace-engine/svc/controllers/jobdispatch/getters_postgres.go index d235586821..d3e1607ee3 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/pkg/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 82a2592206..cdf2623f71 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/oapi" "workspace-engine/pkg/jobagents/argo" "workspace-engine/pkg/jobagents/github" "workspace-engine/pkg/jobagents/testrunner" + "workspace-engine/pkg/oapi" ) type Setter interface {