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

25067 Updated storage sync check #789

Merged
merged 1 commit into from
Jan 6, 2025

Conversation

severinbeauvais
Copy link
Collaborator

@severinbeauvais severinbeauvais commented Dec 24, 2024

Issue #: /bcgov/entity#25067

Description of changes:

  • updated Status API URL in example env file
  • app version = 5.5.20
  • updated updateUser error text
  • check SESSION_SYNCED before fetching user info
  • misc cleanup

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the namerequest license (Apache 2.0).

@@ -18,7 +18,7 @@ VUE_APP_LEGAL_API_URL="https://legal-api-dev.apps.silver.devops.gov.bc.ca"
VUE_APP_LEGAL_API_VERSION_2="/api/v2"
VUE_APP_NAMEX_API_URL="https://namex-dev.apps.silver.devops.gov.bc.ca"
VUE_APP_NAMEX_API_VERSION="/api/v1"
VUE_APP_STATUS_API_URL="https://status-api-dev.apps.silver.devops.gov.bc.ca"
VUE_APP_STATUS_API_URL="https://status-api-dev.apps.gold.devops.gov.bc.ca"
Copy link
Collaborator Author

@severinbeauvais severinbeauvais Dec 24, 2024

Choose a reason for hiding this comment

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

Note to developers: please update your .env file as needed.

@@ -16,7 +16,7 @@ export class UpdateUserMixin extends Vue {
}
} catch (err) {
// just log the error -- no need to halt app
console.log('Launch Darkly update error =', err) // eslint-disable-line no-console
console.log('Error updating user =', err) // eslint-disable-line no-console
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The error could be in fetchUserInfo or updateLaunchDarkly so I generalized this message.

- app version = 5.5.20
- updated updateUser error text
- check SESSION_SYNCED before fetching user info
- misc cleanup
@severinbeauvais
Copy link
Collaborator Author

/gcbrun

@bcgov bcgov deleted a comment from bcregistry-sre Jan 3, 2025
const url = `${this.authApiUrl}/users/@me`
// don't fetch user info if session isn't synced (ie, user is not logged in)
// to pre-empt a console error and Sentry log
if (sessionStorage.getItem('SESSION_SYNCED') !== 'true') return null
Copy link
Collaborator Author

@severinbeauvais severinbeauvais Jan 3, 2025

Choose a reason for hiding this comment

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

I'm now checking a different session variable, same as in auth-web, ie.

image

I also left in the check for a KC token, but that's probably redundant. Or overly safe, you decide 😆

@bcregistry-sre
Copy link
Collaborator

Temporary Url for review: https://namerequest-dev--pr-789-x6o9lylg.web.app

@severinbeauvais severinbeauvais merged commit a19d711 into bcgov:main Jan 6, 2025
9 of 10 checks passed
@severinbeauvais severinbeauvais changed the title 25067 Removed unneeded storage sync check 25067 Updated storage sync check Jan 6, 2025
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.

4 participants