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

Fix raven.js import order in galaxy.panels.mako #2445

Merged
merged 3 commits into from Jun 2, 2016
Merged

Fix raven.js import order in galaxy.panels.mako #2445

merged 3 commits into from Jun 2, 2016

Conversation

carlfeberhard
Copy link
Contributor

@carlfeberhard carlfeberhard commented Jun 2, 2016

The update to raven.js included a UMD which, if raven was imported after requirejs, would only provide an AMD importing interface to raven. This caused an error in galaxy.panels.mako where it's imported after requirejs and tries to use the global. The error only appeared on instances configured for sentry.

This changes the order of import of raven.js on galaxy.panels.mako so it comes before the import of requirejs allowing us to continue using the global. An AMD import is entrirely possible, but the (second) change here makes the raven import pattern consistent across the main templates.

Also, tracekit is removed from the client libraries since raven includes its own, internal version of it now.

Thanks to @martenson for reporting it.

Raven now uses a UMD and checks for requirejs removing it from globals
if found. This adds a require import to load Raven.
Moves galaxy.panels.mako's import of Raven back to vanilla script
tag and before the requirejs library import, allowing Raven's UMD
to define Raven as a global.

This starts Raven/sentry *before* the library package is loaded so that
library errors can be captured as well.
@martenson
Copy link
Member

superb! thank you @carlfeberhard

@martenson martenson merged commit ec476c7 into galaxyproject:dev Jun 2, 2016
@carlfeberhard carlfeberhard deleted the fix.raven branch June 22, 2016 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants