fix: Fix opentelemetry dependencies issues (#1122)

Signed-off-by: Heba Elayoty <hebaelayoty@gmail.com>
This commit is contained in:
Heba Elayoty
2023-06-15 18:23:16 -07:00
committed by GitHub
parent ad4739b7e4
commit 077ee93fa2
11 changed files with 270 additions and 483 deletions

View File

@@ -111,15 +111,15 @@ func ExtractFieldPathAsString(obj interface{}, fieldPath string) (string, error)
// SplitMaybeSubscriptedPath checks whether the specified fieldPath is
// subscripted, and
// - if yes, this function splits the fieldPath into path and subscript, and
// returns (path, subscript, true).
// - if no, this function returns (fieldPath, "", false).
// - if yes, this function splits the fieldPath into path and subscript, and
// returns (path, subscript, true).
// - if no, this function returns (fieldPath, "", false).
//
// Example inputs and outputs:
// - "metadata.annotations['myKey']" --> ("metadata.annotations", "myKey", true)
// - "metadata.annotations['a[b]c']" --> ("metadata.annotations", "a[b]c", true)
// - "metadata.labels['']" --> ("metadata.labels", "", true)
// - "metadata.labels" --> ("metadata.labels", "", false)
// - "metadata.annotations['myKey']" --> ("metadata.annotations", "myKey", true)
// - "metadata.annotations['a[b]c']" --> ("metadata.annotations", "a[b]c", true)
// - "metadata.labels[]" --> ("metadata.labels", "", true)
// - "metadata.labels" --> ("metadata.labels", "", false)
func SplitMaybeSubscriptedPath(fieldPath string) (string, string, bool) {
if !strings.HasSuffix(fieldPath, "']") {
return fieldPath, "", false

View File

@@ -1,3 +1,4 @@
//go:build e2e
// +build e2e
package e2e
@@ -48,7 +49,7 @@ func teardown() error {
return nil
}
// Provider-specific shouldSkipTest function
// Provider-specific shouldSkipTest function
func shouldSkipTest(testName string) bool {
return false
}