-
Notifications
You must be signed in to change notification settings - Fork 33
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
fix: use in memory provider for e2e suites #740
fix: use in memory provider for e2e suites #740
Conversation
650eedc
to
66c833f
Compare
I had issues running the e2e locally
I saw a PR related to this #471 I changed the path locally to '../../src/' to get it working |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @znonthedev,
thanks for submitting that change, this looks good!
The thing left would be to remove the flagd-testbed
from the GitHub Action.
https://github.com/open-feature/js-sdk/blob/main/.github/workflows/pr-checks.yaml#L68-L72
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @znonthedev ! This is a stop forward. The e2e tests are still failing though because you'll need to set up the InMemoryProvider
to have the expected flags (you can do this in the constructor).
FAIL server-e2e packages/server/e2e/step-definitions/evaluation.spec.ts
Flag evaluation
✕ Resolves boolean value (9 ms)
✕ Resolves string value (2 ms)
✕ Resolves integer value (1 ms)
✕ Resolves float value
✕ Resolves object value
✕ Resolves boolean details (1 ms)
✕ Resolves string details (1 ms)
✕ Resolves integer details
✕ Resolves float details
✕ Resolves object details (1 ms)
✕ Resolves based on context (1 ms)
✓ Flag not found (1 ms)
✕ Type error (2 ms)
The flagd test-bed has these flags configured. All the flags are defined in the gherkin suite here. The setup would like something like this (I've only included the first flag)
OpenFeature.setProvider(
new InMemoryProvider({
'boolean-flag': {
variants: {
on: true,
off: false,
},
disabled: false,
defaultVariant: 'on',
},
// ...other flags...
}),
);
@lukas-reining @toddbaert . Okay will make the necessary changes |
84c9786
to
3bbfb6d
Compare
@lukas-reining @toddbaert I have updated the PR with the requested changes. Please review. Why don't we remove the workflow and docker file related to flagd-testbed? I assume we don't need it anymore |
Do you mean the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@znonthedev Great work! everything passes, I just have a couple small nits, then I'm ready to approve.
Would you like an invite to the org? It comes with no obligation, but it's the first step if you'd like to be more involved.
Signed-off-by: Mohamed V J <[email protected]>
Signed-off-by: Mohamed V J <[email protected]>
Signed-off-by: Mohamed V J <[email protected]>
Signed-off-by: Mohamed V J <[email protected]>
Signed-off-by: Mohamed V J <[email protected]>
Signed-off-by: Mohamed V J <[email protected]>
Signed-off-by: Mohamed V J <[email protected]>
Signed-off-by: Mohamed V J <[email protected]>
Signed-off-by: Mohamed V J <[email protected]>
43f8276
to
e367d0d
Compare
Not only the service but also the files within the test-harness submodule. I might be missing some context here. Are we using the flagd-testbed container for testing other SDKs as well? |
@toddbaert Thanks a lot for the positive feedback! I'm glad everything is passing smoothly. I appreciate the opportunity to contribute. |
I'm not 100% sure whether we need that submodule now, actually. I will take a quick look and follow up. Good catch...
The flagd-testbed containers (and the associated gherkin suites) are used in tons of tests across the org, but they should all be used for testing flagd or flagd-providers. We have been trying to disentangle the actual SDKs from these flagd dependencies (mostly by using the in-memory providers as you did here). |
@toddbaert Okay, then I think no changes are needed for the shared test harness files. However, since we removed the flagd-testbed dependency in this repo, we could remove the submodule itself from this repo. I may be wrong. |
@znonthedev Todd won't be back until Monday. I'm going to leave this open until he has a chance to approve it. I think we should be good but I would like to confirm with him. Thanks for your effort with this. |
Signed-off-by: Todd Baert <[email protected]>
So the I've made a new issue to replace the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved see comment here about submodule.
@beeme1mr @lukas-reining feel free to merge.
🤖 I have created a release *beep* *boop* --- ## [1.9.0](server-sdk-v1.8.0...server-sdk-v1.9.0) (2024-01-08) ### 🐛 Bug Fixes * use in memory provider for e2e suites ([#740](#740)) ([696bf4a](696bf4a)) ### 🧹 Chore * **main:** release core 0.0.22 ([#745](#745)) ([a0cc855](a0cc855)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Signed-off-by: OpenFeature Bot <[email protected]> Signed-off-by: Todd Baert <[email protected]> Co-authored-by: Todd Baert <[email protected]>
🤖 I have created a release *beep* *boop* --- ## [0.4.9](web-sdk-v0.4.8...web-sdk-v0.4.9) (2024-01-08) ### ✨ New Features * add named provider metadata accessor ([#715](#715)) ([23d14aa](23d14aa)) * add PROVIDER_CONTEXT_CHANGED event (web-sdk only) ([#731](#731)) ([7906bbe](7906bbe)) ### 🐛 Bug Fixes * use in memory provider for e2e suites ([#740](#740)) ([696bf4a](696bf4a)) ### 🧹 Chore * **main:** release core 0.0.21 ([#720](#720)) ([7d1aca4](7d1aca4)) * **main:** release core 0.0.22 ([#745](#745)) ([a0cc855](a0cc855)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Signed-off-by: OpenFeature Bot <[email protected]> Signed-off-by: Todd Baert <[email protected]> Co-authored-by: Todd Baert <[email protected]>
## This PR Removes setup using Flagd Provider and uses In-Memory Provider Fixes #712 --------- Signed-off-by: Mohamed V J <[email protected]> Signed-off-by: Todd Baert <[email protected]> Co-authored-by: Michael Beemer <[email protected]> Co-authored-by: Todd Baert <[email protected]>
🤖 I have created a release *beep* *boop* --- ## [1.9.0](server-sdk-v1.8.0...server-sdk-v1.9.0) (2024-01-08) ### 🐛 Bug Fixes * use in memory provider for e2e suites ([#740](#740)) ([696bf4a](696bf4a)) ### 🧹 Chore * **main:** release core 0.0.22 ([#745](#745)) ([a0cc855](a0cc855)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Signed-off-by: OpenFeature Bot <[email protected]> Signed-off-by: Todd Baert <[email protected]> Co-authored-by: Todd Baert <[email protected]>
🤖 I have created a release *beep* *boop* --- ## [0.4.9](web-sdk-v0.4.8...web-sdk-v0.4.9) (2024-01-08) ### ✨ New Features * add named provider metadata accessor ([#715](#715)) ([23d14aa](23d14aa)) * add PROVIDER_CONTEXT_CHANGED event (web-sdk only) ([#731](#731)) ([7906bbe](7906bbe)) ### 🐛 Bug Fixes * use in memory provider for e2e suites ([#740](#740)) ([696bf4a](696bf4a)) ### 🧹 Chore * **main:** release core 0.0.21 ([#720](#720)) ([7d1aca4](7d1aca4)) * **main:** release core 0.0.22 ([#745](#745)) ([a0cc855](a0cc855)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Signed-off-by: OpenFeature Bot <[email protected]> Signed-off-by: Todd Baert <[email protected]> Co-authored-by: Todd Baert <[email protected]>
This PR
Removes setup using Flagd Provider and uses In-Memory Provider
Fixes #712