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

refactor(ff): make site launch flag a bool flag #958

Merged
merged 6 commits into from
Oct 24, 2023

Conversation

seaerchin
Copy link
Contributor

@seaerchin seaerchin commented Oct 9, 2023

Problem

Right now, our GGS flag adopts a two tiered approach - first, we get the list of repos from growthbook then we validate based on that.

This is a whitelist approach, where we add sites as they shift to ggs. This is effortful and going forward, we want to make our flag a blacklist approach, where we allow sites by default until we need to blacklist them.

Solution

Add new flag on growthbook that returns a boolean value checking if the user type is email and whether site is blacklisted. (it's true if user is email && site isn't blacklisted)

Deploy notes

these steps have to be done pre deploy

  • for new email login sites that are not on ggs, migrate them to ggs by cloning them onto efs (can use form atm)

these steps have to be done post deploy

  • remove the flag for ggs whitelisted repo
  • enable the flag for is_ggs_enabled on production

@seaerchin seaerchin requested a review from a team October 9, 2023 08:44
Copy link
Contributor

@kishore03109 kishore03109 left a comment

Choose a reason for hiding this comment

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

How does this play with migrated sites? ie when is the git clone step for these sites going to occur ah?

src/constants/featureFlags.ts Outdated Show resolved Hide resolved
src/middleware/routeHandler.js Outdated Show resolved Hide resolved
src/services/db/RepoService.ts Outdated Show resolved Hide resolved
@seaerchin
Copy link
Contributor Author

seaerchin commented Oct 9, 2023

How does this play with migrated sites? ie when is the git clone step for these sites going to occur ah?

there's a form for prod ops to fill up that triggers a clone

@kishore03109
Copy link
Contributor

@seaerchin wait so to be clear, post email migration of sites there needs to a manual sending submission of this form by eng/ops?
cc. @alexanderleegs think we might need to take this into account ya

Copy link
Contributor

@kishore03109 kishore03109 left a comment

Choose a reason for hiding this comment

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

non blocking nits

src/constants/featureFlags.ts Outdated Show resolved Hide resolved
src/services/db/RepoService.ts Outdated Show resolved Hide resolved
src/constants/featureFlags.ts Outdated Show resolved Hide resolved
src/middleware/routeHandler.js Outdated Show resolved Hide resolved
src/constants/featureFlags.ts Outdated Show resolved Hide resolved
src/constants/featureFlags.ts Show resolved Hide resolved
@seaerchin seaerchin requested a review from harishv7 October 20, 2023 04:45
@seaerchin seaerchin merged commit 2c93a1a into develop Oct 24, 2023
8 checks passed
@seaerchin seaerchin deleted the feat/is-579-ggs-gb branch October 24, 2023 05:16
@dcshzj dcshzj mentioned this pull request Oct 25, 2023
6 tasks
dcshzj added a commit that referenced this pull request Oct 26, 2023
* refactor(formsg-site-clone): remove and add to site creation (#971)

* refactor(formsg-site-clone): remove and add to site creation

* fix(formsgsitecreation): fixed rename betrayal by vvscode

* refactor(formsgsitecreation): cloen only on email

* refactor(ff): make site launch flag a bool flag (#958)

* refactor(ff): make flag a bool flag

* refactor(flags): update ff

* refactor(reposervice): remove function

* refactor(routehandler): remove function

* fix(routehandler): rename ff

* fix(reposervice): update test spec

* Feat/quickie/site-create-form (#985)

* feat(git clone): add branch

* feat(db): update deployments table

* fix(reposService): fix git commands

* fix(reposService): cleaner code

* fix(tests): fix failing tests

* style(deploymentService): better error messages

* chore(auth): upgrade auth redirect endpoint to use v2 (#986)

* 0.50.0

---------

Co-authored-by: Kishore <[email protected]>
Co-authored-by: seaerchin <[email protected]>
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