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

Force config loading at application root #1257

Merged
merged 1 commit into from
Feb 27, 2024
Merged

Conversation

jabrah
Copy link
Contributor

@jabrah jabrah commented Feb 27, 2024

Fixes eclipse-pass/main#929

Changes

  • Move static config loading from afterModel hook to beforeModel hook
    • Force waiting for this to resolve before proceeding with any/all routes to avoid errors in those routes when trying to access the config
  • Add basic regression test to make sure routes outside of root load directly
  • Also add a console.error to dump error messages into JS console in browser on route/model hook errors
    • The error case presented by this bug should at least be dumped into the browser console with this

Testing

  • You'd need to create a local build of this branch of pass-ui
    • The included build.sh can help: > ./build.sh <path_to_pass-docker>/.env
    • This will produce a new Docker image: ghcr.io/eclipse-pass/pass-ui:latest
  • In eclipse-pass.local.yml in pass-docker, update the image ref to use the latest tag that you just built
  • Bring services in pass-docker up as normal
  • Navigate to pass.local and go through the regular login process
  • Click into the Submissions page (/app/submissions)
  • Refresh the page
  • The page should load as expected
    • Previously, this refresh would hang permanently with a loading spinner and never resolve

@jabrah jabrah requested a review from rpoet-jh February 27, 2024 19:03
Copy link
Contributor

@rpoet-jh rpoet-jh left a comment

Choose a reason for hiding this comment

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

Good job, John. I tested locally following your instructions, and it refreshed successfully.

@jabrah jabrah merged commit eb9f4d7 into main Feb 27, 2024
4 checks passed
@jabrah jabrah deleted the 929-static-config-resolution branch February 27, 2024 19:32
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.

Application hangs when loading outside of app root
2 participants