mirror of
https://github.com/argoproj/argo-cd
synced 2026-04-21 17:07:16 +00:00
* Fix data race on err variable
==================
WARNING: DATA RACE
Write at 0x00c000621c30 by goroutine 29:
github.com/argoproj/gitops-engine/pkg/cache.(*clusterCache).sync.func1.1()
/gitops-engine/pkg/cache/cluster.go:548 +0x3a8
github.com/argoproj/gitops-engine/pkg/cache.(*clusterCache).processApi()
/gitops-engine/pkg/cache/cluster.go:479 +0x2cc
github.com/argoproj/gitops-engine/pkg/cache.(*clusterCache).sync.func1()
/gitops-engine/pkg/cache/cluster.go:536 +0x430
github.com/argoproj/gitops-engine/pkg/utils/kube.RunAllAsync.func1()
/gitops-engine/pkg/utils/kube/ctl.go:510 +0x45
golang.org/x/sync/errgroup.(*Group).Go.func1()
/Users/mikhail/go/pkg/mod/golang.org/x/sync@v0.0.0-20190911185100-cd5d95a43a6e/errgroup/errgroup.go:57 +0x85
Previous write at 0x00c000621c30 by goroutine 28:
github.com/argoproj/gitops-engine/pkg/cache.(*clusterCache).sync.func1.1()
/gitops-engine/pkg/cache/cluster.go:548 +0x3a8
github.com/argoproj/gitops-engine/pkg/cache.(*clusterCache).processApi()
/gitops-engine/pkg/cache/cluster.go:479 +0x2cc
github.com/argoproj/gitops-engine/pkg/cache.(*clusterCache).sync.func1()
/gitops-engine/pkg/cache/cluster.go:536 +0x430
github.com/argoproj/gitops-engine/pkg/utils/kube.RunAllAsync.func1()
/gitops-engine/pkg/utils/kube/ctl.go:510 +0x45
golang.org/x/sync/errgroup.(*Group).Go.func1()
/Users/mikhail/go/pkg/mod/golang.org/x/sync@v0.0.0-20190911185100-cd5d95a43a6e/errgroup/errgroup.go:57 +0x85
Goroutine 29 (running) created at:
golang.org/x/sync/errgroup.(*Group).Go()
/Users/mikhail/go/pkg/mod/golang.org/x/sync@v0.0.0-20190911185100-cd5d95a43a6e/errgroup/errgroup.go:54 +0x73
github.com/argoproj/gitops-engine/pkg/utils/kube.RunAllAsync()
/gitops-engine/pkg/utils/kube/ctl.go:509 +0x1a1
github.com/argoproj/gitops-engine/pkg/cache.(*clusterCache).sync()
/gitops-engine/pkg/cache/cluster.go:526 +0x98b
github.com/argoproj/gitops-engine/pkg/cache.(*clusterCache).EnsureSynced()
/gitops-engine/pkg/cache/cluster.go:592 +0xe9
github.com/argoproj/gitops-engine/pkg/cache.TestEnsureSynced()
/gitops-engine/pkg/cache/cluster_test.go:140 +0xe2
testing.tRunner()
/usr/local/Cellar/go/1.14.3/libexec/src/testing/testing.go:991 +0x1eb
Goroutine 28 (finished) created at:
golang.org/x/sync/errgroup.(*Group).Go()
/Users/mikhail/go/pkg/mod/golang.org/x/sync@v0.0.0-20190911185100-cd5d95a43a6e/errgroup/errgroup.go:54 +0x73
github.com/argoproj/gitops-engine/pkg/utils/kube.RunAllAsync()
/gitops-engine/pkg/utils/kube/ctl.go:509 +0x1a1
github.com/argoproj/gitops-engine/pkg/cache.(*clusterCache).sync()
/gitops-engine/pkg/cache/cluster.go:526 +0x98b
github.com/argoproj/gitops-engine/pkg/cache.(*clusterCache).EnsureSynced()
/gitops-engine/pkg/cache/cluster.go:592 +0xe9
github.com/argoproj/gitops-engine/pkg/cache.TestEnsureSynced()
/gitops-engine/pkg/cache/cluster_test.go:140 +0xe2
testing.tRunner()
/usr/local/Cellar/go/1.14.3/libexec/src/testing/testing.go:991 +0x1eb
==================
* More type safety
Make runState a new type rather
than a type alias
* Fix data race on runState variable
==================
WARNING: DATA RACE
Write at 0x00c0000d0b40 by goroutine 83:
github.com/argoproj/gitops-engine/pkg/sync.(*syncContext).runTasks.func5.1()
/gitops-engine/pkg/sync/sync_context.go:786 +0x68c
Previous write at 0x00c0000d0b40 by goroutine 84:
github.com/argoproj/gitops-engine/pkg/sync.(*syncContext).runTasks.func5.1()
/gitops-engine/pkg/sync/sync_context.go:786 +0x68c
Goroutine 83 (running) created at:
github.com/argoproj/gitops-engine/pkg/sync.(*syncContext).runTasks.func5()
/gitops-engine/pkg/sync/sync_context.go:778 +0x165
github.com/argoproj/gitops-engine/pkg/sync.(*syncContext).runTasks()
/gitops-engine/pkg/sync/sync_context.go:807 +0xb32
github.com/argoproj/gitops-engine/pkg/sync.(*syncContext).Sync()
/gitops-engine/pkg/sync/sync_context.go:265 +0x1b3d
github.com/argoproj/gitops-engine/pkg/sync.TestSyncFailureHookWithFailedSync()
/gitops-engine/pkg/sync/sync_context_test.go:532 +0x4e5
testing.tRunner()
/usr/local/Cellar/go/1.14.3/libexec/src/testing/testing.go:991 +0x1eb
Goroutine 84 (running) created at:
github.com/argoproj/gitops-engine/pkg/sync.(*syncContext).runTasks.func5()
/gitops-engine/pkg/sync/sync_context.go:778 +0x165
github.com/argoproj/gitops-engine/pkg/sync.(*syncContext).runTasks()
/gitops-engine/pkg/sync/sync_context.go:807 +0xb32
github.com/argoproj/gitops-engine/pkg/sync.(*syncContext).Sync()
/gitops-engine/pkg/sync/sync_context.go:265 +0x1b3d
github.com/argoproj/gitops-engine/pkg/sync.TestSyncFailureHookWithFailedSync()
/gitops-engine/pkg/sync/sync_context_test.go:532 +0x4e5
testing.tRunner()
/usr/local/Cellar/go/1.14.3/libexec/src/testing/testing.go:991 +0x1eb
==================
* Simplify
|
||
|---|---|---|
| .. | ||
| common | ||
| hook | ||
| ignore | ||
| resource | ||
| syncwaves | ||
| doc.go | ||
| reconcile.go | ||
| sync_context.go | ||
| sync_context_test.go | ||
| sync_phase.go | ||
| sync_phase_test.go | ||
| sync_task.go | ||
| sync_task_test.go | ||
| sync_tasks.go | ||
| sync_tasks_test.go | ||