You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ux(settings): add SageMaker and Lambda purchasing-defaults cards (#71)
* ux(settings): add SageMaker and Lambda purchasing-defaults cards
Settings → Purchasing previously offered per-service term/payment cards
for EC2, RDS, ElastiCache, OpenSearch, Redshift, and the umbrella
Savings Plans, but had no cards for SageMaker or Lambda. Both services
are significant cost-optimisation targets covered by Savings Plans
(SageMaker SP and Compute SP respectively), so the omission forced
users to fall back to the global default term/payment for any
SageMaker/Lambda recommendation instead of pinning a per-workload
preference.
Add `aws/sagemaker` and `aws/lambda` cards mirroring the existing AWS
card shape (1y/3y term, NoUpfront / Partial / AllUpfront payment).
Both services use AWS_PAYMENTS via commitmentOptions.ts's `_default`
fallback — no per-service constraints. The new entries plug into the
existing SERVICE_FIELDS array so save / load / dirty-tracking / sticky
save bar wiring picks them up automatically. The umbrella Savings
Plans hint copy is tweaked to clarify the new per-service cards
override it.
Tests cover render presence (grep index.html for heading + select IDs)
and save round-trip (per-service config endpoint receives the edited
term and payment) for each service, plus constraint-suite regression
tests confirming the 3yr / no-upfront combination stays selectable
(SageMaker / Lambda have no service-level restriction).
Closes#22
* fix(settings): drop invalid Lambda card — no standalone Lambda SP
Lambda has no dedicated Savings Plan product — Lambda usage is covered
exclusively by Compute Savings Plans (alongside EC2 + Fargate), already
represented by the umbrella "Savings Plans" card. A separate "Lambda
Savings Plans" card invents a non-existent SKU: picking term/payment
on it has no purchasable instrument behind it.
SageMaker's card stays — SageMaker Savings Plans is a real, distinct SP
type (separate product since 2020).
- frontend/src/index.html: drop the Lambda service-default-card; rephrase
the umbrella SP hint copy so SageMaker is the only call-out (Lambda is
implicitly part of "Compute (EC2, Fargate, Lambda)").
- frontend/src/settings.ts: remove the aws/lambda entry from
SERVICE_FIELDS, with a comment explaining the omission so a future
copy-paste doesn't re-add it.
- frontend/src/__tests__/settings.test.ts: drop the three Lambda-specific
tests (presence, save round-trip, no-upfront visibility), drop Lambda
IDs from the test fixture, and add a negative-guard test asserting no
Lambda card or selects ever land in index.html. updateServiceConfig
call-count expectation: 17 → 16 (7 AWS + 5 Azure + 4 GCP).
<pclass="service-default-hint">Compute (EC2, Fargate, Lambda), EC2 Instance, SageMaker, and Database (RDS) plans share these defaults.</p>
488
+
<pclass="service-default-hint">Compute (EC2, Fargate, Lambda), EC2 Instance, and Database (RDS) plans share these defaults. SageMaker is its own SP type — see card below.</p>
<pclass="service-default-hint">SageMaker Savings Plans are a distinct SP product (separate from Compute SP). These defaults narrow SageMaker recommendations independently of the umbrella Savings Plans card.</p>
0 commit comments