fix: resolve flytestdlib test failures#6880
Open
ankitkumarsingh1702 wants to merge 1 commit intoflyteorg:v2from
Open
fix: resolve flytestdlib test failures#6880ankitkumarsingh1702 wants to merge 1 commit intoflyteorg:v2from
ankitkumarsingh1702 wants to merge 1 commit intoflyteorg:v2from
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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) andsemconv(which uses a different schema version) when callingresource.Merge().Solution: Changed
resource.NewWithAttributes(semconv.SchemaURL, ...)toresource.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:
t.Skip()for Darwin systems with an explanatory messageTesting
All tests pass locally after these changes.
Fixes #6856