Skip to content

fix: resolve flytestdlib test failures#6880

Open
ankitkumarsingh1702 wants to merge 1 commit intoflyteorg:v2from
ankitkumarsingh1702:fix/flytestdlib-test-failures-v2
Open

fix: resolve flytestdlib test failures#6880
ankitkumarsingh1702 wants to merge 1 commit intoflyteorg:v2from
ankitkumarsingh1702:fix/flytestdlib-test-failures-v2

Conversation

@ankitkumarsingh1702
Copy link

Summary

This PR fixes two flaky/failing tests in flytestdlib on the v2 branch.

Fixes Applied

1. TestRegisterTracerProviderWithContext (otelutils/factory.go)

Root Cause: Schema URL conflict between resource.Default() (which uses the OTel default schema) and semconv (which uses a different schema version) when calling resource.Merge().

Solution: Changed resource.NewWithAttributes(semconv.SchemaURL, ...) to resource.NewSchemaless(...) to avoid the schema version mismatch.

2. TestAccessor_UpdateConfig/[Viper]_Change_handler_k8s_configmaps (config/tests/accessor_test.go)

Root Cause: This test relies on fsnotify to detect symlink changes (mimicking K8s ConfigMap behavior), but fsnotify doesn't reliably detect symlink changes on macOS/Darwin systems.

Solution:

Testing

All tests pass locally after these changes.

Fixes #6856

This PR fixes two flaky/failing tests in flytestdlib:

1. TestRegisterTracerProviderWithContext (otelutils/factory.go)
   - Root Cause: Schema URL conflict between resource.Default() and
     semconv when calling resource.Merge()
   - Fix: Use resource.NewSchemaless() to avoid schema version mismatch

2. TestAccessor_UpdateConfig/[Viper]_Change_handler_k8s_configmaps
   - Root Cause: fsnotify doesn't reliably detect symlink changes on
     macOS/Darwin systems
   - Fix: Skip test on Darwin with explanatory message
   - Reference: fsnotify/fsnotify#372

Fixes flyteorg#6856

Signed-off-by: Ankit Kumar Singh <ankitkumarsingh1702@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant