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
{{ message }}
Repository navigation
ec2: filter values match exactly everywhere except DescribeInstanceTypeOfferings, where AWS documents wildcards for all of them #697
Filed out of #687. EC2's filtering guide documents wildcards in filter values generally,
not per operation:
Use the * wildcard to match zero or more characters. Use the ? wildcard to match zero
or one character. […] Escape a literal * or ? with a backslash.
Substrate honours them on DescribeInstanceTypeOfferings only — ec2FilterValueMatches and ec2globMatch (emulator/ec2_instancetypes.go) exist and have one caller. Every other
filter site compares with containsStr, which is exact equality, so tag:Name=web-* matches
nothing and DescribeInstances reports no instances where real EC2 reports several. An empty
answer is the failure mode a wait loop cannot distinguish from "not created yet".
DescribeTags makes this concrete: AWS's own Example 4 on that operation's page filters on ?ebserver, so the wildcards are not incidental to the offerings catalog.
The guide contradicts itself on ?: the wildcard table says "zero or one character" and a
later paragraph says "exactly one". ec2globMatch implements zero-or-one, from the table.
Whichever is chosen must be stated as substrate's reading with the contradiction recorded.
The guide also documents limits substrate enforces nowhere: 50 filters per request, 200
values in total, 255 characters per value. Worth deciding in the same change.
Acceptance criteria
Every EC2 filter match function routes value comparison through ec2FilterValueMatches rather than containsStr.
A table-driven test covering *, ?, a backslash-escaped literal, and
case-sensitivity, on at least DescribeInstances (tags) and DescribeVolumes.
docs/services.md' "Two gaps, deliberately left standing" paragraph updated, and the
wildcard table currently under "Offerings filters and wildcards" promoted to the shared
filter section.
Activity