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

Making the call to i18n/init blocking to resolve a race condition #11214

Merged
merged 1 commit into from
Jun 13, 2024

Conversation

codyrancher
Copy link
Contributor

@codyrancher codyrancher commented Jun 12, 2024

Summary

Fixes #11203

Technical notes summary

There was a race condition where certain pages would sometimes fail to render if the language was changed. This was caused by i18n/init sometimes not completing before some of the page would begin to render and would ultimately lead to loadManagement not getting called.

Areas or cases that should be tested

/dashboard/c/_/fleet/fleet.cattle.io.gitrepo in a production build. You can update the ui-dashboard-index global setting to https://releases.rancher.com/dashboard/i18n-fix-dev/index.html to test.

I was only able to reproduce the original issue in Chrome with a production build by refreshing the gitrepo page over and over.

image

Checklist

  • The PR is linked to an issue and the linked issue has a Milestone, or no issue is needed
  • The PR has a Milestone
  • The PR template has been filled out
  • The PR has been self reviewed
  • The PR has a reviewer assigned
  • The PR has automated tests or clear instructions for manual tests and the linked issue has appropriate QA labels, or tests are not needed
  • The PR has reviewed with UX and tested in light and dark mode, or there are no UX changes

@codyrancher codyrancher changed the title Checking is i18n is our race condition Making the call to i18n/init blocking to resolve a race condition Jun 12, 2024
@codyrancher codyrancher added this to the v2.9.0 milestone Jun 12, 2024
Comment on lines 60 to -61
install: (Vue, _options) => {
_options?.store?.dispatch('i18n/init');
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Vue plugins can't have a blocking async install method otherwise I would've just made the modification here.

@codyrancher codyrancher marked this pull request as ready for review June 13, 2024 00:47
@codyrancher codyrancher merged commit 9fb2c97 into master Jun 13, 2024
40 checks passed
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.

Cannot load some pages when changing page translations
2 participants