Skip to content

Commit 15f6758

Browse files
committed
Cleanup dead code, also add some more comments
1 parent f89bb96 commit 15f6758

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

pkg/epp/backend/metrics/types.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,4 @@ func (f *PodMetricsFactory) ReleaseEndpoint(ep PodMetrics) {
7575
}
7676
}
7777

78-
func (f *PodMetricsFactory) GetAttributes() *datalayer.Attributes {
79-
return datalayer.NewAttributes()
80-
}
81-
8278
type PodMetrics = datalayer.Endpoint

pkg/epp/requestcontrol/director.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,9 @@ func prepareData(plugin PrepareDataPlugin, ctx context.Context, request *schedul
378378
}
379379
}
380380

381+
// executePluginsAsDAG executes PrepareData plugins as a DAG based on their dependencies asynchronously.
382+
// So, a plugin is executed only after all its dependencies have been executed.
383+
// If there is a cycle or other error in the DAG, it returns an error.
381384
func (d *Director) executePluginsAsDAG(ctx context.Context, request *schedulingtypes.LLMRequest, pods []schedulingtypes.Pod, plugins []PrepareDataPlugin) error {
382385
// Build the DAG
383386
// The error validation happens on startup when loading the config. So, here there should not be any error.

pkg/epp/requestcontrol/graph_util.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ func buildDAG(plugins []PrepareDataPlugin) map[string][]string {
5050
return dag
5151
}
5252

53-
// Where will we call prepareData from? How will the data be actually fetched? Can we put the data in DependencyNode?
53+
// prepareDataGraph builds a DAG of data preparation plugins and checks for cycles.
54+
// If there is a cycle, it returns an error.
5455
func prepareDataGraph(plugins []PrepareDataPlugin) (map[string][]string, error) {
5556
nameToNode := map[string]PrepareDataPlugin{}
5657

0 commit comments

Comments
 (0)