Skip to content

Commit

Permalink
refactor(dispatcherrm): split fetch HPC resources out (determined-ai#778
Browse files Browse the repository at this point in the history
) [DET-9168]
  • Loading branch information
stoksc authored and eecsliu committed Apr 16, 2024
1 parent ab60c99 commit 76c94fc
Show file tree
Hide file tree
Showing 5 changed files with 532 additions and 473 deletions.
16 changes: 6 additions & 10 deletions master/internal/rm/dispatcherrm/dispatcher_agents_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ package dispatcherrm
import (
"context"
"testing"
"time"

"github.com/determined-ai/determined/master/internal/db"
"github.com/determined-ai/determined/master/pkg/actor"
Expand All @@ -23,16 +22,13 @@ func TestDispatcherAgents(t *testing.T) {
_, _ = db.Bun().NewDelete().Model(&dispatcherState{}).Where("id=0").Exec(context.TODO())

m := &dispatcherResourceManager{
resourceDetails: hpcResourceDetailsCache{
lastSample: hpcResources{
Nodes: []hpcNodeDetails{
{Name: "Node A"},
{Name: "Node B"},
{Name: "Node C"},
},
hpcDetailsCache: makeTestHpcDetailsCache(&hpcResources{
Nodes: []hpcNodeDetails{
{Name: "Node A"},
{Name: "Node B"},
{Name: "Node C"},
},
sampleTime: time.Now(),
},
}),
dbState: *newDispatcherState(),
}
_, err := m.disableAgent("Node Z")
Expand Down
Loading

0 comments on commit 76c94fc

Please sign in to comment.