Skip to content

Commit

Permalink
fix: nil deref in usage of incomplete experiment config policies
Browse files Browse the repository at this point in the history
  • Loading branch information
stoksc committed Oct 16, 2024
1 parent 6c46a46 commit 87de272
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions master/internal/configpolicy/task_config_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,8 @@ func findAllowedPriority(scope *int, workloadType string) (limit int, exists boo
if err != nil {
return 0, false, fmt.Errorf("unable to unmarshal task config policies: %w", err)
}
if configs.Resources().Priority() != nil {
adminPriority := *configs.Resources().Priority()
if configs.RawResources != nil && configs.RawResources.RawPriority != nil {
adminPriority := *configs.RawResources.RawPriority
return adminPriority, false,
fmt.Errorf("priority set by invariant config: %w", errPriorityImmutable)
}
Expand Down

0 comments on commit 87de272

Please sign in to comment.