Repository navigation
fix(logs): resolve trailing-colon query ARNs - #5954
Conversation
PR Summary by QodoFix StartQuery resolution of Grafana trailing-colon log group ARNs
AI Description
Diagram
High-Level Assessment
Files changed (3)
|
Code Review by Qodo
1.
|
pgermosen
left a comment
There was a problem hiding this comment.
@aniketshukla1 thanks, keeping the colon form to logGroupIdentifiers and to a full Logs ARN reads right, and it is what Grafana sends: buildLogGroupIdentifiers trims only the *, in its monitoring-account branch.
(follow-up, separate PR) Every ARN form still drops the ARN's account and region, so an identifier naming another account queries the caller's group of the same name instead of failing.
Summary
Closes #5947.
StartQuery.logGroupIdentifiers, without changing name selectors or the shared ARN resolver used by other Logs APIs.:*:suffixes, plain names ending in a colon, and missing groups still fail.:*, and the colon form obtained by removing*fromDescribeLogGroups.arn; cover commercial, GovCloud, and China partitions plus mixed-identifier deduplication.Type of change
fix:)feat:)feat!:orfix!:)AWS Compatibility
The incorrect behavior was resolving the Grafana identifier to a group name that still included its trailing colon, causing
ResourceNotFoundExceptionfor an existing group. The canonical ARN and:*forms already worked.This is a narrowly scoped Floci client-compatibility tolerance. The AWS StartQuery reference documents the canonical ARN, not the bare-colon spelling. Live AWS acceptance of that spelling remains unverified; this PR does not claim otherwise. Existing selector validation, group existence checks, and other APIs' ARN handling are unchanged.
Validation:
:*:acceptance in the initial implementation before tightening it. A separate mutation removing the ARN-only guard was caught by the non-ARN-marker regression.:*forms. A mutation allowing empty or short account fields was caught by two regression cases, then restored.CloudWatchLogsQueryIdentifiersIntegrationTest,CloudWatchLogsHandlerTest,CloudWatchLogsInsightsQueryTest,CloudWatchLogsInputConstraintTest, andCloudWatchLogsServiceTest../mvnw -o -B -ntp checkstyle:check,make docs-check partition-check, andgit diff --checkpassed.Checklist
./mvnw testpasses locally