Skip to content

Namex Emailer: fix obsolete env key #25340

Closed

Description

@vikas-gov

From testing on Jan 17 at 6am...

The magic link produced was: https://dashboard.business.bcregistry.gov.bc.ca/incorporateNow/?nr=NR+6668012&email=mihai.dinu%40gov.bc.ca&phone=1112223344

The correct URL, in Prod, should be: https://www.business-registry-dashboard.bcregistry.gov.bc.ca/

The 1Password key for this URL is:

  • vault web-url
  • section: BUSINESS_REGISTRY_UI
  • key: BUSINESS_REGISTRY_URL

The code has been reviewed, again, by separate developers, and is believed to be correct.

It is believed that the problem is that the env keys were not refreshed from 1Password during this morning's deployment.

Activity

  1. added
    Entities Team
    Names Team
    NameX
    bug
    on Jan 17, 2025
  2. changed the title [-]Copy of Namex Email: fix magic link URL[/-] [+]Namex Email: fix magic link URL[/+] on Jan 17, 2025
  3. changed the title [-]Namex Email: fix magic link URL[/-] [+]Namex Emailer: fix obsolete env key[/+] on Jan 17, 2025
  4. rarmitag commented on Jan 17, 2025

    @rarmitag
    Contributor

    Fixed, please test.

  5. severinbeauvais commented on Jan 17, 2025

    @severinbeauvais
    Collaborator

    Fixed, please test.

    @Mihai-QuickSilverDev , do you want to test the magic link (new emails) in Prod again? When?

  6. severinbeauvais commented on Jan 20, 2025

    @severinbeauvais
    Collaborator

    @rarmitag How long would it take to test this?

    1. change FF
    2. re-deploy Namex Emailer to pick up new FF
    3. Mihai to approve a test NR
    4. revert FF
    5. re-deploy Namex Emailer to pick up new FF
  7. EPortman commented on Jan 20, 2025

    @EPortman
    Contributor

    Hi @severinbeauvais, RIch is not at work today.

    It seems the problem is just that the Emailer is not picking up the proper BUSINESS-REGISTRY-URL value from OnePass when it gets deployed.

    Your checklist would definitely work.

    However there is another way this can be tested without having to shut anything down.

    1. Redeploy the Emailer allowing it to pull the secrets from OnePassword.
    2. Go into the YAML for the NameX Emailer where it tells you the secrets it pulled.
    3. Confirm the BUSINESS-REGISTRY-URL properly updated.

    In GCP the secrets look like this in the YAML
    image.png

    When Richard fixed this he just manually updated this value. So when the emailer gets redeployed and that value is not what it currently is it does not work (test failed). If it does pick up the proper value than test passed.

  8. Mihai-QuickSilverDev commented on Jan 20, 2025

    @Mihai-QuickSilverDev
    Collaborator

    @ALL I have sent an invite for 12 noon today with All details. Let's move the conversation on that channel.

  9. severinbeauvais commented on Jan 20, 2025

    @severinbeauvais
    Collaborator

    Thanks, Ethan. I'll leave to Mihai to determine if we want to see an email with the right link or if verifying the link in the YAML is good enough. (I vote for email.)

  10. EPortman commented on Jan 20, 2025

    @EPortman
    Contributor

    Something I noticed when looking at the dev deployments:

    I looked at all of the deployment of the emailer in dev from last week and they actually all had the incorrect value for BUSINESS_REGISTRY_URL.
    image.png

    Although I don't think this was noticed since these URLs seem to be effectively the same thing.
    https://business-registry-dev.web.app/
    https://dev.business-registry-dashboard.bcregistry.gov.bc.ca/

    But then the emailer had another deployment this morning and this time it pulled the correct value:
    image.png

    So, if I am looking at this properly, the problem fixed itself in dev. Which makes me hopeful it would have fixed itself in prod as well even though have no idea where it would get the value https://business-registry-dev.web.app/ from OnePass unless this was updated recently.

    But we will know in 30 minutes.

  11. severinbeauvais commented on Jan 20, 2025

    @severinbeauvais
    Collaborator

    Thanks for staying on top of this, Ethan.

    I may have updated the keys in 1Password (from web.app to bcregistry domain) AFTER the last Dev deployment, so it wouldn't have picked up the new key.

    Currently, the keys are:

    Dev
    Image

    Test
    Image

    Prod
    Image

  12. EPortman commented on Jan 20, 2025

    @EPortman
    Contributor

    Yup that would totally explain why that happened in dev.

  13. EPortman commented on Jan 20, 2025

    @EPortman
    Contributor

    Jan 20 To-Do

    • Test that Kevin's PR works as expected in Dev
    • Move NameX Emailer from Dev ----> Test
    • Confirm BUSINESS_REGISTRY_URL value correctly updates in the YAML in NameX Emailer Test: GCP Link to check
    • Move NameX Emailer from Test -----> Prod
    • Confirm BUSINESS_REGISTRY_URL value correctly updates in the YAML in NameX Emailer Prod: GCP Link to check
    • At this point we know the issue with picking up the wrong value from OnePass has been resolved

    Jan 21 @ 6:00 AM To-Do

    • Turn the FF on
    • Redeploy NameX Emailer
    • Test email with FF on confirming emailer can pick up FF with true
    • Turn the FF off
    • Redeploy NameX Emailer
    • Test email with FF off confirming emailer can pick up FF with false
    • At this point NameX emailer is ready to comply with Directed Launch (just have to update FF to true and redeploy)

    What went wrong:

    • When a One Password value is updated the full GCP CD pipeline has to happen for prod to pick it up. The issue was that after the deployment to dev the OnePassword value changed and then it went to test and then prod without getting updated. To fix this the full deployment of dev to test to prod was conducted and the value correctly updated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Entities TeamNameXNames TeamPriority1bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions