Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add client-side experiment for NPD Health Monitoring config #525

Merged
merged 2 commits into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions launcher/container_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,15 @@ func NewRunner(ctx context.Context, cdClient *containerd.Client, token oauth2.To
return nil, err
}

if err := enableMonitoring(launchSpec.MonitoringEnabled, logger); err != nil {
return nil, err
if launchSpec.MonitoringEnabled == spec.All && !launchSpec.Experiments.EnableHealthMonitoring {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a new flag EnableHealthMonitoring? It it part of the experiment binary yet?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I had Josh build a new binary this morning and am working on testing it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
Experiment is working in allowlisted project

logger.Info("Health monitoring experiment is not enabled - falling back to memory-only.")
if err := enableMonitoring(spec.MemoryOnly, logger); err != nil {
return nil, err
}
} else {
if err := enableMonitoring(launchSpec.MonitoringEnabled, logger); err != nil {
return nil, err
}
}

logger.Info(fmt.Sprintf("Launch Policy : %+v\n", launchPolicy))
Expand Down
1 change: 1 addition & 0 deletions launcher/internal/experiments/experiments.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
type Experiments struct {
EnableTestFeatureForImage bool
EnableTempFSMount bool
EnableHealthMonitoring bool
}

// New takes a filepath, opens the file, and calls ReadJsonInput with the contents
Expand Down
Loading