bcgov / entity

ServiceBC Registry Team working on Legal Entities
Apache License 2.0
23 stars 59 forks source link

Firms Deployment: enable FF for staff roles only #13767

Closed severinbeauvais closed 2 years ago

severinbeauvais commented 2 years ago

This ticket is to enable the following flags, in Prod, for specific users with staff role:

This is time sensitive -- contact @trishreimer for details.

jdyck-fw commented 2 years ago

Dave has made a note to talk to Trish about this. Re: list of users and confirming timing.

trishreimer commented 2 years ago

@MeganFedora would you mind helping me get a list of staff that need access to create/maintain business and SEarch?

Pls. copy names in this tix.

Since this is staff, we could turn it on when it's ready (search asap) and sp/gp Oct 24. Does that work?

Thank you.

severinbeauvais commented 2 years ago

@trishreimer I think the idea was to give some staff (IDIR) access to SP/GP in Prod before Oct 24, using feature flags enabled for them only.

This ticket is not for Search feature flags -- please chat with one of those developers to arrange that.

trishreimer commented 2 years ago

Okay, Megan is away so I chatted with Mark. For now, please setup:

Lau, Mark CITZ:EX Mark.Lau@gov.bc.ca Balaski, Mark CITZ:EX Mark.Balaski@gov.bc.ca Hepburn, Victoria CITZ:EX Victoria.Hepburn@gov.bc.ca Espinosa, Elizabeth CITZ:EX Elizabeth.Espinosa@gov.bc.ca Trish Reimer Trish.Reimer@gov.bc.ca Fedora, Megan CITZ:EX Megan.Fedora@gov.bc.ca

I mentioned that they will get access early but will not/should not do anything. Is that right? Was the team expecting the staff to do anything once access was granted? I know they don't have the time to test anything. (discussed in our deployment meeting)

Let me know if you need anything further. :-)

Thanks.

severinbeauvais commented 2 years ago

Targeting is now enabled for all feature flags as per the ticket description above,

Example:

image.png

2022-10-18: I added Mihai, David McK, Riyaz and Ketaki. SB

severinbeauvais commented 2 years ago

@trishreimer This LaunchDarkly (feature flag) configuration has now been done. Is there any way you can test this (in Prod with a SP/GP)?

trishreimer commented 2 years ago

yes, we just need some sp/gp's that are in database. We're meeting at 2pm today to discuss testing. Let's chat then...

severinbeauvais commented 2 years ago

Actually, it looks like the SBC Auth (Auth Web) targeting won't work because it doesn't report the user's name/email/etc when it fetches the feature flags -- all users appear as "anonymous". (Also, IDIR staff don't have an account or a My Business Registry page for affiliating a NR and starting a registration.)

To fix the anonymous user issue requires a code change to SBC Auth (and the build pushed to Dev/Test/Prod). To fix the staff account issue requires an in-progress feature by Relationships team.

However, it may be possible for staff (IDIR) to click the "Register This Business" button in Namerequest UI and go straight to the business' entity dashboard.

cc: @seeker25 @pwei1018 @thorwolpert

trishreimer commented 2 years ago

okay..let's discuss in a few mins. I noticed when I'm logged in w/Idir that when I click 'manage business' nothing happens. Is this related to the auth fix that is needed?

severinbeauvais commented 2 years ago

Trish, please test this (logged in with your IDIR):

  1. go to Namerequest UI (Production)
  2. open a SP/GP NR (that is approved and isn't consumed/expired)
  3. you should see the "Register Your Business" button
  4. once Relationships team finishes their "orgs for idirs" feature, click on this button (until then it won't work)
  5. you should see the entity dashboard for the draft SP/GP
  6. click on Incorporate button
  7. the registration should open

Also please verify that you do not see the "Register" button in step 3 above with an IDIR that isn't in the list you gave me, nor with a regular user login. There is a feature flag to show/hide the button and it's conditionally set depending on the user.

severinbeauvais commented 2 years ago

I noticed when I'm logged in w/Idir that when I click 'manage business' nothing happens. Is this related to the auth fix that is needed?

This is a different issue. This has never worked because IDIR users don't have an account/org to use for displaying My Business Registry. I think Relationships team is working on that in this sprint.

seeker25 commented 2 years ago

It's not quite IDIR users.. because IDIR users can have an org.. It's users without an ORG with STAFF role (BC REG STAFF for example).

However, it may be possible for staff (IDIR) to click the "Register This Business" button in Namerequest UI and go straight to the business' entity dashboard.

I'm working on a fix for this, this sprint (code): https://github.com/bcgov/sbc-auth/pull/2104 https://github.com/bcgov/sbc-common-components/pull/310

Epic: https://github.com/bcgov/entity/issues/13244

Those two PR's + [BC Registries Staff org created + an association row in membership #13662 ] for an IDIR staff account.. should allow the workflow from "Register This Business" to work for BC Registries Staff.

trishreimer commented 2 years ago

I don't have access to namex (or any databases) so would someone mind sending me some data? sorry...

feel free to email if you don't want to put it in the tix. trish.reimer@gov.bc.ca

MeganFedora commented 2 years ago

@trishreimer all business staff should have access to search. Do you need a list?

trishreimer commented 2 years ago

I just tested this: NR 1501013. Name was approved, clicked register a business and nothing happens. @severinbeauvais

I logged in with my idir.

trishreimer commented 2 years ago

I'll try a GP in a bit...just getting the data now.

severinbeauvais commented 2 years ago

Hi Trish. Travis' feature to allow staff to use a NR to register a business is not in Prod yet.

trishreimer commented 2 years ago

oh! sorry, i missed that (too many emails). just ping me when you're ready. I now have data!

severinbeauvais commented 2 years ago

@Mihai-QuickSilverDev @davemck513 @trishreimer Can you please verify that the correct feature flags are identified in the description above, to be enabled for all users in Prod on Oct 24?

severinbeauvais commented 2 years ago

This ticket needs to be kept open until the SP/GP deployment on Oct 24 (since it contains the list of FFs that need to be updated).

severinbeauvais commented 2 years ago

Note: This morning I fixed the Create UI Prod LaunchDarkly configuration in 1Password -- it was using the Test client key instead of the Prod client key!

Also I discovered that users who enable "do not track" in their browser will not be recognized by LD and will therefore not receive targeted feature flags.

Also I successfully tested that a user in the target list (Trish) received the enhanced feature flag variation while a user not in the list (me) received the default FF values.

severinbeauvais commented 2 years ago

As of a few minutes ago, all 6 feature flags above have been enabled in Production.

NOTE: "targeting" and "whether the flag is enabled or disabled" are the same thing, therefore if you turn off targeting then you are disabling the flag, and if you turn on the flag then you are enabling targeting (with whatever rules are in place, such as certain emails only). THEREFORE, to enable the flag for all users, all rules have to be deleted.