Repository navigation
Conversation
…ess (#907) pkg/integration/orchestrator_test.go imported pkg/orchestrator, which #862 deleted as dead code (#811). The test sat behind //go:build integration, and nothing in make check or CI compiles that tag, so build, vet and test all stayed green while `go mod tidy` failed outright. It covered only the deleted package (LoadConfig, New, scaling decisions) plus a registry.EnsureTable call that hybrid_test.go already exercises, so there is nothing to port. With tidy runnable again, the root module drops robfig/cron (required only by the deleted package) and promotes spf13/pflag to direct (cmd tests import it). lambda/dashboard-api drops an unused service/sqs requirement. The gate: scripts/check-tidy.sh runs `go mod tidy -diff` over every go.mod in the repo, discovered rather than listed, and refuses to pass if discovery misses the root module. Tidy is the only tool here that loads every build tag, which is why it is the one that could see this. Wired into `make check` (step 6) and CI as `make check-tidy`. Watched it fail against the restored test, main's untidy go.mod/go.sum, and a nested module with an unused require. Fixes #907
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
scttfrdmn
added a commit
that referenced
this pull request
Oct 15, 2026
The root integration_test.go had not compiled since the initial release: `config.LoadDefaultConfig` with the package imported as awsconfig, and loadAWSConfig declared to return the awsconfig.Config interface instead of aws.Config. Nothing in make check or CI vetted the integration tag, so it went unseen. pkg/integration/orchestrator_test.go (#907, the deleted orchestrator) is removed here as well, identically to #914, so the new gate passes either way. The scheduler tests are removed. They wrote parameter_file_key/execution_time/ cron_expression items, which the scheduler has never read (it reads s3_params_key/schedule_expression), and waited for execution to follow a DynamoDB edit, but schedules fire from EventBridge Scheduler. Their inline param files used a pre-defaults/params format and set no TTL. The queue tests and the result-collection test were t.Skip placeholders. The make targets that ran only those tests are removed. The surviving multi-region sweep tests launch real instances and now meet the cost-safety rule. cancelSweep passes --yes: without it, cancel prompted, read EOF and terminated nothing. Cancel runs from a t.Cleanup registered at launch, so a mid-test t.Fatalf can't skip it. A leak-check then polls EC2 directly in every region the param file names, terminates anything still tagged with the sweep ID, and fails the test. test-integration builds bin/spawn first and runs -count=1. scripts/check-build-tags.sh discovers custom tags from //go:build lines per module and runs `go vet -tags <tag> ./...` for each; nothing is executed. It fails when no tag is found anywhere, and when a tagged file was compiled by no single-tag run (a combination such as `a && b`). Wired in as make check-build-tags, step 6 of make check, and a CI step.
scttfrdmn
added a commit
that referenced
this pull request
Oct 15, 2026
#927) * Make integration-tagged tests compile, and gate every build tag (#913) The root integration_test.go had not compiled since the initial release: `config.LoadDefaultConfig` with the package imported as awsconfig, and loadAWSConfig declared to return the awsconfig.Config interface instead of aws.Config. Nothing in make check or CI vetted the integration tag, so it went unseen. pkg/integration/orchestrator_test.go (#907, the deleted orchestrator) is removed here as well, identically to #914, so the new gate passes either way. The scheduler tests are removed. They wrote parameter_file_key/execution_time/ cron_expression items, which the scheduler has never read (it reads s3_params_key/schedule_expression), and waited for execution to follow a DynamoDB edit, but schedules fire from EventBridge Scheduler. Their inline param files used a pre-defaults/params format and set no TTL. The queue tests and the result-collection test were t.Skip placeholders. The make targets that ran only those tests are removed. The surviving multi-region sweep tests launch real instances and now meet the cost-safety rule. cancelSweep passes --yes: without it, cancel prompted, read EOF and terminated nothing. Cancel runs from a t.Cleanup registered at launch, so a mid-test t.Fatalf can't skip it. A leak-check then polls EC2 directly in every region the param file names, terminates anything still tagged with the sweep ID, and fails the test. test-integration builds bin/spawn first and runs -count=1. scripts/check-build-tags.sh discovers custom tags from //go:build lines per module and runs `go vet -tags <tag> ./...` for each; nothing is executed. It fails when no tag is found anywhere, and when a tagged file was compiled by no single-tag run (a combination such as `a && b`). Wired in as make check-build-tags, step 6 of make check, and a CI step. * Consolidate CHANGELOG groups after rebase
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.
Fixes #907
Why it broke
#862 (dead-code removal, #811) deleted
pkg/orchestrator, butpkg/integration/orchestrator_test.gostill imported it. That file is//go:build integration, and nothing inmake checkor CI compiles that tag, so build, vet and test stayed green whilego mod tidyfailed outright. The test only covered the deleted package (LoadConfig,New, scaling decisions), plus oneregistry.EnsureTablecall thathybrid_test.goalready makes. Nothing left to port, so it is removed.Tidy result (checked: no churn)
github.com/robfig/cron/v3, which only the deleted package required. Promotesgithub.com/spf13/pflagto direct, becausecmd/flag_arity_test.goandcmd/inert_flags_test.goimport it.lambda/dashboard-api: drops an unusedaws-sdk-go-v2/service/sqsrequirement (no import of it anywhere in that module).Gate
scripts/check-tidy.shrunsgo mod tidy -diffon everygo.modin the repo. The modules are found by the samefindthatscripts/nested-modules.shuses, plus the root, and the script refuses to pass if that search doesn't find./go.mod.-diffexits non-zero in two cases: when tidy would rewrite the files, and when tidy can't run at all (the #907 case). Wired in as:make check-tidy, and step 6 ofmake checkmake check-tidy). CI doesn't runmake check; it calls individual targets.Watched it fail (exit 2) against each of these, then restored:
pkg/orchestrator: no matching versions for query "latest"requireappended tolambda/ttl-reaper/go.mod: diff shownIt also exits 1 when run from a directory with no modules. Clean on Go 1.27.2 and on CI's 1.26.9 (
GOTOOLCHAIN=go1.26.9).Conflict with #900
#900 hand-edits
go.modto drop// indirectfromgolang.org/x/term, leaving it in the indirect block. The hunks don't overlap textually. But once both are merged,go mod tidywill want to movex/terminto the direct block, so this new gate will fail on whichever PR lands second. The fix is to rungo mod tidyon that branch and commit the result.Not in scope, filed
#913: the root
integration_test.gohas never compiled under-tags integration(undefined: config, then a wrongawsconfig.Configreturn type). Tidy can't catch type errors. It's left alone here because those tests launch billable instances and need a cost-safety review before they're revived.Local
make checkEverything passes except the known Docker-only
TestGenerateWrapper_ChownFixesCrossUIDStickyUnlink_Docker(no Docker locally).check-nested(9 modules) andcheck-tidy(10 modules) were run separately and pass.