Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

fix: remove four pre-existing Go race-detector failures

Aperta
#247 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
go

Direzione di ricerca

Inizia con il comando di riproduzione e i quattro gruppi di test interessati. Esamina le posizioni indicate in project_context.go, gcloudui_test.go, posthog.go, posthog_coverage_test.go, schemer.go ed executor.go per comprendere ogni cluster di race. Il lavoro è completato quando le esecuzioni mirate del race detector hanno esito positivo e go test -race ./... non segnala più questi errori di baseline.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Summary

The Go race detector reports four independent pre-existing race clusters on unchanged main. These failures are outside the Incidentius execution-record changes, but they prevent a repository-wide go test -race ./... from being a clean release gate.

Reproduced on main at febb7aa with Go 1.27.1 on macOS arm64.

Reproduction

go test -race \
  ./apps/datatugapp/datatugui/dtviewers/clouds/gcloud/gcloudui \
  ./pkg/dtlog \
  ./pkg/schemers/sqlinfoschema \
  ./pkg/sqlexecute \
  -count=1

Observed race clusters

1. GCloud TUI tests and asynchronous callbacks

Affected tests include:

  • TestShowGCloudProjects_*
  • TestGoFirestoreCollection
  • TestAddAuthErrorItems_insufficientScopes_actions

Representative conflict: asynchronous UI callbacks read package/context state while the test restores or replaces the same state. One trace reads GCloudContext.GetProjects at project_context.go:31 while gcloudui_test.go:501 writes the callback used by showGCloudProjects.

2. PostHog configuration/client globals

Affected test:

  • TestGetPostHogClient_EmptyDistinctID

Representative conflicts:

  • withTempConfig writes config globals in posthog_coverage_test.go:32 while the package init goroutine reads them through readPostHogConfig at posthog.go:173.
  • Tests and the init goroutine concurrently write/read the package PostHog client and distinct-id globals around posthog.go:115-116.
3. SQL information-schema aggregation

Affected tests include TestGetDatabase_*, including base-table, view, columns-error, and constraints-error cases.

InformationSchema.GetDatabase launches parallel functions that concurrently read and write the same error/result slot at pkg/schemers/sqlinfoschema/schemer.go:54, :60, and :66.

4. Multi-database SQL execution

Affected test:

  • TestExecute_MultiDispatch

Parallel workers in Executor.executeMulti concurrently write the same result/error slot at pkg/sqlexecute/executor.go:80 (workers launched through line 91).

Expected

Each package passes its focused race-detector run, and repository-wide go test -race ./... can distinguish new Incidentius regressions from unrelated baseline races.

Suggested scope

Fix the four clusters independently or split them into child issues. Avoid serializing production work solely to satisfy tests where the production contract is intentionally concurrent; synchronize shared state or collect worker results by index/channel instead.

Lingua principale
Go
Stelle
1
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.