fix(ci): apply gofmt to fix CI format check#150
Open
scion-gteam[bot] wants to merge 6 commits into
Open
Conversation
The CI format check has been failing on main for all recent commits due to struct field alignment and import ordering issues across 18 files. This applies `gofmt -w .` to fix them all.
command_bus_test.go uses recExec and requirePostgres from events_postgres_test.go, and broker_affinity_test.go uses newBroker and newTestProjectStore from project_store_test.go. Both source files are gated by //go:build !no_sqlite, but the consuming files were not, causing undefined symbol errors when CI runs `go vet -tags no_sqlite`.
When iamEndpoint is overridden (test mode), pass option.WithoutAuthentication() so the IAM credentials client doesn't try to find default GCP credentials, which are unavailable in CI.
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.
Summary
Format Checkstepgofmt -w .to fix struct field alignment and import ordering across 18 filesFiles fixed
pkg/config/settings_v1.go— struct field alignmentpkg/hub/command_bus.go— alignmentpkg/hub/command_bus_test.go— trailing newlinepkg/hub/dispatch_exec_test.go— struct alignment + one-liner function expansionpkg/hub/events_integration_test.go— alignmentpkg/hub/handlers.go— struct alignment + missing blank linepkg/hub/httpdispatcher.go— import ordering + struct alignmentpkg/hub/messagebroker.go— alignmentpkg/hub/notifications.go— alignmentpkg/hub/proxyauth.go— alignmentpkg/hub/reaper.go— alignmentpkg/hub/reconcile_test.go— one-liner function expansion + struct alignmentpkg/hub/transport_token.go— struct alignmentpkg/observability/dispatchmetrics/dispatchmetrics.go— const alignmentpkg/sciontool/hub/client.go— alignmentpkg/store/entadapter/composite.go— struct alignmentpkg/store/entadapter/message_store.go— struct alignmentpkg/store/models.go— alignmentTest plan
gofmt -l .returns no files after fixgo vet ./...passes clean