Skip to content

refactor(aws): finish pkg/aws split — EFS/pricing out of client.go (#325) - #357

Merged
scttfrdmn merged 1 commit into
mainfrom
refactor/325-efs-pricing-split
Jul 15, 2026
Merged

scttfrdmn merged 1 commit into
mainfrom
refactor/325-efs-pricing-split

Conversation

@scttfrdmn

Copy link
Copy Markdown
Contributor

Finishes the pkg/aws god-package split started in #336.

What

  • GetEFSDNSName → new pkg/aws/efs.go
  • LookupEC2OnDemandPrice + its regionToLocationName map → new pkg/aws/pricing.go (the map is used only by that function, so it moves with it)
  • Dropped the now-unused encoding/json, strconv, awspricing, pricingtypes imports from client.go

Why

The audit (#328) flagged client.go as an oversized grab-bag. #336 already extracted iam/securitygroup/tags/cleanup; this moves the last EFS + pricing tail so client.go is a cohesive client/launch/lifecycle core (1350 → 1251 LOC).

Safety

Same-package move — every package aws file, so all callers and the exported API (aws.GetEFSDNSName, aws.LookupEC2OnDemandPrice) are byte-for-byte unchanged. No behavior change.

  • go build ./... clean
  • go test ./pkg/aws green (incl. TestBuildInlinePolicy count assertion, unaffected)
  • gofmt/go vet clean

Closes #325.

Finish the pkg/aws god-package split begun in #336. GetEFSDNSName moves to
efs.go; LookupEC2OnDemandPrice and its regionToLocationName map move to
pricing.go (the map is only used by that function). Same-package move — all
callers and the exported API are unchanged. client.go drops from 1350 to 1251
LOC of cohesive client/launch/lifecycle code.

Closes #325.
@scttfrdmn
scttfrdmn merged commit 9149446 into main Jul 15, 2026
6 checks passed
@scttfrdmn
scttfrdmn deleted the refactor/325-efs-pricing-split branch July 15, 2026 20:22
@codecov

codecov Bot commented Jul 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 54 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
pkg/aws/pricing.go 0.00% 52 Missing ⚠️
pkg/aws/efs.go 0.00% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[audit] Structural (design): pkg/aws is a god package — split opportunistically along domain files

1 participant