Skip to content

[v2] Fix test failure in flytestdlib #6856

@machichima

Description

@machichima

There's some test failure under flytestdlib. We should fix it to let all tests passed

❯ go test ./...
ok      github.com/flyteorg/flyte/v2/flytestdlib/atomic (cached)
ok      github.com/flyteorg/flyte/v2/flytestdlib/bitarray       (cached)
ok      github.com/flyteorg/flyte/v2/flytestdlib/cache  (cached)
?       github.com/flyteorg/flyte/v2/flytestdlib/cache/mocks    [no test files]
ok      github.com/flyteorg/flyte/v2/flytestdlib/config (cached)
ok      github.com/flyteorg/flyte/v2/flytestdlib/config/files   (cached)
time="2026-01-12T10:45:17-08:00" level=error msg="Failed to umarshal Data: 0. Error: NamedType should be a string, got 0. Skipping jsonUnmarshalHook"
time="2026-01-12T10:45:17-08:00" level=error msg="Failed to umarshal Data: 0. Error: NamedType should be a string, got 0. Skipping jsonUnmarshalHook"
time="2026-01-12T10:45:17-08:00" level=info msg="[0] Couldn't find a config file []. Relying on env vars and pflags."
time="2026-01-12T10:45:17-08:00" level=info msg="Refreshed config in response to file(s) change."
--- FAIL: TestAccessor_UpdateConfig (5.13s)
    --- FAIL: TestAccessor_UpdateConfig/[Viper]_Change_handler_k8s_configmaps (5.01s)
        accessor_test.go:575: Real config file location: /var/folders/27/52rf9wx95tvfqzcw0t_x7qqc0000gn/T/config-test-57317931/data1/config.yaml
        accessor_test.go:591: Config file location: /var/folders/27/52rf9wx95tvfqzcw0t_x7qqc0000gn/T/config-test-57317931/config.yaml
        accessor_test.go:486: First value: Hello World 3852987979077120657
        accessor_test.go:496: New value written to file: Hello World 16156036451985617192
        accessor_test.go:502: New config Location: /var/folders/27/52rf9wx95tvfqzcw0t_x7qqc0000gn/T/config-test-57317931/data2/config.yaml
        accessor_test.go:509:
                Error Trace:    /Users/nary/workData/open-source/flyte-v2/flytestdlib/config/tests/accessor_test.go:509
                Error:          Should not be: "Hello World 3852987979077120657"
                Test:           TestAccessor_UpdateConfig/[Viper]_Change_handler_k8s_configmaps
        accessor_test.go:580: Removing watchDir [/var/folders/27/52rf9wx95tvfqzcw0t_x7qqc0000gn/T/config-test-57317931]
time="2026-01-12T10:45:22-08:00" level=info msg="[0] Couldn't find a config file []. Relying on env vars and pflags."
FAIL
FAIL    github.com/flyteorg/flyte/v2/flytestdlib/config/tests   5.392s
ok      github.com/flyteorg/flyte/v2/flytestdlib/config/viper   (cached)
ok      github.com/flyteorg/flyte/v2/flytestdlib/contextutils   (cached)
ok      github.com/flyteorg/flyte/v2/flytestdlib/database       (cached)
ok      github.com/flyteorg/flyte/v2/flytestdlib/errors (cached)
ok      github.com/flyteorg/flyte/v2/flytestdlib/fastcheck      (cached)
?       github.com/flyteorg/flyte/v2/flytestdlib/fastcheck/mocks        [no test files]
ok      github.com/flyteorg/flyte/v2/flytestdlib/futures        (cached)
?       github.com/flyteorg/flyte/v2/flytestdlib/grpcutils      [no test files]
ok      github.com/flyteorg/flyte/v2/flytestdlib/internal/utils (cached)
ok      github.com/flyteorg/flyte/v2/flytestdlib/ioutils        (cached)
ok      github.com/flyteorg/flyte/v2/flytestdlib/logger (cached)
--- FAIL: TestRegisterTracerProviderWithContext (0.00s)
    factory_test.go:33:
                Error Trace:    /Users/nary/workData/open-source/flyte-v2/flytestdlib/otelutils/factory_test.go:33
                Error:          Expected nil, but got: &fmt.wrapError{msg:"conflicting Schema URL: https://opentelemetry.io/schemas/1.34.0 and https://opentelemetry.io/schemas/1.24.0", err:(*errors.errorString)(0x106757830)}
                Test:           TestRegisterTracerProviderWithContext
    factory_test.go:36:
                Error Trace:    /Users/nary/workData/open-source/flyte-v2/flytestdlib/otelutils/factory_test.go:36
                Error:          "map[]" should have 1 item(s), but has 0
                Test:           TestRegisterTracerProviderWithContext
FAIL
FAIL    github.com/flyteorg/flyte/v2/flytestdlib/otelutils      0.020s
ok      github.com/flyteorg/flyte/v2/flytestdlib/pbhash (cached)
ok      github.com/flyteorg/flyte/v2/flytestdlib/profutils      (cached)
ok      github.com/flyteorg/flyte/v2/flytestdlib/promutils      (cached)
ok      github.com/flyteorg/flyte/v2/flytestdlib/promutils/labeled      0.010s
ok      github.com/flyteorg/flyte/v2/flytestdlib/random (cached)
?       github.com/flyteorg/flyte/v2/flytestdlib/random/mocks   [no test files]
ok      github.com/flyteorg/flyte/v2/flytestdlib/resolver       (cached)
?       github.com/flyteorg/flyte/v2/flytestdlib/sandboxutils   [no test files]
ok      github.com/flyteorg/flyte/v2/flytestdlib/sets   (cached)
ok      github.com/flyteorg/flyte/v2/flytestdlib/storage        (cached)
?       github.com/flyteorg/flyte/v2/flytestdlib/storage/mocks  [no test files]
ok      github.com/flyteorg/flyte/v2/flytestdlib/tests  (cached)
ok      github.com/flyteorg/flyte/v2/flytestdlib/utils  (cached)
?       github.com/flyteorg/flyte/v2/flytestdlib/utils/mocks    [no test files]
?       github.com/flyteorg/flyte/v2/flytestdlib/utils/prototest        [no test files]
ok      github.com/flyteorg/flyte/v2/flytestdlib/version        (cached)
?       github.com/flyteorg/flyte/v2/flytestdlib/yamlutils      [no test files]
FAIL

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions