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

When loading web interface assets also handle jar URIs #1930

Merged
merged 3 commits into from Mar 15, 2016

Conversation

Projects
None yet
3 participants
@kroepke
Member

kroepke commented Mar 15, 2016

After assembly we cannot use File objects to access individual asset files. Instead we need to use a JarFileSystem to access the file metadata.

We could also cache the etag and modification dates in case of jars, but this change currently does not do that. We may want to revisit this in the future.
The patch uses a LoadingCache as a simple "lock" when creating the filesystem (uris will overlap and reference mostly the shaded jar, the cache makes sure only one thread is creating the filesystem).

fix #1924

When loading web interface assets also handle jar URIs
After assembly we cannot use File objects to access individual asset files. Instead we need to use a JarFileSystem to access the file metadata.

We could also cache the etag and modification dates in case of jars, but this change currently does not do that. We may want to revisit this in the future.
The patch uses a LoadingCache as a simple "lock" when creating the filesystem (uris will overlap and reference mostly the shaded jar, the cache makes sure only one thread is creating the filesystem).

fix #1924

@kroepke kroepke added this to the 2.0.0 milestone Mar 15, 2016

@bernd bernd self-assigned this Mar 15, 2016

kroepke and others added some commits Mar 15, 2016

unify PluginAssetsResources and WebInterfaceResource
previously assets didn't have appropriate cache headers when coming from plugins
Return a 404 if a plugin resource cannot be found
Also catch FileSystemAlreadyExistsException in cache loader.

bernd added a commit that referenced this pull request Mar 15, 2016

Merge pull request #1930 from Graylog2/issue-1924
When loading web interface assets also handle jar URIs

@bernd bernd merged commit 694ad19 into master Mar 15, 2016

0 of 4 checks passed

ci-server-integration Jenkins build graylog2-server-integration-pr 739 is running
Details
ci-web-linter Jenkins build is being scheduled
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
continuous-integration/travis-ci/push The Travis CI build is in progress
Details

@bernd bernd deleted the issue-1924 branch Mar 15, 2016

@lennartkoopmann

This comment has been minimized.

Member

lennartkoopmann commented Mar 15, 2016

Thanks! 👍 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment