From c3b1fff7b89f9746a8e4f628c066e465581c15bb Mon Sep 17 00:00:00 2001 From: Brandon Roberson Date: Tue, 4 Jun 2024 19:54:16 +0000 Subject: [PATCH 1/2] Updates to match new locket protobufs --- cmd/auctioneer/main.go | 2 +- cmd/auctioneer/main_test.go | 2 +- resources.go | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/auctioneer/main.go b/cmd/auctioneer/main.go index 2c65e3e..c59bafe 100644 --- a/cmd/auctioneer/main.go +++ b/cmd/auctioneer/main.go @@ -78,7 +78,7 @@ func main() { lockIdentifier := &locketmodels.Resource{ Key: auctioneerLockKey, Owner: cfg.UUID, - TypeCode: locketmodels.LOCK, + TypeCode: locketmodels.TypeCode_LOCK, Type: locketmodels.LockType, } diff --git a/cmd/auctioneer/main_test.go b/cmd/auctioneer/main_test.go index a25a8ac..00ddd57 100644 --- a/cmd/auctioneer/main_test.go +++ b/cmd/auctioneer/main_test.go @@ -257,7 +257,7 @@ var _ = Describe("Auctioneer", func() { Key: "auctioneer", Owner: "Your worst enemy.", Value: "Something", - TypeCode: locketmodels.LOCK, + TypeCode: locketmodels.TypeCode_LOCK, } clock := clock.NewClock() diff --git a/resources.go b/resources.go index 834d252..3233a6c 100644 --- a/resources.go +++ b/resources.go @@ -78,11 +78,11 @@ func NewLRPStartRequestFromModel(d *models.DesiredLRP, indices ...int) LRPStartR func NewLRPStartRequestFromSchedulingInfo(s *models.DesiredLRPSchedulingInfo, indices ...int) LRPStartRequest { return NewLRPStartRequest( - s.ProcessGuid, - s.Domain, + s.DesiredLrpKey.ProcessGuid, + s.DesiredLrpKey.Domain, indices, - rep.NewResource(s.MemoryMb, s.DiskMb, s.MaxPids), - rep.NewPlacementConstraint(s.RootFs, s.PlacementTags, s.VolumePlacement.DriverNames), + rep.NewResource(s.DesiredLrpResource.MemoryMb, s.DesiredLrpResource.DiskMb, s.DesiredLrpResource.MaxPids), + rep.NewPlacementConstraint(s.DesiredLrpResource.RootFs, s.PlacementTags, s.VolumePlacement.DriverNames), ) } From f933039c5c253ba77137f3bfd122d35b4d20b63d Mon Sep 17 00:00:00 2001 From: Brandon Roberson Date: Mon, 31 Mar 2025 15:10:43 +0000 Subject: [PATCH 2/2] Update for new locket protobufs --- cmd/auctioneer/main.go | 2 +- cmd/auctioneer/main_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/auctioneer/main.go b/cmd/auctioneer/main.go index c59bafe..2c65e3e 100644 --- a/cmd/auctioneer/main.go +++ b/cmd/auctioneer/main.go @@ -78,7 +78,7 @@ func main() { lockIdentifier := &locketmodels.Resource{ Key: auctioneerLockKey, Owner: cfg.UUID, - TypeCode: locketmodels.TypeCode_LOCK, + TypeCode: locketmodels.LOCK, Type: locketmodels.LockType, } diff --git a/cmd/auctioneer/main_test.go b/cmd/auctioneer/main_test.go index 00ddd57..a25a8ac 100644 --- a/cmd/auctioneer/main_test.go +++ b/cmd/auctioneer/main_test.go @@ -257,7 +257,7 @@ var _ = Describe("Auctioneer", func() { Key: "auctioneer", Owner: "Your worst enemy.", Value: "Something", - TypeCode: locketmodels.TypeCode_LOCK, + TypeCode: locketmodels.LOCK, } clock := clock.NewClock()