Skip to content

fix(recommendations): tell the user when GCP recommendations are skipped for a non-USD currency #1472

Open

Description

@cristim

Problem: since the cloud-commitments-go bump in #1466, a GCP Compute Engine CUD recommendation whose cost projection isn't in USD is skipped. This follows the USD-only rule decided on go#124. The skip happens inside the library (convertOrSkipBadAmount in providers/gcp services/computeengine/client.go around line 467) and is only logged with log.Printf. The platform never learns that anything was dropped. A customer whose GCP billing account isn't in USD sees an empty or short Compute Engine list with no explanation. That breaks the fail-loud rule. The same path also drops recs with malformed amounts.

Fix:

  1. Library (cloud-commitments-go): return the skipped count and reasons with the recommendations, for example a typed partial result or a skipped-count field on the response, instead of only logging them.
  2. Platform: record the count per account and provider on the collection run. Show it to the user as a warning on the recommendations view, e.g. "3 GCP recommendations skipped: prices not in USD". It should behave the same as the existing Azure partial-subscription warning.

Add a scheduler test for a non-USD GCP rec that produces the warning.

This issue is blocked on the library change.

Activity

  1. cristim commented on Oct 26, 2026

    @cristim
    MemberAuthor

    Library design, from claude-cc-libs: GCP GetRecommendations will return the good recommendations plus a non-nil error that implements Partial() bool, the same as Azure's PartialResultError. The error message lists the skipped count and the reasons (non-USD, malformed amount, unsupported term). Hard errors still take priority. Platform work when the go PR lands: the GCP collection path in internal/scheduler must handle Partial() the same way tolerateIncompleteSweep handles Azure partial subscriptions. Otherwise the bump that brings this in turns every skipped GCP rec into a failed collection run. Then show the count to the user. That bump must not land without the Partial() handling.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions