fix(s3,dynamodb,athena,route53,cloudwatch,ses,firehose): correct output/filter/pagination divergences (bug-hunt)#2315
Merged
Merged
Conversation
…ut/filter/pagination divergences (bug-hunt)
…ETag + MessageRejected unverified sender
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Eight confirmed correctness fixes to existing modeled operations, one per divergence found in a bug-hunt. Each is an independent small fix; grouped into one PR.
GetObjectAttributesETag over-quoted (fakecloud-s3): the<ETag>element wrapped the value in"quotes. AWS returns the GetObjectAttributes ETag WITHOUT surrounding quotes (unlike GetObject/HeadObject) for both single-part (md5) and multipart (md5-N) objects. Now emitted unquoted.Queryon a sparse GSI/LSI returned phantom rows (fakecloud-dynamodb):query()filteredtable.itemsby the key condition only, so items missing an index key attribute (absent from the index on AWS) were still returned, inflating Items/Count/ScannedCount. Now skips items lacking any of the index's key attributes, mirroring the existingscan()guard.GetQueryResultstruncated with no pagination (fakecloud-athena): inputNextTokenwas ignored and no outputNextTokenwas emitted, so result sets larger thanMaxResultswere unreachable past page 1. Now honorsMaxResults+NextToken(offset cursor), emits aNextTokenwhen more rows remain, and only emits the column-header row on the first invocation. Header emission is keyed on token-absence (notoffset == 0) soMaxResults=1terminates instead of looping.ListResourceRecordSetswrong sort order (fakecloud-route53): sorted by plain forward ASCII name; AWS sorts by reversed-label DNS name (com.example.www) then type. Now uses the existingreverse_dns_key()for both the sort and theNextRecordName/NextRecordTypecursor.ListMetricsdropped a name-onlyDimensionFilter(fakecloud-cloudwatch): a filter with a Name but no Value (Value is optional in the model) yielded an empty filter and returned every metric in the namespace. Addedparse_dimension_filters(value-optional); a name-only filter matches any metric carrying that dimension name, Name+Value stays exact-match.SendEmailwrong error for unverified sender (fakecloud-ses): returnedMailFromDomainNotVerifiedExceptionwhere AWS returnsMessageRejected("Email address is not verified. The following identities failed the check...").MailFromDomainNotVerifiedExceptionis reserved for an unverified custom MAIL FROM domain. Now matches the v1 path. Updated the three tests that baked in the wrong class.ListContactsignoredFilter(fakecloud-ses): returned every contact. Now appliesFilteredStatus(OPT_IN/OPT_OUT via the contact's overall status) andTopicFilter(per-topic subscription status, with default fallback whenUseDefaultIfPreferenceUnavailable).ListTagsForDeliveryStreamignoredLimit/ExclusiveStartTagKey, hardcodedHasMoreTags:false(fakecloud-firehose): now honorsLimit(1-50) +ExclusiveStartTagKey, returns one page, and setsHasMoreTags:truewhen more remain, mirroringListDeliveryStreams.Test plan
MaxResults=1termination case), Route53 reversed-label order, CloudWatch name-only filter narrows results, SES v2 unverified sender ->MessageRejected(existing test updated),ListContactsFilteredStatus + TopicFilter narrow results, Firehose tag pagination.cargo test -p fakecloud-s3 -p fakecloud-dynamodb -p fakecloud-athena -p fakecloud-route53 -p fakecloud-cloudwatch -p fakecloud-ses -p fakecloud-firehose— all green.cargo clippy --all-targets -- -D warningsfor each touched crate — clean.cargo fmt— clean.Surface sync
Correctness fixes to existing modeled operations only — no new API surface, operation, or field, and no SDK change. No SDK/docs/metadata sync needed.
Summary by cubic
Fixes eight AWS compatibility bugs across S3, DynamoDB, Athena, Route53, CloudWatch, SES, and Firehose. Aligns outputs, filtering, and pagination with AWS to prevent wrong results and unreachable pages.
fakecloud-s3:GetObjectAttributesnow returns an unquoted ETag (single-part and multipart).fakecloud-dynamodb:Queryon GSIs/LSIs skips items missing index keys to avoid phantom rows/counts.fakecloud-athena:GetQueryResultshonorsMaxResults/NextToken, emits header only on the first page, and paginates correctly (incl.MaxResults=1).fakecloud-route53:ListResourceRecordSetssorts by reversed-label DNS name then type; cursors use the same key.fakecloud-cloudwatch:ListMetricsappliesDimensionFilterwhen onlyNameis set (matches any value).fakecloud-ses:SendEmailandSendCustomVerificationEmailreturnMessageRejectedfor unverified senders;MailFromDomainNotVerifiedExceptionis no longer used here.fakecloud-ses:ListContactsappliesFilter.FilteredStatusandTopicFilter(withUseDefaultIfPreferenceUnavailable).fakecloud-firehose:ListTagsForDeliveryStreamsupportsLimitandExclusiveStartTagKeyand setsHasMoreTagswhen more tags exist.Written for commit b014e90. Summary will update on new commits.