Closed severinbeauvais closed 3 weeks ago
working in test, but not in prod - Sev is working with PW
This ticket arose out of a Production incident on Oct 23, where Filings UI and Create UI were blocked from communicating with Auth API right after being deployed (and displayed an error dialog and prevented users from accessing their entity dashboard).
Part of the root cause is that the Auth API URL had recently been updated to a GCP address ("xxx.run.app"). The other part of the root cause is that the Content Security Policy for both UIs was missing this new GCP domain, despite the UI config files having been updated with it a month ago. The explanation here is that the local firebase.json files are only used for preview URLs. When a UI is deployed, a global firebase.json (https://github.com/bcgov/bcregistry-sre/blob/main/.github/actions/firebase/files/firebase-prod.json) is used, and it was missing the GCP domain.
(The GCP domain was included in the Test firebase config file, which is why our UIs worked in Test. But the GCP domain was missing from the Prod firebase config because it was thought no UIs needed it -- Search API, for example, uses Apigee, not GCP.)
The fix, yesterday, was to update the global firebase.json file and re-deploy both UIs to pick up the change.
However, we still need to update our CD scripts. Per Patrick Wei:
The version you used we won't support it anymore. It build the image every time you run the flow. And use git tag to manage version. The newer version CD support both VUE and Nuxt, npm and pnpm, build the image to Artifactory and multiple node version.
Patrick confirms that only the CD scripts need to be updated, though there is a general CI script as well if we want to update ours accordingly.
cc: @kzdev420 @JazzarKarim @vysakh-menon-aot @argush3 (and please forward to anyone else who should know about this)
This was a bit more work than expected, so I updated the estimate to 3.
There's nothing really to test, other than each UI's CI and CD scripts work correctly.
The latest version of each UI can be verified in new environments. (I've already deployed to Dev.) The latest versions are:
The Entity UI CD pipelines need to be upgraded (see comments below for details). This affects:
References: