-
Notifications
You must be signed in to change notification settings - Fork 29
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
Manage the static assets via a class #121
Conversation
I didn't verify this - it's true for "standard" Django, but with whitenoise this may not be true. |
Note I extracted this from #115, which is why I assumed it was already done. |
manifests/static.pp
Outdated
# @summary Manage the static files (assets) | ||
# @api private | ||
class pulpcore::static { | ||
file { $pulpcore::static_root: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this parameter $pulpcore::static_root
was present in your other PR but didn't get included here, which is breaking things
Otherwise it looks good to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes, here it was still pulp_static_root
.
Since 8c66bff the pulpcore-manager command runs as root. On a fresh installation this is fine, but on upgrades the user doesn't own /var/lib/pulp/assets. This explicitly manages the static root. It is split off to a separate class to better capture the dependencies. The database doesn't need to refresh due to static files, nor any services.
By setting it in settings.py, pulp-manager will also know about it. It also makes the service file more straight forward.
I added a commit that sets |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Since 8c66bff the pulpcore-manager command runs as root. On a fresh installation this is fine, but on upgrades the user doesn't own /var/lib/pulp/assets. This explicitly manages the static root.
It is split off to a separate class to better capture the dependencies. The database doesn't need to refresh due to static files, nor any services.