Open Bug 2077144 Opened 1 month ago Updated 8 days ago

Add a `flows_enabled` remote settings override for flows

Categories

(Data Platform and Tools :: Glean: SDK, enhancement, P1)

enhancement

Tracking

(Not tracked)

People

(Reporter: travis_, Assigned: travis_)

References

(Blocks 2 open bugs)

Details

Attachments

(1 external file)

Add a per-flow remote override so a flow with wrong instrumentation can be turned off without shipping a build. Depends on the lifecycle bug.

  • Add flows_enabled: HashMap<String, bool> to RemoteSettingsConfig, keyed by flow name, matching metrics_enabled and pings_enabled. A missing key falls back to the flow's disabled value from flows.yaml. Unknown keys are ignored. The override works both ways, so a flow shipped with disabled: true can be turned on remotely.
  • No "*" wildcard key, matching the existing maps.
  • Check the override only when an entry event would open an instance. Changing it never closes an active instance, and it isn't fixed at session start. An instance that is already open runs until it ends normally.
  • Read remote_settings_config under its existing lock, as session_start() does for session_sample_rate. Opening an instance is rare enough that this doesn't need the remote_settings_epoch cache.
  • When an entry event doesn't open an instance because the flow is disabled, record nothing, and don't increment glean.flows_not_started.
  • In apply_server_knobs_config(), log a warning when a metrics_enabled override disables an event that is in some flow's starts_on or ends_on. Otherwise the flow stops opening or stops recording exit outcomes with no error anywhere, and the data looks like abandonment.

Tests:

  • disable then re-enable while an instance is open and check the instance is unaffected, enable a flow shipped disabled, and check the warning is logged.
Blocks: 2077152
Blocks: 2077127
Assignee: nobody → tlong
Priority: P3 → P2
Priority: P2 → P1

(via GitHub webhook, authenticated as shared-secret)

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: