diff --git a/api/schema.graphqls b/api/schema.graphqls index e4e2b8ed..e6830956 100644 --- a/api/schema.graphqls +++ b/api/schema.graphqls @@ -451,8 +451,6 @@ input JobFilter { duration: IntRange energy: FloatRange - minRunningFor: Int - numNodes: IntRange numAccelerators: IntRange numHWThreads: IntRange diff --git a/internal/graph/generated/generated.go b/internal/graph/generated/generated.go index 9af36ffd..f003c04a 100644 --- a/internal/graph/generated/generated.go +++ b/internal/graph/generated/generated.go @@ -2718,8 +2718,6 @@ input JobFilter { duration: IntRange energy: FloatRange - minRunningFor: Int - numNodes: IntRange numAccelerators: IntRange numHWThreads: IntRange @@ -13292,7 +13290,7 @@ func (ec *executionContext) unmarshalInputJobFilter(ctx context.Context, obj any asMap[k] = v } - fieldsInOrder := [...]string{"tags", "dbId", "jobId", "arrayJobId", "user", "project", "jobName", "cluster", "subCluster", "partition", "duration", "energy", "minRunningFor", "numNodes", "numAccelerators", "numHWThreads", "startTime", "state", "metricStats", "shared", "schedule", "node"} + fieldsInOrder := [...]string{"tags", "dbId", "jobId", "arrayJobId", "user", "project", "jobName", "cluster", "subCluster", "partition", "duration", "energy", "numNodes", "numAccelerators", "numHWThreads", "startTime", "state", "metricStats", "shared", "schedule", "node"} for _, k := range fieldsInOrder { v, ok := asMap[k] if !ok { @@ -13383,13 +13381,6 @@ func (ec *executionContext) unmarshalInputJobFilter(ctx context.Context, obj any return it, err } it.Energy = data - case "minRunningFor": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("minRunningFor")) - data, err := ec.unmarshalOInt2ᚖint(ctx, v) - if err != nil { - return it, err - } - it.MinRunningFor = data case "numNodes": ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("numNodes")) data, err := ec.unmarshalOIntRange2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑbackendᚋinternalᚋconfigᚐIntRange(ctx, v) diff --git a/internal/graph/model/models_gen.go b/internal/graph/model/models_gen.go index 24b33847..bdf63560 100644 --- a/internal/graph/model/models_gen.go +++ b/internal/graph/model/models_gen.go @@ -75,7 +75,6 @@ type JobFilter struct { Partition *StringInput `json:"partition,omitempty"` Duration *config.IntRange `json:"duration,omitempty"` Energy *FloatRange `json:"energy,omitempty"` - MinRunningFor *int `json:"minRunningFor,omitempty"` NumNodes *config.IntRange `json:"numNodes,omitempty"` NumAccelerators *config.IntRange `json:"numAccelerators,omitempty"` NumHWThreads *config.IntRange `json:"numHWThreads,omitempty"` diff --git a/internal/repository/jobQuery.go b/internal/repository/jobQuery.go index efa1c155..36c5892e 100644 --- a/internal/repository/jobQuery.go +++ b/internal/repository/jobQuery.go @@ -275,13 +275,6 @@ func BuildWhereClause(filter *model.JobFilter, query sq.SelectBuilder) sq.Select } } - // Configurable Filter to exclude recently started jobs, see config.go: ShortRunningJobsDuration - if filter.MinRunningFor != nil { - now := time.Now().Unix() - // Only jobs whose start timestamp is more than MinRunningFor seconds in the past - // If a job completed within the configured timeframe, it will still show up after the start_time matches the condition! - query = query.Where(sq.Lt{"job.start_time": (now - int64(*filter.MinRunningFor))}) - } return query }