Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for the SDKConfig Event; Featurevars is not required. #460

Merged
merged 1 commit into from
Jun 7, 2024

Conversation

JamieSinn
Copy link
Member

@JamieSinn JamieSinn commented Jun 7, 2024

  • The default check should not expect an sdkconfig event - the delay is set to 2 seconds - when the flush is 500ms
  • Track needs to use arraycontaining
  • Fix go.mod version

Summary by Sourcery

This pull request addresses several issues related to the SDKConfig event handling and test configurations. It fixes the default check for sdkConfig events, updates the go.mod version, and refines test cases to improve event matching and handling.

  • Bug Fixes:
    • Fixed the default check to not expect an sdkConfig event by default, adjusting the delay to 2 seconds and the flush to 500ms.
    • Corrected the use of arrayContaining in the Track function to ensure proper event handling.
  • Enhancements:
    • Updated the go.mod file to use version 1.22.2.
  • Tests:
    • Modified test cases to use expect.arrayContaining instead of expect.toIncludeSameMembers for better flexibility in event matching.
    • Added skipSDKConfigEvent flag in multithreading tests to bypass unnecessary sdkConfig event checks.

 - The default check should not expect an sdkconfig event - the delay is set to 2 seconds - when the flush is 500ms
 - Track needs to use arraycontaining
 - Fix go.mod version
Copy link

sourcery-ai bot commented Jun 7, 2024

Reviewer's Guide by Sourcery

This pull request addresses several issues and improvements in the SDKConfig event handling and test cases. The changes include modifying the default check to not expect an SDKConfig event, updating the track tests to use arrayContaining, and fixing the go.mod version. Additionally, a new flag is introduced in the multithreading tests to skip the SDKConfig event.

File-Level Changes

Files Changes
harness/helpers/events.ts
harness/features/track.local.test.ts
Updated test cases to use arrayContaining for more flexible matching and modified SDKConfig event handling.

Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • You can change your review settings at any time by accessing your dashboard:
    • Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
    • Change the review language;
  • You can always contact us if you have any questions or feedback.

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @JamieSinn - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟡 General issues: 2 issues found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

harness/helpers/events.ts Show resolved Hide resolved
harness/features/multithreading.local.test.ts Show resolved Hide resolved
'6386813a59f1b81cc9e6c68d':
'6386813a59f1b81cc9e6c693',
},
}, {}]),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are we not expecting featureVars to be set?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because the sdk config event is set under the aggregation user - we don't set featurevars on the aggregation user - as there's no features/variations to have been evaluated.
cc @ajwootto

@JamieSinn JamieSinn merged commit 442b2e2 into main Jun 7, 2024
5 of 7 checks passed
@JamieSinn JamieSinn deleted the sdkconfig-test-fixes branch June 7, 2024 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants