From 1994a1bce5043b11812e81b24f6028a8eedca8d0 Mon Sep 17 00:00:00 2001 From: Chris Martin Date: Mon, 5 Aug 2024 12:31:18 +0100 Subject: [PATCH] rename armada package to server (#3865) Signed-off-by: Chris Martin Co-authored-by: Chris Martin --- cmd/armada/main.go | 6 +++--- cmd/lookoutv2/main.go | 2 +- internal/binoculars/service/cordon.go | 2 +- internal/common/auth/authorization_test.go | 2 +- internal/common/database/db_testutil.go | 2 +- internal/common/database/functions.go | 2 +- internal/common/ingest/ingestion_pipeline.go | 2 +- internal/common/ingest/ingestion_pipeline_test.go | 2 +- internal/common/ingest/testfixtures/event.go | 2 +- internal/common/pulsarutils/pulsarclient.go | 2 +- internal/common/pulsarutils/pulsarclient_test.go | 2 +- internal/eventingester/configuration/types.go | 2 +- internal/lookoutingesterv2/configuration/types.go | 2 +- internal/lookoutv2/configuration/types.go | 2 +- internal/scheduler/configuration/configuration.go | 2 +- internal/scheduler/context/job.go | 2 +- internal/scheduler/queue_scheduler_test.go | 2 +- internal/scheduler/scheduler.go | 2 +- internal/scheduler/scheduler_test.go | 2 +- internal/scheduler/testfixtures/testfixtures.go | 2 +- internal/scheduleringester/config.go | 2 +- internal/scheduleringester/instructions.go | 2 +- internal/scheduleringester/instructions_test.go | 2 +- .../{armada => server}/configuration/constants.go | 0 internal/{armada => server}/configuration/types.go | 0 .../event/conversion/conversions.go | 0 .../event/conversion/conversions_test.go | 0 internal/{armada => server}/event/event.go | 6 +++--- .../{armada => server}/event/event_repository.go | 4 ++-- .../event/event_repository_test.go | 2 +- internal/{armada => server}/event/event_test.go | 4 ++-- .../{armada => server}/event/sequence/sequence.go | 0 .../event/sequence/sequence_test.go | 0 internal/{armada => server}/mocks/generate.go | 0 internal/{armada => server}/mocks/mock_authorizer.go | 0 .../{armada => server}/mocks/mock_deduplicator.go | 0 internal/{armada => server}/mocks/mock_repository.go | 0 .../{armada => server}/permissions/permissions.go | 0 internal/{armada => server}/queryapi/database/db.go | 0 .../{armada => server}/queryapi/database/models.go | 0 .../{armada => server}/queryapi/database/query.sql | 0 .../queryapi/database/query.sql.go | 0 .../{armada => server}/queryapi/database/sql.yaml | 0 internal/{armada => server}/queryapi/query_api.go | 2 +- .../{armada => server}/queryapi/query_api_test.go | 2 +- internal/{armada => server}/queryapi/util.go | 0 internal/{armada => server}/queue/queue_cache.go | 0 .../{armada => server}/queue/queue_cache_test.go | 2 +- .../{armada => server}/queue/queue_repository.go | 0 .../queue/queue_repository_test.go | 0 internal/{armada => server}/queue/queue_service.go | 2 +- internal/{armada => server}/server.go | 12 ++++++------ .../submit/conversion/conversions.go | 2 +- .../submit/conversion/conversions_test.go | 2 +- .../submit/conversion/post_process.go | 2 +- .../submit/conversion/post_process_test.go | 2 +- .../{armada => server}/submit/deduplication_test.go | 0 internal/{armada => server}/submit/deduplicaton.go | 0 internal/{armada => server}/submit/submit.go | 10 +++++----- internal/{armada => server}/submit/submit_test.go | 6 +++--- .../submit/testfixtures/test_fixtures.go | 2 +- .../{armada => server}/submit/validation/job_set.go | 0 .../submit/validation/job_set_test.go | 0 .../submit/validation/submit_request.go | 2 +- .../submit/validation/submit_request_test.go | 2 +- 65 files changed, 58 insertions(+), 58 deletions(-) rename internal/{armada => server}/configuration/constants.go (100%) rename internal/{armada => server}/configuration/types.go (100%) rename internal/{armada => server}/event/conversion/conversions.go (100%) rename internal/{armada => server}/event/conversion/conversions_test.go (100%) rename internal/{armada => server}/event/event.go (96%) rename internal/{armada => server}/event/event_repository.go (97%) rename internal/{armada => server}/event/event_repository_test.go (99%) rename internal/{armada => server}/event/event_test.go (99%) rename internal/{armada => server}/event/sequence/sequence.go (100%) rename internal/{armada => server}/event/sequence/sequence_test.go (100%) rename internal/{armada => server}/mocks/generate.go (100%) rename internal/{armada => server}/mocks/mock_authorizer.go (100%) rename internal/{armada => server}/mocks/mock_deduplicator.go (100%) rename internal/{armada => server}/mocks/mock_repository.go (100%) rename internal/{armada => server}/permissions/permissions.go (100%) rename internal/{armada => server}/queryapi/database/db.go (100%) rename internal/{armada => server}/queryapi/database/models.go (100%) rename internal/{armada => server}/queryapi/database/query.sql (100%) rename internal/{armada => server}/queryapi/database/query.sql.go (100%) rename internal/{armada => server}/queryapi/database/sql.yaml (100%) rename internal/{armada => server}/queryapi/query_api.go (99%) rename internal/{armada => server}/queryapi/query_api_test.go (99%) rename internal/{armada => server}/queryapi/util.go (100%) rename internal/{armada => server}/queue/queue_cache.go (100%) rename internal/{armada => server}/queue/queue_cache_test.go (96%) rename internal/{armada => server}/queue/queue_repository.go (100%) rename internal/{armada => server}/queue/queue_repository_test.go (100%) rename internal/{armada => server}/queue/queue_service.go (99%) rename internal/{armada => server}/server.go (96%) rename internal/{armada => server}/submit/conversion/conversions.go (99%) rename internal/{armada => server}/submit/conversion/conversions_test.go (99%) rename internal/{armada => server}/submit/conversion/post_process.go (99%) rename internal/{armada => server}/submit/conversion/post_process_test.go (99%) rename internal/{armada => server}/submit/deduplication_test.go (100%) rename internal/{armada => server}/submit/deduplicaton.go (100%) rename internal/{armada => server}/submit/submit.go (98%) rename internal/{armada => server}/submit/submit_test.go (98%) rename internal/{armada => server}/submit/testfixtures/test_fixtures.go (99%) rename internal/{armada => server}/submit/validation/job_set.go (100%) rename internal/{armada => server}/submit/validation/job_set_test.go (100%) rename internal/{armada => server}/submit/validation/submit_request.go (99%) rename internal/{armada => server}/submit/validation/submit_request_test.go (99%) diff --git a/cmd/armada/main.go b/cmd/armada/main.go index bfb884d9908..128538a9a68 100644 --- a/cmd/armada/main.go +++ b/cmd/armada/main.go @@ -12,14 +12,14 @@ import ( "github.com/spf13/pflag" "github.com/spf13/viper" - "github.com/armadaproject/armada/internal/armada" - "github.com/armadaproject/armada/internal/armada/configuration" "github.com/armadaproject/armada/internal/common" "github.com/armadaproject/armada/internal/common/armadacontext" gateway "github.com/armadaproject/armada/internal/common/grpc" "github.com/armadaproject/armada/internal/common/health" "github.com/armadaproject/armada/internal/common/logging" "github.com/armadaproject/armada/internal/common/profiling" + "github.com/armadaproject/armada/internal/server" + "github.com/armadaproject/armada/internal/server/configuration" "github.com/armadaproject/armada/pkg/api" ) @@ -107,7 +107,7 @@ func main() { // Start Armada server g.Go(func() error { - return armada.Serve(ctx, &config, healthChecks) + return server.Serve(ctx, &config, healthChecks) }) // Assume the server is ready if there are no errors within 10 seconds. diff --git a/cmd/lookoutv2/main.go b/cmd/lookoutv2/main.go index 0f6fa3ec7bc..8582d69536d 100644 --- a/cmd/lookoutv2/main.go +++ b/cmd/lookoutv2/main.go @@ -10,7 +10,6 @@ import ( "github.com/spf13/viper" "k8s.io/utils/clock" - armada_config "github.com/armadaproject/armada/internal/armada/configuration" "github.com/armadaproject/armada/internal/common" "github.com/armadaproject/armada/internal/common/armadacontext" "github.com/armadaproject/armada/internal/common/database" @@ -20,6 +19,7 @@ import ( "github.com/armadaproject/armada/internal/lookoutv2/gen/restapi" "github.com/armadaproject/armada/internal/lookoutv2/pruner" "github.com/armadaproject/armada/internal/lookoutv2/schema" + armada_config "github.com/armadaproject/armada/internal/server/configuration" ) const ( diff --git a/internal/binoculars/service/cordon.go b/internal/binoculars/service/cordon.go index 9456c3cf878..4cb076119d7 100644 --- a/internal/binoculars/service/cordon.go +++ b/internal/binoculars/service/cordon.go @@ -11,12 +11,12 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - "github.com/armadaproject/armada/internal/armada/permissions" "github.com/armadaproject/armada/internal/binoculars/configuration" "github.com/armadaproject/armada/internal/common/armadacontext" "github.com/armadaproject/armada/internal/common/auth" "github.com/armadaproject/armada/internal/common/auth/permission" "github.com/armadaproject/armada/internal/common/cluster" + "github.com/armadaproject/armada/internal/server/permissions" "github.com/armadaproject/armada/pkg/api/binoculars" ) diff --git a/internal/common/auth/authorization_test.go b/internal/common/auth/authorization_test.go index 9d7b26faa02..04c4a241548 100644 --- a/internal/common/auth/authorization_test.go +++ b/internal/common/auth/authorization_test.go @@ -6,10 +6,10 @@ import ( "github.com/stretchr/testify/assert" - "github.com/armadaproject/armada/internal/armada/permissions" "github.com/armadaproject/armada/internal/common/armadacontext" "github.com/armadaproject/armada/internal/common/armadaerrors" "github.com/armadaproject/armada/internal/common/auth/permission" + "github.com/armadaproject/armada/internal/server/permissions" "github.com/armadaproject/armada/pkg/client/queue" ) diff --git a/internal/common/database/db_testutil.go b/internal/common/database/db_testutil.go index 9b228cb144a..194e21ffbe3 100644 --- a/internal/common/database/db_testutil.go +++ b/internal/common/database/db_testutil.go @@ -8,9 +8,9 @@ import ( _ "github.com/jackc/pgx/v5/stdlib" "github.com/pkg/errors" - "github.com/armadaproject/armada/internal/armada/configuration" "github.com/armadaproject/armada/internal/common/armadacontext" "github.com/armadaproject/armada/internal/common/util" + "github.com/armadaproject/armada/internal/server/configuration" ) // WithTestDb spins up a Postgres database for testing diff --git a/internal/common/database/functions.go b/internal/common/database/functions.go index 17f3334efab..0aeb68da833 100644 --- a/internal/common/database/functions.go +++ b/internal/common/database/functions.go @@ -11,8 +11,8 @@ import ( "github.com/jackc/pgx/v5/pgxpool" "github.com/pkg/errors" - "github.com/armadaproject/armada/internal/armada/configuration" "github.com/armadaproject/armada/internal/common/armadacontext" + "github.com/armadaproject/armada/internal/server/configuration" ) func CreateConnectionString(values map[string]string) string { diff --git a/internal/common/ingest/ingestion_pipeline.go b/internal/common/ingest/ingestion_pipeline.go index 792f5bc303f..110db617882 100644 --- a/internal/common/ingest/ingestion_pipeline.go +++ b/internal/common/ingest/ingestion_pipeline.go @@ -9,7 +9,6 @@ import ( "github.com/pkg/errors" log "github.com/sirupsen/logrus" - "github.com/armadaproject/armada/internal/armada/configuration" "github.com/armadaproject/armada/internal/common" "github.com/armadaproject/armada/internal/common/armadacontext" "github.com/armadaproject/armada/internal/common/eventutil" @@ -17,6 +16,7 @@ import ( protoutil "github.com/armadaproject/armada/internal/common/proto" "github.com/armadaproject/armada/internal/common/pulsarutils" "github.com/armadaproject/armada/internal/common/util" + "github.com/armadaproject/armada/internal/server/configuration" "github.com/armadaproject/armada/pkg/armadaevents" ) diff --git a/internal/common/ingest/ingestion_pipeline_test.go b/internal/common/ingest/ingestion_pipeline_test.go index 322ad440baa..70952dec47e 100644 --- a/internal/common/ingest/ingestion_pipeline_test.go +++ b/internal/common/ingest/ingestion_pipeline_test.go @@ -9,11 +9,11 @@ import ( "github.com/google/uuid" "github.com/stretchr/testify/assert" - "github.com/armadaproject/armada/internal/armada/configuration" "github.com/armadaproject/armada/internal/common/armadacontext" "github.com/armadaproject/armada/internal/common/ingest/metrics" protoutil "github.com/armadaproject/armada/internal/common/proto" "github.com/armadaproject/armada/internal/common/pulsarutils" + "github.com/armadaproject/armada/internal/server/configuration" "github.com/armadaproject/armada/pkg/armadaevents" ) diff --git a/internal/common/ingest/testfixtures/event.go b/internal/common/ingest/testfixtures/event.go index 1a2636bb60b..13e6df0818a 100644 --- a/internal/common/ingest/testfixtures/event.go +++ b/internal/common/ingest/testfixtures/event.go @@ -8,10 +8,10 @@ import ( v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" - "github.com/armadaproject/armada/internal/armada/configuration" protoutil "github.com/armadaproject/armada/internal/common/proto" "github.com/armadaproject/armada/internal/scheduler/schedulerobjects" "github.com/armadaproject/armada/internal/scheduler/testfixtures" + "github.com/armadaproject/armada/internal/server/configuration" "github.com/armadaproject/armada/pkg/armadaevents" ) diff --git a/internal/common/pulsarutils/pulsarclient.go b/internal/common/pulsarutils/pulsarclient.go index 8f6ba0ea1e9..dba9a0b066f 100644 --- a/internal/common/pulsarutils/pulsarclient.go +++ b/internal/common/pulsarutils/pulsarclient.go @@ -6,8 +6,8 @@ import ( "github.com/apache/pulsar-client-go/pulsar" "github.com/pkg/errors" - "github.com/armadaproject/armada/internal/armada/configuration" "github.com/armadaproject/armada/internal/common/armadaerrors" + "github.com/armadaproject/armada/internal/server/configuration" ) func NewPulsarClient(config *configuration.PulsarConfig) (pulsar.Client, error) { diff --git a/internal/common/pulsarutils/pulsarclient_test.go b/internal/common/pulsarutils/pulsarclient_test.go index bc5b1598eda..445c5eb2861 100644 --- a/internal/common/pulsarutils/pulsarclient_test.go +++ b/internal/common/pulsarutils/pulsarclient_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/armadaproject/armada/internal/armada/configuration" + "github.com/armadaproject/armada/internal/server/configuration" ) func TestCreatePulsarClientHappyPath(t *testing.T) { diff --git a/internal/eventingester/configuration/types.go b/internal/eventingester/configuration/types.go index 7a660838b63..65dc1390d8b 100644 --- a/internal/eventingester/configuration/types.go +++ b/internal/eventingester/configuration/types.go @@ -5,8 +5,8 @@ import ( "github.com/redis/go-redis/v9" - "github.com/armadaproject/armada/internal/armada/configuration" profilingconfig "github.com/armadaproject/armada/internal/common/profiling/configuration" + "github.com/armadaproject/armada/internal/server/configuration" ) type EventIngesterConfiguration struct { diff --git a/internal/lookoutingesterv2/configuration/types.go b/internal/lookoutingesterv2/configuration/types.go index 0efbbc9a165..6857f81734c 100644 --- a/internal/lookoutingesterv2/configuration/types.go +++ b/internal/lookoutingesterv2/configuration/types.go @@ -3,8 +3,8 @@ package configuration import ( "time" - "github.com/armadaproject/armada/internal/armada/configuration" profilingconfig "github.com/armadaproject/armada/internal/common/profiling/configuration" + "github.com/armadaproject/armada/internal/server/configuration" ) type LookoutIngesterV2Configuration struct { diff --git a/internal/lookoutv2/configuration/types.go b/internal/lookoutv2/configuration/types.go index a4bb462df39..fa4d399f166 100644 --- a/internal/lookoutv2/configuration/types.go +++ b/internal/lookoutv2/configuration/types.go @@ -3,8 +3,8 @@ package configuration import ( "time" - "github.com/armadaproject/armada/internal/armada/configuration" profilingconfig "github.com/armadaproject/armada/internal/common/profiling/configuration" + "github.com/armadaproject/armada/internal/server/configuration" ) type LookoutV2Config struct { diff --git a/internal/scheduler/configuration/configuration.go b/internal/scheduler/configuration/configuration.go index 0b1589a54da..98fada635aa 100644 --- a/internal/scheduler/configuration/configuration.go +++ b/internal/scheduler/configuration/configuration.go @@ -8,11 +8,11 @@ import ( v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" - "github.com/armadaproject/armada/internal/armada/configuration" authconfig "github.com/armadaproject/armada/internal/common/auth/configuration" grpcconfig "github.com/armadaproject/armada/internal/common/grpc/configuration" profilingconfig "github.com/armadaproject/armada/internal/common/profiling/configuration" "github.com/armadaproject/armada/internal/common/types" + "github.com/armadaproject/armada/internal/server/configuration" "github.com/armadaproject/armada/pkg/client" ) diff --git a/internal/scheduler/context/job.go b/internal/scheduler/context/job.go index 1fc3a06097f..8e5342ba5c7 100644 --- a/internal/scheduler/context/job.go +++ b/internal/scheduler/context/job.go @@ -11,12 +11,12 @@ import ( "github.com/sirupsen/logrus" v1 "k8s.io/api/core/v1" - "github.com/armadaproject/armada/internal/armada/configuration" schedulerconfig "github.com/armadaproject/armada/internal/scheduler/configuration" "github.com/armadaproject/armada/internal/scheduler/interfaces" "github.com/armadaproject/armada/internal/scheduler/internaltypes" "github.com/armadaproject/armada/internal/scheduler/jobdb" "github.com/armadaproject/armada/internal/scheduler/schedulerobjects" + "github.com/armadaproject/armada/internal/server/configuration" ) // JobSchedulingContext is created by the scheduler and contains information diff --git a/internal/scheduler/queue_scheduler_test.go b/internal/scheduler/queue_scheduler_test.go index f4bc44e3a70..050fd2a97ee 100644 --- a/internal/scheduler/queue_scheduler_test.go +++ b/internal/scheduler/queue_scheduler_test.go @@ -12,7 +12,6 @@ import ( v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" - armadaconfiguration "github.com/armadaproject/armada/internal/armada/configuration" "github.com/armadaproject/armada/internal/common/armadacontext" armadaslices "github.com/armadaproject/armada/internal/common/slices" "github.com/armadaproject/armada/internal/common/stringinterner" @@ -24,6 +23,7 @@ import ( "github.com/armadaproject/armada/internal/scheduler/nodedb" "github.com/armadaproject/armada/internal/scheduler/schedulerobjects" "github.com/armadaproject/armada/internal/scheduler/testfixtures" + armadaconfiguration "github.com/armadaproject/armada/internal/server/configuration" "github.com/armadaproject/armada/pkg/api" ) diff --git a/internal/scheduler/scheduler.go b/internal/scheduler/scheduler.go index e1ff9ea01de..02589ede2b7 100644 --- a/internal/scheduler/scheduler.go +++ b/internal/scheduler/scheduler.go @@ -13,7 +13,6 @@ import ( v1 "k8s.io/api/core/v1" "k8s.io/utils/clock" - "github.com/armadaproject/armada/internal/armada/configuration" "github.com/armadaproject/armada/internal/common/armadacontext" "github.com/armadaproject/armada/internal/common/logging" protoutil "github.com/armadaproject/armada/internal/common/proto" @@ -24,6 +23,7 @@ import ( "github.com/armadaproject/armada/internal/scheduler/leader" "github.com/armadaproject/armada/internal/scheduler/metrics" "github.com/armadaproject/armada/internal/scheduler/schedulerobjects" + "github.com/armadaproject/armada/internal/server/configuration" "github.com/armadaproject/armada/pkg/armadaevents" ) diff --git a/internal/scheduler/scheduler_test.go b/internal/scheduler/scheduler_test.go index d4b9de21097..2322e7981a8 100644 --- a/internal/scheduler/scheduler_test.go +++ b/internal/scheduler/scheduler_test.go @@ -17,7 +17,6 @@ import ( clock "k8s.io/utils/clock/testing" "k8s.io/utils/pointer" - apiconfig "github.com/armadaproject/armada/internal/armada/configuration" "github.com/armadaproject/armada/internal/common/armadacontext" "github.com/armadaproject/armada/internal/common/ingest" protoutil "github.com/armadaproject/armada/internal/common/proto" @@ -33,6 +32,7 @@ import ( "github.com/armadaproject/armada/internal/scheduler/schedulerobjects" "github.com/armadaproject/armada/internal/scheduler/testfixtures" "github.com/armadaproject/armada/internal/scheduleringester" + apiconfig "github.com/armadaproject/armada/internal/server/configuration" "github.com/armadaproject/armada/pkg/api" "github.com/armadaproject/armada/pkg/armadaevents" ) diff --git a/internal/scheduler/testfixtures/testfixtures.go b/internal/scheduler/testfixtures/testfixtures.go index 11005420266..250bcd9c802 100644 --- a/internal/scheduler/testfixtures/testfixtures.go +++ b/internal/scheduler/testfixtures/testfixtures.go @@ -15,7 +15,6 @@ import ( v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" - "github.com/armadaproject/armada/internal/armada/configuration" protoutil "github.com/armadaproject/armada/internal/common/proto" "github.com/armadaproject/armada/internal/common/slices" "github.com/armadaproject/armada/internal/common/stringinterner" @@ -26,6 +25,7 @@ import ( "github.com/armadaproject/armada/internal/scheduler/internaltypes" "github.com/armadaproject/armada/internal/scheduler/jobdb" "github.com/armadaproject/armada/internal/scheduler/schedulerobjects" + "github.com/armadaproject/armada/internal/server/configuration" "github.com/armadaproject/armada/pkg/api" "github.com/armadaproject/armada/pkg/armadaevents" ) diff --git a/internal/scheduleringester/config.go b/internal/scheduleringester/config.go index 51a60ed2dd0..b828d78d6df 100644 --- a/internal/scheduleringester/config.go +++ b/internal/scheduleringester/config.go @@ -3,8 +3,8 @@ package scheduleringester import ( "time" - "github.com/armadaproject/armada/internal/armada/configuration" profilingconfig "github.com/armadaproject/armada/internal/common/profiling/configuration" + "github.com/armadaproject/armada/internal/server/configuration" ) type Configuration struct { diff --git a/internal/scheduleringester/instructions.go b/internal/scheduleringester/instructions.go index 9cb973d6853..9fe4c1466ce 100644 --- a/internal/scheduleringester/instructions.go +++ b/internal/scheduleringester/instructions.go @@ -9,7 +9,6 @@ import ( "golang.org/x/exp/maps" "golang.org/x/exp/slices" - "github.com/armadaproject/armada/internal/armada/configuration" "github.com/armadaproject/armada/internal/common/armadacontext" "github.com/armadaproject/armada/internal/common/compress" "github.com/armadaproject/armada/internal/common/ingest" @@ -18,6 +17,7 @@ import ( "github.com/armadaproject/armada/internal/scheduler/adapters" schedulerdb "github.com/armadaproject/armada/internal/scheduler/database" "github.com/armadaproject/armada/internal/scheduler/schedulerobjects" + "github.com/armadaproject/armada/internal/server/configuration" "github.com/armadaproject/armada/pkg/armadaevents" ) diff --git a/internal/scheduleringester/instructions_test.go b/internal/scheduleringester/instructions_test.go index 7df26d75009..b901bf55e70 100644 --- a/internal/scheduleringester/instructions_test.go +++ b/internal/scheduleringester/instructions_test.go @@ -10,13 +10,13 @@ import ( v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" - "github.com/armadaproject/armada/internal/armada/configuration" "github.com/armadaproject/armada/internal/common/compress" "github.com/armadaproject/armada/internal/common/ingest/metrics" f "github.com/armadaproject/armada/internal/common/ingest/testfixtures" protoutil "github.com/armadaproject/armada/internal/common/proto" schedulerdb "github.com/armadaproject/armada/internal/scheduler/database" "github.com/armadaproject/armada/internal/scheduler/schedulerobjects" + "github.com/armadaproject/armada/internal/server/configuration" "github.com/armadaproject/armada/pkg/armadaevents" ) diff --git a/internal/armada/configuration/constants.go b/internal/server/configuration/constants.go similarity index 100% rename from internal/armada/configuration/constants.go rename to internal/server/configuration/constants.go diff --git a/internal/armada/configuration/types.go b/internal/server/configuration/types.go similarity index 100% rename from internal/armada/configuration/types.go rename to internal/server/configuration/types.go diff --git a/internal/armada/event/conversion/conversions.go b/internal/server/event/conversion/conversions.go similarity index 100% rename from internal/armada/event/conversion/conversions.go rename to internal/server/event/conversion/conversions.go diff --git a/internal/armada/event/conversion/conversions_test.go b/internal/server/event/conversion/conversions_test.go similarity index 100% rename from internal/armada/event/conversion/conversions_test.go rename to internal/server/event/conversion/conversions_test.go diff --git a/internal/armada/event/event.go b/internal/server/event/event.go similarity index 96% rename from internal/armada/event/event.go rename to internal/server/event/event.go index aeb0785855b..f2cb1b9d843 100644 --- a/internal/armada/event/event.go +++ b/internal/server/event/event.go @@ -10,12 +10,12 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "github.com/armadaproject/armada/internal/armada/event/sequence" - "github.com/armadaproject/armada/internal/armada/permissions" - armadaqueue "github.com/armadaproject/armada/internal/armada/queue" "github.com/armadaproject/armada/internal/common/armadacontext" "github.com/armadaproject/armada/internal/common/armadaerrors" "github.com/armadaproject/armada/internal/common/auth" + "github.com/armadaproject/armada/internal/server/event/sequence" + "github.com/armadaproject/armada/internal/server/permissions" + armadaqueue "github.com/armadaproject/armada/internal/server/queue" "github.com/armadaproject/armada/pkg/api" "github.com/armadaproject/armada/pkg/client/queue" ) diff --git a/internal/armada/event/event_repository.go b/internal/server/event/event_repository.go similarity index 97% rename from internal/armada/event/event_repository.go rename to internal/server/event/event_repository.go index e214eda225f..124abdd021c 100644 --- a/internal/armada/event/event_repository.go +++ b/internal/server/event/event_repository.go @@ -12,10 +12,10 @@ import ( "github.com/redis/go-redis/v9" log "github.com/sirupsen/logrus" - "github.com/armadaproject/armada/internal/armada/event/conversion" - "github.com/armadaproject/armada/internal/armada/event/sequence" "github.com/armadaproject/armada/internal/common/armadacontext" "github.com/armadaproject/armada/internal/common/compress" + "github.com/armadaproject/armada/internal/server/event/conversion" + "github.com/armadaproject/armada/internal/server/event/sequence" "github.com/armadaproject/armada/pkg/api" "github.com/armadaproject/armada/pkg/armadaevents" ) diff --git a/internal/armada/event/event_repository_test.go b/internal/server/event/event_repository_test.go similarity index 99% rename from internal/armada/event/event_repository_test.go rename to internal/server/event/event_repository_test.go index 1fe613962f4..e21ea7e0047 100644 --- a/internal/armada/event/event_repository_test.go +++ b/internal/server/event/event_repository_test.go @@ -9,10 +9,10 @@ import ( "github.com/redis/go-redis/v9" "github.com/stretchr/testify/assert" - "github.com/armadaproject/armada/internal/armada/event/sequence" "github.com/armadaproject/armada/internal/common/armadacontext" "github.com/armadaproject/armada/internal/common/compress" protoutil "github.com/armadaproject/armada/internal/common/proto" + "github.com/armadaproject/armada/internal/server/event/sequence" "github.com/armadaproject/armada/pkg/api" "github.com/armadaproject/armada/pkg/armadaevents" ) diff --git a/internal/armada/event/event_test.go b/internal/server/event/event_test.go similarity index 99% rename from internal/armada/event/event_test.go rename to internal/server/event/event_test.go index 95692bca8c5..7662798a354 100644 --- a/internal/armada/event/event_test.go +++ b/internal/server/event/event_test.go @@ -16,14 +16,14 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "github.com/armadaproject/armada/internal/armada/permissions" - armadaqueue "github.com/armadaproject/armada/internal/armada/queue" "github.com/armadaproject/armada/internal/common/armadacontext" "github.com/armadaproject/armada/internal/common/auth" "github.com/armadaproject/armada/internal/common/auth/permission" "github.com/armadaproject/armada/internal/common/compress" "github.com/armadaproject/armada/internal/common/database/lookout" protoutil "github.com/armadaproject/armada/internal/common/proto" + "github.com/armadaproject/armada/internal/server/permissions" + armadaqueue "github.com/armadaproject/armada/internal/server/queue" "github.com/armadaproject/armada/pkg/api" "github.com/armadaproject/armada/pkg/armadaevents" "github.com/armadaproject/armada/pkg/client/queue" diff --git a/internal/armada/event/sequence/sequence.go b/internal/server/event/sequence/sequence.go similarity index 100% rename from internal/armada/event/sequence/sequence.go rename to internal/server/event/sequence/sequence.go diff --git a/internal/armada/event/sequence/sequence_test.go b/internal/server/event/sequence/sequence_test.go similarity index 100% rename from internal/armada/event/sequence/sequence_test.go rename to internal/server/event/sequence/sequence_test.go diff --git a/internal/armada/mocks/generate.go b/internal/server/mocks/generate.go similarity index 100% rename from internal/armada/mocks/generate.go rename to internal/server/mocks/generate.go diff --git a/internal/armada/mocks/mock_authorizer.go b/internal/server/mocks/mock_authorizer.go similarity index 100% rename from internal/armada/mocks/mock_authorizer.go rename to internal/server/mocks/mock_authorizer.go diff --git a/internal/armada/mocks/mock_deduplicator.go b/internal/server/mocks/mock_deduplicator.go similarity index 100% rename from internal/armada/mocks/mock_deduplicator.go rename to internal/server/mocks/mock_deduplicator.go diff --git a/internal/armada/mocks/mock_repository.go b/internal/server/mocks/mock_repository.go similarity index 100% rename from internal/armada/mocks/mock_repository.go rename to internal/server/mocks/mock_repository.go diff --git a/internal/armada/permissions/permissions.go b/internal/server/permissions/permissions.go similarity index 100% rename from internal/armada/permissions/permissions.go rename to internal/server/permissions/permissions.go diff --git a/internal/armada/queryapi/database/db.go b/internal/server/queryapi/database/db.go similarity index 100% rename from internal/armada/queryapi/database/db.go rename to internal/server/queryapi/database/db.go diff --git a/internal/armada/queryapi/database/models.go b/internal/server/queryapi/database/models.go similarity index 100% rename from internal/armada/queryapi/database/models.go rename to internal/server/queryapi/database/models.go diff --git a/internal/armada/queryapi/database/query.sql b/internal/server/queryapi/database/query.sql similarity index 100% rename from internal/armada/queryapi/database/query.sql rename to internal/server/queryapi/database/query.sql diff --git a/internal/armada/queryapi/database/query.sql.go b/internal/server/queryapi/database/query.sql.go similarity index 100% rename from internal/armada/queryapi/database/query.sql.go rename to internal/server/queryapi/database/query.sql.go diff --git a/internal/armada/queryapi/database/sql.yaml b/internal/server/queryapi/database/sql.yaml similarity index 100% rename from internal/armada/queryapi/database/sql.yaml rename to internal/server/queryapi/database/sql.yaml diff --git a/internal/armada/queryapi/query_api.go b/internal/server/queryapi/query_api.go similarity index 99% rename from internal/armada/queryapi/query_api.go rename to internal/server/queryapi/query_api.go index 893c5db3c21..a181cb3d730 100644 --- a/internal/armada/queryapi/query_api.go +++ b/internal/server/queryapi/query_api.go @@ -7,10 +7,10 @@ import ( "github.com/jackc/pgx/v5" "github.com/jackc/pgx/v5/pgxpool" - "github.com/armadaproject/armada/internal/armada/queryapi/database" "github.com/armadaproject/armada/internal/common/compress" "github.com/armadaproject/armada/internal/common/database/lookout" protoutil "github.com/armadaproject/armada/internal/common/proto" + "github.com/armadaproject/armada/internal/server/queryapi/database" "github.com/armadaproject/armada/pkg/api" ) diff --git a/internal/armada/queryapi/query_api_test.go b/internal/server/queryapi/query_api_test.go similarity index 99% rename from internal/armada/queryapi/query_api_test.go rename to internal/server/queryapi/query_api_test.go index 3b86c61854f..664458f8f1d 100644 --- a/internal/armada/queryapi/query_api_test.go +++ b/internal/server/queryapi/query_api_test.go @@ -11,12 +11,12 @@ import ( "github.com/stretchr/testify/require" "k8s.io/utils/pointer" - "github.com/armadaproject/armada/internal/armada/queryapi/database" "github.com/armadaproject/armada/internal/common/armadacontext" "github.com/armadaproject/armada/internal/common/compress" dbcommon "github.com/armadaproject/armada/internal/common/database" "github.com/armadaproject/armada/internal/common/database/lookout" protoutil "github.com/armadaproject/armada/internal/common/proto" + "github.com/armadaproject/armada/internal/server/queryapi/database" "github.com/armadaproject/armada/pkg/api" ) diff --git a/internal/armada/queryapi/util.go b/internal/server/queryapi/util.go similarity index 100% rename from internal/armada/queryapi/util.go rename to internal/server/queryapi/util.go diff --git a/internal/armada/queue/queue_cache.go b/internal/server/queue/queue_cache.go similarity index 100% rename from internal/armada/queue/queue_cache.go rename to internal/server/queue/queue_cache.go diff --git a/internal/armada/queue/queue_cache_test.go b/internal/server/queue/queue_cache_test.go similarity index 96% rename from internal/armada/queue/queue_cache_test.go rename to internal/server/queue/queue_cache_test.go index 70dcf485d08..f6443466fa7 100644 --- a/internal/armada/queue/queue_cache_test.go +++ b/internal/server/queue/queue_cache_test.go @@ -9,8 +9,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/armadaproject/armada/internal/armada/mocks" "github.com/armadaproject/armada/internal/common/armadacontext" + "github.com/armadaproject/armada/internal/server/mocks" "github.com/armadaproject/armada/pkg/client/queue" ) diff --git a/internal/armada/queue/queue_repository.go b/internal/server/queue/queue_repository.go similarity index 100% rename from internal/armada/queue/queue_repository.go rename to internal/server/queue/queue_repository.go diff --git a/internal/armada/queue/queue_repository_test.go b/internal/server/queue/queue_repository_test.go similarity index 100% rename from internal/armada/queue/queue_repository_test.go rename to internal/server/queue/queue_repository_test.go diff --git a/internal/armada/queue/queue_service.go b/internal/server/queue/queue_service.go similarity index 99% rename from internal/armada/queue/queue_service.go rename to internal/server/queue/queue_service.go index de4861c5922..97ef409b990 100644 --- a/internal/armada/queue/queue_service.go +++ b/internal/server/queue/queue_service.go @@ -10,10 +10,10 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "github.com/armadaproject/armada/internal/armada/permissions" "github.com/armadaproject/armada/internal/common/armadacontext" "github.com/armadaproject/armada/internal/common/armadaerrors" "github.com/armadaproject/armada/internal/common/auth" + "github.com/armadaproject/armada/internal/server/permissions" "github.com/armadaproject/armada/pkg/api" "github.com/armadaproject/armada/pkg/client/queue" ) diff --git a/internal/armada/server.go b/internal/server/server.go similarity index 96% rename from internal/armada/server.go rename to internal/server/server.go index d2e0337e5e3..1c5a787fc0a 100644 --- a/internal/armada/server.go +++ b/internal/server/server.go @@ -1,4 +1,4 @@ -package armada +package server import ( "fmt" @@ -15,11 +15,6 @@ import ( log "github.com/sirupsen/logrus" "google.golang.org/grpc" - "github.com/armadaproject/armada/internal/armada/configuration" - "github.com/armadaproject/armada/internal/armada/event" - "github.com/armadaproject/armada/internal/armada/queryapi" - "github.com/armadaproject/armada/internal/armada/queue" - "github.com/armadaproject/armada/internal/armada/submit" "github.com/armadaproject/armada/internal/common/armadacontext" "github.com/armadaproject/armada/internal/common/auth" "github.com/armadaproject/armada/internal/common/compress" @@ -29,6 +24,11 @@ import ( "github.com/armadaproject/armada/internal/common/pulsarutils" "github.com/armadaproject/armada/internal/scheduler/reports" "github.com/armadaproject/armada/internal/scheduler/schedulerobjects" + "github.com/armadaproject/armada/internal/server/configuration" + "github.com/armadaproject/armada/internal/server/event" + "github.com/armadaproject/armada/internal/server/queryapi" + "github.com/armadaproject/armada/internal/server/queue" + "github.com/armadaproject/armada/internal/server/submit" "github.com/armadaproject/armada/pkg/api" "github.com/armadaproject/armada/pkg/client" ) diff --git a/internal/armada/submit/conversion/conversions.go b/internal/server/submit/conversion/conversions.go similarity index 99% rename from internal/armada/submit/conversion/conversions.go rename to internal/server/submit/conversion/conversions.go index b0dc957e6e4..6550134e1be 100644 --- a/internal/armada/submit/conversion/conversions.go +++ b/internal/server/submit/conversion/conversions.go @@ -7,11 +7,11 @@ import ( v1 "k8s.io/api/core/v1" networking "k8s.io/api/networking/v1" - "github.com/armadaproject/armada/internal/armada/configuration" "github.com/armadaproject/armada/internal/common" armadaslices "github.com/armadaproject/armada/internal/common/slices" "github.com/armadaproject/armada/internal/common/util" "github.com/armadaproject/armada/internal/executor/domain" + "github.com/armadaproject/armada/internal/server/configuration" "github.com/armadaproject/armada/pkg/api" "github.com/armadaproject/armada/pkg/armadaevents" ) diff --git a/internal/armada/submit/conversion/conversions_test.go b/internal/server/submit/conversion/conversions_test.go similarity index 99% rename from internal/armada/submit/conversion/conversions_test.go rename to internal/server/submit/conversion/conversions_test.go index 81e4212eb3a..2e145e27510 100644 --- a/internal/armada/submit/conversion/conversions_test.go +++ b/internal/server/submit/conversion/conversions_test.go @@ -8,7 +8,7 @@ import ( v1 "k8s.io/api/core/v1" networking "k8s.io/api/networking/v1" - "github.com/armadaproject/armada/internal/armada/submit/testfixtures" + "github.com/armadaproject/armada/internal/server/submit/testfixtures" "github.com/armadaproject/armada/pkg/api" "github.com/armadaproject/armada/pkg/armadaevents" ) diff --git a/internal/armada/submit/conversion/post_process.go b/internal/server/submit/conversion/post_process.go similarity index 99% rename from internal/armada/submit/conversion/post_process.go rename to internal/server/submit/conversion/post_process.go index 3e83472816f..e3d443e3452 100644 --- a/internal/armada/submit/conversion/post_process.go +++ b/internal/server/submit/conversion/post_process.go @@ -7,8 +7,8 @@ import ( v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" - "github.com/armadaproject/armada/internal/armada/configuration" armadaresource "github.com/armadaproject/armada/internal/common/resource" + "github.com/armadaproject/armada/internal/server/configuration" "github.com/armadaproject/armada/pkg/armadaevents" ) diff --git a/internal/armada/submit/conversion/post_process_test.go b/internal/server/submit/conversion/post_process_test.go similarity index 99% rename from internal/armada/submit/conversion/post_process_test.go rename to internal/server/submit/conversion/post_process_test.go index 7bf385f4c05..9314f18be27 100644 --- a/internal/armada/submit/conversion/post_process_test.go +++ b/internal/server/submit/conversion/post_process_test.go @@ -10,8 +10,8 @@ import ( "k8s.io/apimachinery/pkg/api/resource" "k8s.io/utils/pointer" - "github.com/armadaproject/armada/internal/armada/configuration" "github.com/armadaproject/armada/internal/common/util" + "github.com/armadaproject/armada/internal/server/configuration" "github.com/armadaproject/armada/pkg/armadaevents" ) diff --git a/internal/armada/submit/deduplication_test.go b/internal/server/submit/deduplication_test.go similarity index 100% rename from internal/armada/submit/deduplication_test.go rename to internal/server/submit/deduplication_test.go diff --git a/internal/armada/submit/deduplicaton.go b/internal/server/submit/deduplicaton.go similarity index 100% rename from internal/armada/submit/deduplicaton.go rename to internal/server/submit/deduplicaton.go diff --git a/internal/armada/submit/submit.go b/internal/server/submit/submit.go similarity index 98% rename from internal/armada/submit/submit.go rename to internal/server/submit/submit.go index 3a600c84d5a..8d8c219dfbd 100644 --- a/internal/armada/submit/submit.go +++ b/internal/server/submit/submit.go @@ -10,11 +10,6 @@ import ( "google.golang.org/grpc/codes" "k8s.io/utils/clock" - "github.com/armadaproject/armada/internal/armada/configuration" - "github.com/armadaproject/armada/internal/armada/permissions" - armadaqueue "github.com/armadaproject/armada/internal/armada/queue" - "github.com/armadaproject/armada/internal/armada/submit/conversion" - "github.com/armadaproject/armada/internal/armada/submit/validation" "github.com/armadaproject/armada/internal/common/armadacontext" "github.com/armadaproject/armada/internal/common/auth" "github.com/armadaproject/armada/internal/common/auth/permission" @@ -22,6 +17,11 @@ import ( "github.com/armadaproject/armada/internal/common/pulsarutils" "github.com/armadaproject/armada/internal/common/slices" "github.com/armadaproject/armada/internal/common/util" + "github.com/armadaproject/armada/internal/server/configuration" + "github.com/armadaproject/armada/internal/server/permissions" + armadaqueue "github.com/armadaproject/armada/internal/server/queue" + "github.com/armadaproject/armada/internal/server/submit/conversion" + "github.com/armadaproject/armada/internal/server/submit/validation" "github.com/armadaproject/armada/pkg/api" "github.com/armadaproject/armada/pkg/armadaevents" "github.com/armadaproject/armada/pkg/client/queue" diff --git a/internal/armada/submit/submit_test.go b/internal/server/submit/submit_test.go similarity index 98% rename from internal/armada/submit/submit_test.go rename to internal/server/submit/submit_test.go index 524b1d9338e..77e8cbcaed6 100644 --- a/internal/armada/submit/submit_test.go +++ b/internal/server/submit/submit_test.go @@ -11,13 +11,13 @@ import ( clock "k8s.io/utils/clock/testing" "k8s.io/utils/pointer" - "github.com/armadaproject/armada/internal/armada/mocks" - "github.com/armadaproject/armada/internal/armada/permissions" - "github.com/armadaproject/armada/internal/armada/submit/testfixtures" "github.com/armadaproject/armada/internal/common/armadacontext" "github.com/armadaproject/armada/internal/common/auth/permission" commonMocks "github.com/armadaproject/armada/internal/common/mocks" "github.com/armadaproject/armada/internal/common/util" + "github.com/armadaproject/armada/internal/server/mocks" + "github.com/armadaproject/armada/internal/server/permissions" + "github.com/armadaproject/armada/internal/server/submit/testfixtures" "github.com/armadaproject/armada/pkg/api" "github.com/armadaproject/armada/pkg/armadaevents" "github.com/armadaproject/armada/pkg/client/queue" diff --git a/internal/armada/submit/testfixtures/test_fixtures.go b/internal/server/submit/testfixtures/test_fixtures.go similarity index 99% rename from internal/armada/submit/testfixtures/test_fixtures.go rename to internal/server/submit/testfixtures/test_fixtures.go index 1c3d8cd592c..128f5eb3c1c 100644 --- a/internal/armada/submit/testfixtures/test_fixtures.go +++ b/internal/server/submit/testfixtures/test_fixtures.go @@ -8,10 +8,10 @@ import ( "k8s.io/apimachinery/pkg/api/resource" "k8s.io/utils/pointer" - "github.com/armadaproject/armada/internal/armada/configuration" "github.com/armadaproject/armada/internal/common/auth" protoutil "github.com/armadaproject/armada/internal/common/proto" armadaresource "github.com/armadaproject/armada/internal/common/resource" + "github.com/armadaproject/armada/internal/server/configuration" "github.com/armadaproject/armada/pkg/api" "github.com/armadaproject/armada/pkg/armadaevents" "github.com/armadaproject/armada/pkg/client/queue" diff --git a/internal/armada/submit/validation/job_set.go b/internal/server/submit/validation/job_set.go similarity index 100% rename from internal/armada/submit/validation/job_set.go rename to internal/server/submit/validation/job_set.go diff --git a/internal/armada/submit/validation/job_set_test.go b/internal/server/submit/validation/job_set_test.go similarity index 100% rename from internal/armada/submit/validation/job_set_test.go rename to internal/server/submit/validation/job_set_test.go diff --git a/internal/armada/submit/validation/submit_request.go b/internal/server/submit/validation/submit_request.go similarity index 99% rename from internal/armada/submit/validation/submit_request.go rename to internal/server/submit/validation/submit_request.go index 2cfd697c04a..99acedd7721 100644 --- a/internal/armada/submit/validation/submit_request.go +++ b/internal/server/submit/validation/submit_request.go @@ -6,8 +6,8 @@ import ( "github.com/pkg/errors" "k8s.io/component-helpers/scheduling/corev1/nodeaffinity" - "github.com/armadaproject/armada/internal/armada/configuration" schedulercontext "github.com/armadaproject/armada/internal/scheduler/context" + "github.com/armadaproject/armada/internal/server/configuration" "github.com/armadaproject/armada/pkg/api" ) diff --git a/internal/armada/submit/validation/submit_request_test.go b/internal/server/submit/validation/submit_request_test.go similarity index 99% rename from internal/armada/submit/validation/submit_request_test.go rename to internal/server/submit/validation/submit_request_test.go index 57546a3285d..f347d27cea5 100644 --- a/internal/armada/submit/validation/submit_request_test.go +++ b/internal/server/submit/validation/submit_request_test.go @@ -11,8 +11,8 @@ import ( "k8s.io/apimachinery/pkg/api/resource" "k8s.io/utils/pointer" - "github.com/armadaproject/armada/internal/armada/configuration" protoutil "github.com/armadaproject/armada/internal/common/proto" + "github.com/armadaproject/armada/internal/server/configuration" "github.com/armadaproject/armada/pkg/api" )