Skip to content

Commit

Permalink
chore: refactor context within resource provider
Browse files Browse the repository at this point in the history
  • Loading branch information
noryev committed Feb 4, 2025
1 parent f01160d commit 65330ad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion pkg/resourceprovider/preflight/preflight.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ type preflightChecker struct {
gpuInfo []GPUInfo
}

func RunPreflightChecks(ctx context.Context) error {
func RunPreflightChecks() error {
ctx := context.Background()
log.Info().Msg("Starting preflight checks...")
checker := &preflightChecker{}
config := preflightConfig{
Expand Down
3 changes: 2 additions & 1 deletion pkg/resourceprovider/resourceprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ func NewResourceProvider(
executor executor.Executor,
tracer trace.Tracer,
) (*ResourceProvider, error) {
if err := preflight.RunPreflightChecks(context.Background()); err != nil {

if err := preflight.RunPreflightChecks(); err != nil {
return nil, fmt.Errorf("preflight checks failed: %w", err)
}

Expand Down

0 comments on commit 65330ad

Please sign in to comment.