Skip to content

Commit 4a20415

Browse files
authored
Merge pull request #321 from vshn/fix/kc_db_pw_racecondition
Also check for non empty value when waiting for connection details
2 parents 71a09a5 + 92113ea commit 4a20415

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/comp-functions/runtime/function_mgr.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1080,7 +1080,7 @@ func (s *ServiceRuntime) WaitForDesiredDependencies(mainResource string, depende
10801080
}
10811081

10821082
// WaitForObservedDependenciesWithConnectionDetails does the same as WaitForDependencies but additionally also checks the given list of fields against the
1083-
// available connection details.
1083+
// available connection details. It checks whether the field exists and has a non-empty value.
10841084
// objectCDMap should contain a map where the key is the name of the dependeny and the string slice the necessary connection detail fields.
10851085
func (s *ServiceRuntime) WaitForObservedDependenciesWithConnectionDetails(mainResource string, objectCDMap map[string][]string) (bool, error) {
10861086
// If the main resource already exists we're done here
@@ -1100,7 +1100,7 @@ func (s *ServiceRuntime) WaitForObservedDependenciesWithConnectionDetails(mainRe
11001100
}
11011101

11021102
for _, field := range cds {
1103-
if _, ok := cd[field]; !ok {
1103+
if val, ok := cd[field]; !ok || len(val) == 0 {
11041104
return false, nil
11051105
}
11061106
}

0 commit comments

Comments
 (0)