Skip to content

sbc-common-components: need way forward -- upgrade / replace? #31197

Closed

Description

@severinbeauvais

A number of UIs, written in Vue2, depend on the sbc-common-components library.

However, this library has fallen a bit out of date:

  • The SbcHeader should be using the new Auth API Gateway URL (and Status URL?), and the SbcFeeSummary should be using the new Pay API Gateway URL. The old URLs still work because we have temporary reverse-proxies in place, but we'd like to start removing them.
  • The library should be updated to use the latest Vue2 packages (eg, same as the UIs that use this library).

We need to figure out how to move forward...

  1. It has been suggested that the UIs should be re-written in Nuxt, which no longer uses this library, but this is a large amount of work.
  2. We could update sbc-common-components "one last time" for the URL updates (and packages) so that the Vue2 UIs can continue working for a while longer.
  3. We could extract the still-used components from this library (eg, into shared components) and then obsolete sbc-common-components. This option could simplify ongoing maintenance.
  4. If there are other options, please add a comment below to explain them.

cc: @seeker25 @JohnamLane @kialj876 @thorwolpert @OlgaPotiagalova @JazzarKarim

IMPACT

The affected UIs are using reverse-proxy URLs so they are currently functional but the reverse-proxy URLs have load/performance implications, especially at scale. It would be ideal to stop using the reverse-proxy URLs and use the API Gateway URLs instead.

Activity

  1. added
    Pay
    Entities Team
    connect
    on Nov 7, 2025
  2. changed the title [-]sbc-common-components: need way forward / upgrade[/-] [+]sbc-common-components: need way forward / upgrade?[/+] on Nov 7, 2025
  3. seeker25 commented on Nov 7, 2025

    @seeker25
    Contributor

    Just do 2, probably take less than a couple hours - no need for people to decide on that one

    FAS-UI (PAY-WEB) is getting upgraded to Nuxt as we speak,
    AUTH-WEB might come after?

  4. severinbeauvais commented on Nov 7, 2025

    @severinbeauvais
    CollaboratorAuthor

    I had a productive conversation with Travis and found out the following:

    • several UIs are built upon Vue 2.7.16 and use sbc-common-components v3.0.15-c
      • this version does not have the Pinia upgrade
      • this version does not have the Vite upgrade
      • this version does not have the KeycloakJS upgrade
      • it should be possible to patch sbc-common-components (from the UIs) to support the Auth and Pay API Gateway URLs and API keys, but that's a bit messy and doesn't take advantage of the upgrades or any recent changes/fixes
    • Auth Web (UI) is build upon Vue 2.6.14 and uses sbc-common-components v3.1.6
      • it supports the Auth API Gateway URL (and optional API key)
      • it does not yet support the Pay API Gateway URL (needs to be done)
      • it does not need to support a different Status API URL because that API is on OCP Gold (not GCP)
      • it requires @vue/composition-api package
      • it cannot be used by UIs built upon Vue 2.7 due to the extra package above
      • it might be possible to update sbc-common-components to support both Vue 2.6 and Vue 2.7, but that might be complex and take significant time
      • it might be possible to patch sbc-common-components (from the UIs) to support Vue 2.7, but that might require UI changes to account for the library upgrades
      • Auth Web cannot move to Vue 2.7.16 as that breaks a lot of unit tests
    • Assets UI is build upon Vue 3 and uses sbc-common-components v4.0.10

    So, we are currently using at least 3 versions of sbc-common-components.

    Also, the "fast way" to use the new API Gateway URLs is likely not the "best way". Either way, some work needs to be done.

    Refs:
    image (1).png

    image.png

    image (2).png

  5. severinbeauvais commented on Nov 7, 2025

    @severinbeauvais
    CollaboratorAuthor

    Given that sbc-common-components is deprecated and we don't want to spend extra time supporting it, and we don't want to spend lots of time figuring out how to resolve the Vue 2.6/2.7 issues, and we don't want to spend time making the UIs compatible with the upgraded library, I recommend the following:

    1. update all Vue2 UIs (Create, Edit, Filings, Namerequest) to use the latest "old" version of sbc-common-components: v3.0.15-c
    2. patch the UIs to add the X-Apikey header for Auth API calls
    3. patch the UIs to add the X-Apikey header for Pay API calls
    4. patch the UIs to add the Account-id header (if not already there)
    5. update the UIs to provide the expected env keys

    Sample patch: https://github.com/bcgov/namerequest/blob/main/app/patches/sbc-common-components%403.0.15-c.patch
    Sample patch config: https://github.com/bcgov/namerequest/blob/53255fe73b69f1fd45b285733f3fc3d81a0abc64/app/package.json#L82

  6. severinbeauvais commented on Nov 7, 2025

    @severinbeauvais
    CollaboratorAuthor

    Per Travis' comment above, here's another option that I like:

    1. leave the Vue2 UIs to use the old API URLs for now
    2. wait for Pay-Web and Auth-Web to be ported to Nuxt
    3. update sbc-common-components to use Vue 2.7 and support the GW URLs (including API keys)
    4. update the Vue2 UIs to use the latest version of sbc-common-components

    Although this means deferring any updates, and I'm not sure of the effort of number 4, this is the cleanest solution as it removes the need to patch anything and we'd be down to using only 2 versions of sbc-common-components.

  7. severinbeauvais commented on Nov 7, 2025

    @severinbeauvais
    CollaboratorAuthor

    A decision is needed on how to move forward with this -- see comments above.

  8. changed the title [-]sbc-common-components: need way forward / upgrade?[/-] [+]sbc-common-components: need way forward -- upgrade / replace?[/+] on Nov 10, 2025
  9. severinbeauvais commented on Nov 10, 2025

    @severinbeauvais
    CollaboratorAuthor

    Moved to icebox because we think this can wait until after the corps release.

    This change is a requirement if we want to get rid of the reverse proxies (which we may want to do sooner than later due to load balancing).

    cc: @pwei1018

  10. thorwolpert commented on Jul 27, 2026

    @thorwolpert
    Collaborator

    stale - new issue can be opened if needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Entities TeamPayconnecttechdebt

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions