[
https://issues.apache.org/jira/browse/AIRAVATA-2984?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16814780#comment-16814780
]
Marcus Christie commented on AIRAVATA-2984:
-------------------------------------------
There is still a window during which a user could get an error loading a
webpack bundle. The webpack-loader caches the bundle statistics, but appears to
only do so the first time they are loaded. If the stats haven't been loaded yet
and then a user requests a portal page that needs webpack generated assets, the
stats will fail to load if they are currently being built. For example, if
users have only visited the workspace app but not the admin app, then the
workspace webpack stats would be cached. If a user then goes to the admin app
for the first time, the stats will try to be loaded but will fail until the
admin webpack build finishes.
However, I think the changes here improve the situation considerably. Now a
user using the portal will not be adversely during a deploy (with the caveat
above). Also, long term I think we want to build the JS code once, for all the
portals, as the first step of the deploy or before the deploy. Load balancing
will help too.
> Webpack bundle fails to load during deploy
> ------------------------------------------
>
> Key: AIRAVATA-2984
> URL: https://issues.apache.org/jira/browse/AIRAVATA-2984
> Project: Airavata
> Issue Type: Bug
> Components: Django Portal
> Reporter: Marcus Christie
> Assignee: Marcus Christie
> Priority: Major
>
> {noformat}
> Loading failed for the <script> with source
> “https://beta.gateway.simvascular.org/static/django_airavata_admin/dist/js/app.d5795752.js”.
> {noformat}
> The problem I believe is that Django's webpack-bundle-tracker is bundle
> information from the new webpack-stats.json file that is created during the
> build, instead of the webpack-stats.json file that is in the /static/ assets
> directory. The new webpack-stats.json isn't put into the /static/ assets
> directory until everything is built and {{./manage.py collectstatic}} runs.
> webpack-bundle-tracker should be configured to read the webpack-stats.json
> file from the /static/ assets directory instead.
> h2. TODO
> - [x] Allow production deployments to override the locations of the
> webpack-stats.json files and set them to their static directory locations.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)