Skip to content

bug(tests): Occasional data race reported in the tests #18241

@hermanschaaf

Description

@hermanschaaf

This seems to have been happening for a while. One example run here, another here

WARNING: DATA RACE
Write at 0x0000038a2388 by goroutine 1095:
  github.com/cloudquery/cloudquery/cli/cmd.NewCmdRoot.func1()
      /home/runner/work/cloudquery/cloudquery/cli/cmd/root.go:88 +0x9a
  github.com/spf13/cobra.(*Command).execute()
      /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:954 +0xd75
  github.com/spf13/cobra.(*Command).ExecuteC()
      /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:1115 +0x657
  github.com/spf13/cobra.(*Command).Execute()
      /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:1039 +0xa6
  github.com/cloudquery/cloudquery/cli/cmd.TestTables.func1()
      /home/runner/work/cloudquery/cloudquery/cli/cmd/tables_test.go:60 +0xa1
  testing.tRunner()
      /opt/hostedtoolcache/go/1.21.5/x64/src/testing/testing.go:1595 +0x261
  testing.(*T).Run.func1()
      /opt/hostedtoolcache/go/1.21.5/x64/src/testing/testing.go:1648 +0x44

Previous read at 0x0000038a2388 by goroutine 1085:
  github.com/rs/zerolog.(*Event).Timestamp()
      /home/runner/go/pkg/mod/github.com/rs/zerolog@v1.33.0/event.go:687 +0x1da
  github.com/rs/zerolog.timestampHook.Run()
      /home/runner/go/pkg/mod/github.com/rs/zerolog@v1.33.0/context.go:353 +0x3e
  github.com/rs/zerolog.(*timestampHook).Run()
      <autogenerated>:1 +0x17
  github.com/rs/zerolog.(*Event).msg()
      /home/runner/go/pkg/mod/github.com/rs/zerolog@v1.33.0/event.go:143 +0x103
  github.com/rs/zerolog.(*Event).Msg()
      /home/runner/go/pkg/mod/github.com/rs/zerolog@v1.33.0/event.go:110 +0x5fa
  github.com/cloudquery/cloudquery/cli/cmd.syncConnectionV3.func3()
      /home/runner/work/cloudquery/cloudquery/cli/cmd/sync_v3.go:267 +0x44c
  github.com/vnteamopen/godebouncer.(*Debouncer).invokeTriggeredFunc.func1()
      /home/runner/go/pkg/mod/github.com/cloudquery/godebouncer@v0.0.0-20240220152946-054f7dbbcf18/debouncer.go:124 +0xb8

Goroutine 1095 (running) created at:
  testing.(*T).Run()
      /opt/hostedtoolcache/go/1.21.5/x64/src/testing/testing.go:1648 +0x845
  github.com/cloudquery/cloudquery/cli/cmd.TestTables()
      /home/runner/work/cloudquery/cloudquery/cli/cmd/tables_test.go:58 +0x1c4
  testing.tRunner()
      /opt/hostedtoolcache/go/1.21.5/x64/src/testing/testing.go:1595 +0x261
  testing.(*T).Run.func1()
      /opt/hostedtoolcache/go/1.21.5/x64/src/testing/testing.go:1648 +0x44

Goroutine 1085 (running) created at:
  time.goFunc()
      /opt/hostedtoolcache/go/1.21.5/x64/src/time/sleep.go:176 +0x44

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions