Skip to content

Conversation

@nicklasl
Copy link
Member

This PR

  • Adds a github action for verifying that tests and linting is fine

Signed-off-by: Nicklas Lundin <nicklasl@spotify.com>
@nicklasl nicklasl marked this pull request as ready for review August 24, 2023 08:54
@nicklasl nicklasl merged commit 1c2142e into main Aug 24, 2023
@nicklasl nicklasl deleted the ci-actions branch August 24, 2023 12:22
fabriziodemaria added a commit that referenced this pull request Nov 12, 2025
## This PR

1. Fixes possible race conditions detected when running
updateEvaluationContextAndWait in parallel
2. Adds AsyncProviderOperationsQueue for safe and optimized processing
of background context resolving
3. Fix bug where `ready` could be emitted when a context is set without
any provider set
4. Adds `clearProviderAndWait` to complement the same pattern in
setProvider and setEvaluationContext

### Notes
Stacktrace for the original crash (from point 1 above):
```
Task 22150 Queue : com.apple.root.default-qos.cooperative (concurrent)
#0	0x00000001970125c4 in _swift_release_dealloc ()
#1	0x0000000197013094 in swift::RefCounts<swift::RefCountBitsT<(swift::RefCountInlinedness)1>>::doDecrementSlow<(swift::PerformDeinit)1> ()
#2	0x00000001129667f8 in __swift_destroy_boxed_opaque_existential_1 ()
#3	0x000000011296a844 in outlined destroy of EvaluationContext? ()
#4	0x0000000112975098 in OpenFeatureAPI.updateContext(evaluationContext:) at /Users/XXX/Library/Developer/Xcode/DerivedData/confidence-sdk-swift-XXX/SourcePackages/checkouts/swift-sdk/Sources/OpenFeature/OpenFeatureAPI.swift:187
#5	0x0000000112973690 in closure #1 in closure #1 in closure #1 in OpenFeatureAPI.setEvaluationContextAndWait(evaluationContext:) at /Users/XXX/Library/Developer/Xcode/DerivedData/confidence-sdk-swift-XXX/SourcePackages/checkouts/swift-sdk/Sources/OpenFeature/OpenFeatureAPI.swift:95
#6	0x0000000112975f40 in partial apply for closure #1 in closure #1 in closure #1 in OpenFeatureAPI.setEvaluationContextAndWait(evaluationContext:) ()
#7	0x00000001129764dc in thunk for @escaping @isolated(any) @callee_guaranteed @async () -> (@out A) ()
#8	0x0000000112976648 in partial apply for thunk for @escaping @isolated(any) @callee_guaranteed @async () -> (@out A) ()
```

---------

Signed-off-by: Fabrizio Demaria <fabrizio.f.demaria@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.

3 participants