Repository navigation
fix: DescribeInstances multi-filter + tag: support (#305); bump Go toolchain to 1.26.4 - #307
Merged
Merged
Conversation
…olchain to 1.26.4 #305: describeInstances only read Filter.1 and only honored instance-state-name, silently dropping Filter.2+ and all tag: filters — returning instances the caller filtered out (order-dependent). Now uses the shared extractEC2Filters helper and AND-combines all filters via new ec2InstanceMatchesFilters; supports instance-state-name/-code, instance-id, instance-type, image-id, vpc-id, subnet-id, key-name, tag:<key>, tag-key. Unknown keys match nothing (never silently pass). Regression test covers launch+tag → terminate → state-filtered describe excludes it, plus filter-order independence. Security: bump go.mod + test/e2e/go.mod toolchain to go1.26.4 to clear call-reachable stdlib advisories (GO-2026-5039 net/textproto, GO-2026-5037 crypto/x509); govulncheck now reports zero call-reachable vulnerabilities. make test (race) + lint clean on 1.26.4. Closes #305
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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.
Two related correctness/security fixes.
#305 — DescribeInstances filter bug (Fixed)
describeInstancesonly readFilter.1and only honouredinstance-state-name, so anyFilter.2+and alltag:filters were silently dropped — returning instances the caller had explicitly filtered out. Order-dependent: arunning-only query led by atag:filter would still return terminated instances. Found by spawn's Tier 0 CLI-against-substrate suite.Fix: adopt the shared
extractEC2Filtershelper (the same onedescribeRouteTablesadopted in #293) and AND-combine every filter via a newec2InstanceMatchesFilters. Supported keys:instance-state-name,instance-state-code,instance-id,instance-type,image-id,vpc-id,subnet-id,key-name,tag:<key>,tag-key. Unknown filter keys match nothing rather than silently passing (the cardinal sin the issue calls out).Tests: the exact acceptance scenario (launch+tag → describe with
[tag:spawn:managed=true, instance-state-name=running]returns it, then terminate → same query excludes it), plus filter-order independence and the unknown-key case. Existing EC2 suite stays green.Note:
availability-zone/placement.availability-zoneis not supported —EC2Instancehas no AZ field today; it falls to the match-nothing path. Out of scope here; can be added with the field later.Go toolchain → 1.26.4 (Security)
The
Go Vulnerability Checkwas failing onmain(and on PR #304) due to call-reachable stdlib advisories — GO-2026-5039 (net/textproto, reachable viahttp.Server.Serve) and GO-2026-5037 (crypto/x509) — fixed in go1.26.4 while CI built with 1.26.3. Addedtoolchain go1.26.4togo.modandtest/e2e/go.mod; CI readsgo-version-file: go.mod, so it now installs the patched toolchain. Verified locally:govulncheck ./...→ 0 call-reachable vulnerabilities.make test(race) +make lintclean on 1.26.4.Closes #305