From 23ca5d8aac36a0abb185b559730cc7ef5d7297cc Mon Sep 17 00:00:00 2001 From: joshsiv-mulga Date: Tue, 29 Sep 2026 10:05:00 +1000 Subject: [PATCH] refactor: move resource model to lifecycle foundation --- spinifex/daemon/eni_orphan_reaper_test.go | 2 +- spinifex/daemon/instance_claim_test.go | 2 +- spinifex/daemon/instance_records_test.go | 2 +- spinifex/daemon/instance_recovery_test.go | 2 +- spinifex/{ => foundation/lifecycle}/resource/resource.go | 0 spinifex/{ => foundation/lifecycle}/resource/resource_test.go | 2 +- spinifex/handlers/quota/records_test.go | 2 +- spinifex/instancecache/cache_test.go | 2 +- spinifex/services/awsgw/quota_reconcile_test.go | 2 +- spinifex/vm/record.go | 2 +- 10 files changed, 9 insertions(+), 9 deletions(-) rename spinifex/{ => foundation/lifecycle}/resource/resource.go (100%) rename spinifex/{ => foundation/lifecycle}/resource/resource_test.go (99%) diff --git a/spinifex/daemon/eni_orphan_reaper_test.go b/spinifex/daemon/eni_orphan_reaper_test.go index 1265b3a5f..46d855a9a 100644 --- a/spinifex/daemon/eni_orphan_reaper_test.go +++ b/spinifex/daemon/eni_orphan_reaper_test.go @@ -8,8 +8,8 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" + "github.com/mulgadc/spinifex/spinifex/foundation/lifecycle/resource" handlers_ec2_vpc "github.com/mulgadc/spinifex/spinifex/handlers/ec2/vpc" - "github.com/mulgadc/spinifex/spinifex/resource" "github.com/mulgadc/spinifex/spinifex/testutil" "github.com/mulgadc/spinifex/spinifex/vm" "github.com/stretchr/testify/assert" diff --git a/spinifex/daemon/instance_claim_test.go b/spinifex/daemon/instance_claim_test.go index 6dc9f8ba3..f4ae191b7 100644 --- a/spinifex/daemon/instance_claim_test.go +++ b/spinifex/daemon/instance_claim_test.go @@ -8,7 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" "github.com/mulgadc/spinifex/spinifex/daemon" - "github.com/mulgadc/spinifex/spinifex/resource" + "github.com/mulgadc/spinifex/spinifex/foundation/lifecycle/resource" "github.com/mulgadc/spinifex/spinifex/vm" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/spinifex/daemon/instance_records_test.go b/spinifex/daemon/instance_records_test.go index 2e880a125..3af5ba33c 100644 --- a/spinifex/daemon/instance_records_test.go +++ b/spinifex/daemon/instance_records_test.go @@ -5,8 +5,8 @@ import ( "time" "github.com/mulgadc/spinifex/spinifex/daemon" + "github.com/mulgadc/spinifex/spinifex/foundation/lifecycle/resource" "github.com/mulgadc/spinifex/spinifex/kvstore" - "github.com/mulgadc/spinifex/spinifex/resource" "github.com/mulgadc/spinifex/spinifex/testutil" "github.com/mulgadc/spinifex/spinifex/vm" "github.com/nats-io/nats.go" diff --git a/spinifex/daemon/instance_recovery_test.go b/spinifex/daemon/instance_recovery_test.go index 621307509..fae9363a5 100644 --- a/spinifex/daemon/instance_recovery_test.go +++ b/spinifex/daemon/instance_recovery_test.go @@ -17,9 +17,9 @@ import ( "github.com/mulgadc/spinifex/spinifex/awserrors" "github.com/mulgadc/spinifex/spinifex/config" + "github.com/mulgadc/spinifex/spinifex/foundation/lifecycle/resource" handlers_ec2_instance "github.com/mulgadc/spinifex/spinifex/handlers/ec2/instance" "github.com/mulgadc/spinifex/spinifex/instancecache" - "github.com/mulgadc/spinifex/spinifex/resource" "github.com/mulgadc/spinifex/spinifex/vm" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/spinifex/resource/resource.go b/spinifex/foundation/lifecycle/resource/resource.go similarity index 100% rename from spinifex/resource/resource.go rename to spinifex/foundation/lifecycle/resource/resource.go diff --git a/spinifex/resource/resource_test.go b/spinifex/foundation/lifecycle/resource/resource_test.go similarity index 99% rename from spinifex/resource/resource_test.go rename to spinifex/foundation/lifecycle/resource/resource_test.go index 7c1736c5f..ab5e7ef43 100644 --- a/spinifex/resource/resource_test.go +++ b/spinifex/foundation/lifecycle/resource/resource_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "github.com/mulgadc/spinifex/spinifex/resource" + "github.com/mulgadc/spinifex/spinifex/foundation/lifecycle/resource" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/spinifex/handlers/quota/records_test.go b/spinifex/handlers/quota/records_test.go index c0ba852c4..d5ec63866 100644 --- a/spinifex/handlers/quota/records_test.go +++ b/spinifex/handlers/quota/records_test.go @@ -6,9 +6,9 @@ import ( "errors" "testing" + "github.com/mulgadc/spinifex/spinifex/foundation/lifecycle/resource" handlers_quota "github.com/mulgadc/spinifex/spinifex/handlers/quota" "github.com/mulgadc/spinifex/spinifex/kvstore" - "github.com/mulgadc/spinifex/spinifex/resource" "github.com/mulgadc/spinifex/spinifex/testutil" "github.com/mulgadc/spinifex/spinifex/utils" "github.com/mulgadc/spinifex/spinifex/vm" diff --git a/spinifex/instancecache/cache_test.go b/spinifex/instancecache/cache_test.go index afc4b1aab..828bdb53a 100644 --- a/spinifex/instancecache/cache_test.go +++ b/spinifex/instancecache/cache_test.go @@ -14,8 +14,8 @@ import ( "testing" "time" + "github.com/mulgadc/spinifex/spinifex/foundation/lifecycle/resource" "github.com/mulgadc/spinifex/spinifex/kvstore" - "github.com/mulgadc/spinifex/spinifex/resource" "github.com/mulgadc/spinifex/spinifex/testutil" "github.com/mulgadc/spinifex/spinifex/utils" "github.com/mulgadc/spinifex/spinifex/vm" diff --git a/spinifex/services/awsgw/quota_reconcile_test.go b/spinifex/services/awsgw/quota_reconcile_test.go index c9f770c1b..11a6dd7d4 100644 --- a/spinifex/services/awsgw/quota_reconcile_test.go +++ b/spinifex/services/awsgw/quota_reconcile_test.go @@ -7,8 +7,8 @@ import ( "testing" "time" + "github.com/mulgadc/spinifex/spinifex/foundation/lifecycle/resource" handlers_quota "github.com/mulgadc/spinifex/spinifex/handlers/quota" - "github.com/mulgadc/spinifex/spinifex/resource" "github.com/mulgadc/spinifex/spinifex/testutil" "github.com/mulgadc/spinifex/spinifex/vm" "github.com/nats-io/nats.go/jetstream" diff --git a/spinifex/vm/record.go b/spinifex/vm/record.go index 8c8b2bf56..eff486576 100644 --- a/spinifex/vm/record.go +++ b/spinifex/vm/record.go @@ -4,8 +4,8 @@ import ( "time" "github.com/aws/aws-sdk-go/service/ec2" + "github.com/mulgadc/spinifex/spinifex/foundation/lifecycle/resource" "github.com/mulgadc/spinifex/spinifex/gpu" - "github.com/mulgadc/spinifex/spinifex/resource" "github.com/mulgadc/spinifex/spinifex/types" )