Skip to content

fix(purchase): reject a purchase delay where no fire sweep is scheduled #1588

Open

Description

@IAmJSD

Since #1580, the fire_scheduled_purchases sweep is on by default. A delayed approval (purchase_delay_hours > 0; the migrated default is 0, so this only applies where someone set a delay) still never executes when no fire sweep runs, and nothing warns the user. That happens when:

  • enable_fire_scheduled_purchases_schedule = false;
  • scheduled tasks are off on GCP or Azure;
  • GKE is deployed from terraform/environments/gcp, which passes no enable_scheduled_tasks to GKE.

Such purchases sit in scheduled with no alert. The 24h age cap (#1549) only refuses them on the next sweep run, if one ever runs. #712 suggested refusing to schedule (or failing loudly) when the deployment has no fire sweep.

Fix options:

  • the runtime knows whether the sweep is scheduled (an env var set by each module) and executes immediately or refuses with a clear error when it isn't;
  • or the settings API rejects purchase_delay_hours > 0 there.

This is the remaining part of #712.

Found in review of #1580.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions