mirror of https://github.com/hashicorp/consul
Backport of NET-7025 - ci: test-integrations failures in compatibility tests. panics occuring in selectionTracker.TrackIDForSelection into release/1.17.x (#20230)
* backport of commitpull/20235/head2b3b309d34
* backport of commit1740fe71a0
--------- Co-authored-by: John Murret <john.murret@hashicorp.com>
parent
cd8f8bf4cf
commit
39d60cd8d8
|
@ -72,6 +72,10 @@ func (t *WorkloadSelectionTracker) GetIDsForWorkload(id *pbresource.ID) []*pbres
|
||||||
// TrackIDForSelector will associate workloads matching the specified workload
|
// TrackIDForSelector will associate workloads matching the specified workload
|
||||||
// selector with the given resource id.
|
// selector with the given resource id.
|
||||||
func (t *WorkloadSelectionTracker) TrackIDForSelector(id *pbresource.ID, selector *pbcatalog.WorkloadSelector) {
|
func (t *WorkloadSelectionTracker) TrackIDForSelector(id *pbresource.ID, selector *pbcatalog.WorkloadSelector) {
|
||||||
|
if selector == nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
t.lock.Lock()
|
t.lock.Lock()
|
||||||
defer t.lock.Unlock()
|
defer t.lock.Unlock()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue