Repository navigation
feat: parity batch 18 (Resource Explorer finds untagged resources of every tagging-wired service; Timestream Query checked arithmetic and casts) - #2554
Conversation
…ng casts, TRY_CAST and try, named parameters Typed integer arithmetic and SUM raise an error on overflow instead of widening, and integer division or modulo by zero is an error. Casting a double to an integer rounds and rejects out-of-range values, casting an unparsable string fails, and TRY_CAST and try return NULL in those cases. PrepareQuery returns named parameters typed by their use. random(n) keeps its argument's type and e() exists. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NVwMjLknMM32Xje6Qik6wY
…rvice are searchable Each service in the tagging aggregation exposes its full resource list beside its tagged one, both from one enumerator. Resource Explorer search and listing use it, so a resource no longer needs a tag to be found. A guard fails when a service has a tagged listing without an inventory. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NVwMjLknMM32Xje6Qik6wY
…run, NaN no longer corrupts results, n-ary max, min and percentile arrays are real A query whose checked-arithmetic form failed to prepare failed outright; it is now retried once without the checked edits, while overflow and division by zero stay errors. NaN carried as text made comparisons true and sums zero. Casting a timestamp string with an offset regressed. max(x, n), min(x, n) and approx_percentile with an array of percentages returned NULL. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NVwMjLknMM32Xje6Qik6wY
…ations, ECS daemon task definitions and express services, RDS integrations and Timestream scheduled queries These kinds accept tags but were missing from their service's inventory, so an untagged one could not be found while a tagged one could. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NVwMjLknMM32Xje6Qik6wY
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NVwMjLknMM32Xje6Qik6wY
|
Important Review skippedToo many files! This PR contains 140 files, which is 40 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. CodeRabbit couldn't verify your organization's usage billing state, so no usage-priced review was started. Retry after the billing service recovers.
|
There was a problem hiding this comment.
Devin Review found 3 potential issues.
2 flags not posted on this PR by your GitHub settings — view them in Devin Review. (Configure)
| return out | ||
| }, | ||
| func() []taggedARNEntry { return taggedEntries(apigwBk.TaggedResources()) }, | ||
| func(_ context.Context) []taggedARNEntry { return taggedEntries(apigwBk.InventoryResources()) }, |
There was a problem hiding this comment.
🔴 Missing REST APIs outside home Region
When users create a REST API outside us-east-1, wireTaggingAPIGateway searches only the home backend. BackendFor keeps the new API in a separate backend, so Resource Explorer never finds it.
Learn more
API Gateway dispatches regional requests to sibling handlers with separate stores in regional dispatch. Resource Explorer gathers inventory separately for each indexed Region in gather. The inventory closure always reads the home store. A second constraint is that apigwResourceArn hardcodes us-east-1, so even a peer's inventory would be discarded as out of Region.
Example: Create an untagged REST API in us-west-2, then search from a us-west-2 index. The API exists in the west backend, but the inventory reads the east backend, so the search omits it.
Recommended fix: Resolve the inventory backend from awsmeta.Region(ctx) using BackendFor. Construct inventory ARNs from that backend's Region, and test both a local index and an aggregator with an API in a sibling Region.
Was this helpful? React with 👍 or 👎 to provide feedback.
| registerInventoryProvider(bk, func(ctx context.Context) []rgtapibackend.TaggedResource { | ||
| b := backendFor(ctx, "") | ||
| if b == nil { | ||
| return nil | ||
| } | ||
|
|
||
| return toTaggedResources(b.InventoryResources(), apigatewayResourceType) |
There was a problem hiding this comment.
🟡 API Gateway resource type filters miss
For newly indexed API Gateway resources, registerInventoryProvider supplies types that taggingResourceSource discards. splitResource reads the leading slash as an empty type, so supported type filters miss both REST and HTTP APIs.
Learn more
API Gateway ARNs start their resource path with a slash, as shown by taggingARN and apigwResourceArn. The tagging bridge computes a type, but taggingResourceSource passes only ARN and tags to Resource Explorer. toCandidate reconstructs the type with splitResource, which splits at the first slash. That returns an empty type segment for both API Gateway versions, unlike the advertised supported resource types.
Example: Create an untagged HTTP API and search for resourcetype:apigateway:apis. The API has an ARN ending in :/apis/<id> and receives the type apigateway:, so the filter misses it.
Recommended fix: Parse API Gateway paths explicitly in splitResource, preserving supported nested kinds as well as top-level kinds, or pass authoritative Resource Explorer types across the bridge. Add type-filter assertions for each API version.
Was this helpful? React with 👍 or 👎 to provide feedback.
| certs := drainPages(func(token string) (page.Page[Certificate], error) { | ||
| return h.Backend.ListCertificates(ctx, ListCertificatesParams{NextToken: token, MaxItems: inventoryPageSize}) | ||
| }) |
There was a problem hiding this comment.
🟡 Missing untagged ECDSA certificates
After users request an untagged ECDSA certificate, resourceARNs omits it because ListCertificates defaults to RSA-1024 and RSA-2048. The certificate stays missing from Resource Explorer until it gets a tag.
Learn more
The ACM listing API defaults to RSA-1024 and RSA-2048 when KeyTypes is empty, as enforced by buildListCertFilters. The inventory separately merges tagged ARNs in InventoryResources, so certificates with other supported algorithms appear only when tagged.
Example: Request an EC_prime256v1 certificate without tags. The request succeeds, but the certificate never enters the inventory's certificate pages and Resource Explorer omits it.
Recommended fix: Pass every accepted key algorithm from the ACM listing contract or read the Region's unfiltered certificate store. Test discovery of an untagged ECDSA certificate while preserving the public ListCertificates default.
Was this helpful? React with 👍 or 👎 to provide feedback.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
📊 Code Coverage Report
📄 Impacted Files Breakdown
Tip This project maintains a minimum coverage threshold of 85%. Maintain or improve coverage on new code to ensure long-term stability. Last updated: Sun, 22 Nov 2026 04:05:08 GMT |
Summary
Two changes. Each feature commit was followed by an independent review pass; the review fixes are separate commits.
Resource Explorer: untagged resources are searchable
GetResourcesagree at each step.Timestream Query: checked arithmetic and casts
SUMraise an error on overflow instead of widening. Integer division or modulo by zero is an error; for doubles it gives Infinity or NaN.TRY_CASTandtryreturn NULL in those cases.max(x, n),min(x, n)andapprox_percentilewith an array of percentages return arrays; they returned NULL.PrepareQueryreturns named parameters typed by their use.Behaviour to be aware of: integer division by zero was NULL and is now an error;
TRY_CAST('x' AS bigint)was 0 and is now NULL;CAST(1.6 AS bigint)was 1 and is now 2. These follow the engine family's semantics; the exact error wording is unverified against the real service and is listed as open.Still open in the touched services
Resource Explorer 1 (ECS daemons keep their tags on the daemon record, so neither listing sees them). Timestream Query: constructs the type pass cannot parse still use value-based typing;
CAST('NaN' AS double)travels as text; a constant1/0is evaluated eagerly; interval plus interval fails; several documented functions are not implemented; integer literal typing and error wording unverified.Test plan
go build ./...,go vet ./...(pluse2e,integrationandterraformtags),go fix -diffempty./dashboard/...with-race -shuffle on -short./internal/appwith-race -shuffle on -short, leak suitegolangci-linton touched packages,./internal/app/...,./dashboard/...,./test/guards/...desktopmodule tidy and build🤖 Generated with Claude Code
https://claude.ai/code/session_01NVwMjLknMM32Xje6Qik6wY