-
Notifications
You must be signed in to change notification settings - Fork 1.3k
allow to enable PVC feature flag for user via ConfigCat #13341
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
Conversation
if ( | ||
// ConfigCat already has feature flag named `persistent_volume_claim` that controls if we show | ||
// the option to enable PVC for project prebuilds. So have to use a different name here. | ||
await getExperimentsClientForBackend().getValueAsync("user_pvc", false, { |
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.
webapp team, when reviewing, can you double check that this is indeed the only place where I need to add this code?
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.
This change can actually go away, the other two are fine! 👍
But didn't find time to test, yet 😬
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.
Hm. Are you sure? Since I originally tested with this change only and it worked as expected. So want to double check before I remove this code. 🤔
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.
Are you sure?
Yes. That's the core of the PR from last week: persistent_volume_claim
is a "workspace persistent" feature, so it should never be required to modify on start, only on creation.
This PR just changes the source from where we get the info from, so we should be able to simply follow all occurrences of user.featureFlags?.permanentWSFeatureFlags?.includes("persistent_volume_claim")
and that check there (as you already did).
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.
@geropl ah, good to know. thank you! code removed. PTAL
started the job as gitpod-build-pavel-12745.1 because the annotations in the pull request description changed |
Starting review now... |
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.
The places where we have to replace/OR the existing logic are these:
- workspaces based on prebuilds:
if (user.featureFlags?.permanentWSFeatureFlags?.includes("persistent_volume_claim")) { - on workspace creation:
config._featureFlags = (user.featureFlags!.permanentWSFeatureFlags || []).filter(
b9b46ac
to
c739640
Compare
@geropl updated code. Hopefully I did it the right way, not sure if adding all those injects all over the place is the correct way of doing it though. 😅 |
c739640
to
d10be7f
Compare
@geropl PTAL |
Description
Instead of having to enable feature flag per user via admin panel, this allows to enable it via ConfigCat instead, as well as will allow us to roll out this feature to more users via configCat.
Related Issue(s)
Fixes #12745
How to test
Open preview env
Add your user id to ConfigCat non production env
Open new workspace
In terminal:
ls -la /.workspace/.gitpod/
and you should seepvc
file in there, indicating this workspace is running using PVC feature.Release Notes
Documentation
Werft options:
If enabled this will build
install/preview
Valid options are
all
,workspace
,webapp
,ide