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: an empty filter value list matches everything on DescribeSecurityGroups and in ec2FilterAccepts #696
Filed out of #687, which unified what an unrecognized filter name does and deliberately
left two divergences over what an empty value list does.
Most sites treat a filter with no values as matching nothing (containsStr(nil, x) is
false), which #686 made substrate's stated rule. Two do not:
describeSecurityGroups (emulator/ec2_plugin.go) guards each arm with ok && len(vals) > 0 &&, so Filter.1.Name=group-name with no Filter.1.Value.1 returns every security group.
ec2FilterAccepts (emulator/ec2_instancetypes.go) returns true for an empty value list,
with a comment asserting a rationale.
So the same malformed request is an empty answer on one operation and an unfiltered answer on
another. Both are silent — neither refuses — and #686 settled that this shape means "matches
nothing", so these are the two sites that do not yet follow it.
Out of #687's scope because reconciling them changes the observable answer on two operations #687 does not name, and each existing comment argues for the behaviour it has: those
arguments need answering rather than deleting.
Acceptance criteria
Decide whether an empty value list matches nothing everywhere, or is refused (AWS says
only "You can't specify a filter value of null", so either is substrate's reading and
must be recorded as such).
Both sites follow the decision; the comments asserting the old rationale are rewritten,
not removed.
A test per site pinning the chosen answer, plus one confirming the majority sites are
unchanged.
docs/services.md' "Filter semantics that apply everywhere" gains the rule.
Activity
fix(ec2): a filter naming no values matches nothing, everywhere (#696) (