Skip to content

ec2: describeImages' valueless tag: filter behaves as tag-key, disagreeing with describeInstances #686

Closed

Description

@scttfrdmn

Two tag:<key> implementations disagree about an empty value list:

  • ec2InstanceMatchesFilter (emulator/ec2_plugin.go:867-875) matches nothing.
  • describeImages (:3398-3409) matches any value, i.e. behaves as tag-key.

#670 adopted the describeInstances rule for describeVolumes and deliberately left describeImages alone, because changing an unrelated operation's observable behaviour inside that PR would have been worse than the inconsistency. This issue is the reconciliation.

AWS documents no rule for the case. Using_Filtering says only "You can't specify a filter value of null", and it provides tag-key for the any-value question — which is the argument for match-nothing: if tag:Env with no value meant tag-key, tag-key would be redundant. Note that a filter value is also not reachable as absent through the SDK; the case arises from a hand-built query string, which is exactly what substrate's HTTP-tier tests do.

Acceptance criteria

  • One rule across every EC2 tag: site, documented in a comment that states AWS documents no rule and which way substrate reads it.
  • describeImages follows it, with a test at the HTTP tier pinning the chosen answer.
  • Any test that encoded the old describeImages behaviour is updated rather than deleted, so the change is visible in the diff.
  • CHANGELOG.md records it under ### Fixed as an observable change to DescribeImages.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: ec2area: taggingtype: bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions