Backport of NET-7025 - ci: test-integrations failures in compatibility tests. panics occuring in selectionTracker.TrackIDForSelection into release/1.17.x (#20230)

* backport of commit 2b3b309d34

* backport of commit 1740fe71a0

---------

Co-authored-by: John Murret <john.murret@hashicorp.com>
pull/20235/head
hc-github-team-consul-core 2024-01-16 16:55:51 -06:00 committed by GitHub
parent cd8f8bf4cf
commit 39d60cd8d8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -72,6 +72,10 @@ func (t *WorkloadSelectionTracker) GetIDsForWorkload(id *pbresource.ID) []*pbres
// TrackIDForSelector will associate workloads matching the specified workload
// selector with the given resource id.
func (t *WorkloadSelectionTracker) TrackIDForSelector(id *pbresource.ID, selector *pbcatalog.WorkloadSelector) {
if selector == nil {
return
}
t.lock.Lock()
defer t.lock.Unlock()