-
Notifications
You must be signed in to change notification settings - Fork 3
feat: (kernel, odk, ui, couchdb-sync) CDN static files collection on S3 and GCS #733
Conversation
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.
Even if it's more or less "deprecated" I would also include this option in the couchdb-sync module.
Co-Authored-By: Obdulia Losantos <[email protected]>
import os | ||
import json | ||
from django.core.management.base import BaseCommand | ||
from django.utils.translation import ugettext as _ |
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.
ugettext
is deprecated in Django 3.0, please better user gettext
import os | ||
import json | ||
from django.core.management.base import BaseCommand | ||
from django.utils.translation import ugettext as _ |
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.
from django.utils.translation import ugettext as _ | |
from django.utils.translation import gettext as _ |
file_path = os.path.join(webpack_dir, file_name) | ||
if os.path.isfile(file_path): | ||
file = File(open(file_path, 'rb')) | ||
if file_name == 'webpack-stats.json': |
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.
you can simplify this just using the WEBPACK_STATS_FILE
setting
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.
Actually, could you move this command to the aether-django-sdk-library
?
We need this also in Gather and there is no reason to repeat it twice.
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.
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.
🤞
* chore: upgrade dependencies (#693) * chore: upgrade dependencies * fix: revert drf-yasg upgrade * fix: change from using instance:: tag to bind:: with aet namespace (#694) * fix: change from using instance:: tag to bind:: with aet namespace * chore: funky-format the xml to catch lazy parsers * chore: install requests with security libs (#697) * (UI: Maintenance) Upgrade reactInt library (#700) * Upgrade reactInt library * replace enzyme-react-intl helper with custom code * feat(kernel): search by name field (#702) * chore: upgrade dependencies (#704) * chore: upgrade dependencies * fix(client): restrict to bravado 10.4.1 * fix(client): install openssl * chore: update version file with version * chore: fix decrypt * chore: update endpoint for enc file * chore: remember actual key * chore: fix spacing * chore: add license and spacing * chore: 4 spaces * chore: fix typo * fix(client): remove bravado libs restrictions (#706) * fix: bravado restriction * fix: bravado-core restriction * fix: oidc.OauthClient * fix: oops * chore: updates * chore: update key * fix(kernel): drf-yasg dependency (#708) * fix(kernel): drf-yasg dependency * fix: docs * chore(travis): push to google cloud storage (#711) * chore(release): detect alpha version (spaces) * chore: fall cleaning (#707) * style: flake8 quotes * refactor: move fixtures to test folder * fix: cleaning * fix: integration test with new client fixtures path * fix: cleaning * fix: kernel-test with start command * fix(producer): flake8 quotes * fix(integration): flake8 quotes * chore: upgrade dependencies * fix: typo * chore: more upgrades * fix(uwsgi): do not disable logging * fix: no threads for kernel-test * fix: clean travis release * chore: more upgrades * fix: kernel-test offload threads * chore: uwsgi processes by env var * test(odk): do not transform into string * fix: start kernel-test with one uwsgi process * fix(travis): release env var name * fix(release): more cleaning * fix(odk): failing test due to literal values (#717) * fix: error handling (#719) * fix(kernel): validation errors * fix: with self.assertRaises * fix: check unique together constraint * fix: revert replacement * feat(ui-assets): use version+commit hash to name files (#720) * chore(ui-assets): upgrade dependencies * refactor: rename node scripts * feat: use version+commit hash to name files * feat(assets): use X-Oauth-Unauthorized header (#721) * chore: upgrade dependencies (#722) * feat(odk): set projects list within surveyor (#715) * feat(odk): set projects list within surveyor * test: surveyors with projects * fix: password is optional for updates * test: check null password * test: no password on create action * tests: fix * docs: add keycloak setup in the installation steps (#723) * fix: keycloak admin client location (#724) * chore: use keycloak 7.0.1 image (#725) * feat: add active flag in Project/Survey and xForm (#726) * feat: add active field in Project and xForm model * feat: add migration files * test(kernel): project active filter * feat(odk): filter collect data by active flag * feat(ui): include active flag while fetching data * fix: (UI) Close modal onClickOutside and implement a clipboard (#728) * close modal onClickOutside and implement a clipboard * fix dependency semver * fix: (UI) Close modal onClickOutside and implement a clipboard (#728) * close modal onClickOutside and implement a clipboard * fix dependency semver * chore: upgrade dependencies (#729) * fix(kernel): input schemas are of type record (#731) * chore: upgrade dependencies (#732) * fix: check unique constraint on update (#736) * fix: replace unique_together with UniqueConstraint * fix: check unique constraint on update * chore: upgrade dependencies (#737) * chore: upgrade dependencies * fix: ugettext is deprecated in django 3.0 * chore: allow external collaborators (#738) * fix(travis): do not release in forks * fix(release): install deps within script * fix(travis): do not release pull request * fix: indentation * fix(travis): build only develop or release branches * fix(travis): build tags like #.#.# * fix(travis): regular expressions * test: cover methods parseSchema, randomInput (#679) * test: cover methods parseSchema, randomInput * style: standardjs syntax * fix: jest to globals * test: improved GUID regex matching (#680) * test: improved GUID regex matching * test: remove Unnecessary escape character * chore: upgrade dependencies (#740) * chore: upgrade dependencies * fix: odk dependency * feat: stream file response (#741) * feat: stream file response * fix: use proper method * chore: more upgrades * feat: (kernel, odk, ui, couchdb-sync) CDN static files collection on S3 and GCS (#733) * feat: (kernel, ui, odk) cloud static files * chore: (odk, kernel, ui) dependencies update * fix: (docker) remove sdk dev link * feat: (ui) publish webpack files to cloud * chore: dep updates * test: (ui) cdn publish * fix: (ui) test 100% * Update README.md Co-Authored-By: Obdulia Losantos <[email protected]> * chore: (ui) move cdn command to sdk * fix(kernel): improve API filters (#744) * fix(kernel): improve API filters * test: attachments by project * fix(storage): file path includes tenant and project id (#734) * fix(storage): attachment path includes project id * fix(storage): files path include tenant * fix: also include file concept * fix: typo * feat: add file storage cleanup * chore: upgrade dependencies (#746) * chore: upgrade dependencies * fix: add VERSION&REVISION before collectstatic * docs: update README * docs: update README * fix(Dockerfile): default ARG value to 0.0.0 * fix: make versioned optional * fix: last SDK tweaks * chore: (kernel) dependencies update * chore: upgrade dependencies Co-authored-by: Obdulia Losantos <[email protected]> Co-authored-by: shawnsarwar <[email protected]> Co-authored-by: Umar Muhammad <[email protected]> Co-authored-by: William Pink <[email protected]> Co-authored-by: Jiří Hofman <[email protected]>
Allows static files (webpack included) to be collected on S3 and GCS