Uploaded image for project: 'Subscription Watch'
  1. Subscription Watch
  2. SWATCH-4493

Add REST endpoint to backfill is_primary in tally_snapshots

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • None
    • swatch-tally
    • None
    • 8
    • False
    • Hide

      None

      Show
      None
    • False
    • Impediment
    • subs-swatch-thunder

      • Create a REST API endpoint to process existing tally_snapshots data.
      • Support filtering by org ID and/or product ID.
      • Implement logic to identify the correct primary record per grouping logic for payg and non-payg.
      • Ensure the operation is safe for re-runs and large datasets. Don't run anything yet on prod. Just enable the REST endpoint.

      Acceptance Criteria

      • REST endpoint is implemented and documented.
      • Endpoint supports org ID and product ID as request parameters.
      • Correct records are identified and updated with is_primary = true for payg and non-payg.
      • Non-primary records are set or remain is_primary = false.
      • Endpoint is idempotent and handles re-execution safely.
      • No adverse impact on existing data or APIs.
      • Component test to support this endpoint
      • Don't run anything yet on prod. Just enable the REST endpoint.

              Unassigned Unassigned
              karshah@redhat.com Kartik Shah
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: