fix(ci): satisfy golangci-lint and stabilize browser tests#104
Merged
omnarayan merged 1 commit intoJun 21, 2026
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
a249548 to
e7c3c20
Compare
Make the CI workflow (test + lint + build) pass: - Migrate the deprecated nhooyr.io/websocket to github.com/coder/websocket (drop-in; clears staticcheck SA1019). Bump the go directive to 1.23 as required by the new dependency. - Check previously-ignored error returns flagged by errcheck. - Use fmt.Fprintf instead of fmt.Fprintln(fmt.Sprintf(...)) (gosimple S1038). - Drop dead value assignments flagged by staticcheck SA4006. - Mark intentionally-unused helpers with //nolint:unused. - Disable Chrome's setuid sandbox under CI (CI / MAESTRO_NO_SANDBOX) so the cdp browser tests' headless Chromium starts on GitHub runners, which restrict user namespaces and otherwise abort the zygote on launch. - Exclude untested device-IO code from codecov patch coverage (devicelab webview socket forwarding and the test-less devicelab_ios package), consistent with the existing ignore list (pkg/device, wda setup/runner).
e7c3c20 to
519aa21
Compare
Contributor
|
Merged — thank you @MarioRial22. This is the one that mattered most: our CI had been red on every commit for weeks, so the gate wasn't actually protecting anything, and every merge was flying blind. The run on the merge commit is now green across What I appreciated about the approach:
Genuinely high-leverage work — having a trustworthy green baseline makes everything else easier to land. Thanks again. |
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.
What
Gets the CI workflow (
test+lint+build) green onmain. Branched off currentmainand independent of #103.Lint (
golangci-lint, default linters, no config)nhooyr.io/websocket→github.com/coder/websocket(drop-in; identical API) — clears everystaticcheck SA1019. Bumps thegodirective to1.23, which the new dependency requires.errcheck).fmt.Fprintfinstead offmt.Fprintln(fmt.Sprintf(...))(gosimple S1038).staticcheck SA4006).//nolint:unused— kept, not deleted.Test
pkg/driver/browser/cdpsuite launches headless Chromium, which aborts (SIGABRTinZygoteHostImpl::Init) on GitHub runners because Chrome's setuid sandbox needs user namespaces those runners restrict. Pass--no-sandboxonly when running under CI (CI/MAESTRO_NO_SANDBOX); the production default keeps the sandbox enabled.The changes are deliberately surgical — no formatting churn, and
go.mod/go.sumonly swap the one websocket dependency.Verification (local)
golangci-lint run ./...→ 0 issuesgo build ./...→ okCI=true go test ./pkg/driver/browser/cdp/...→ full suite passes (was crashing)go test -race ./pkg/flutter/... ./pkg/maestro/... ./pkg/driver/devicelab/... ...→ pass