Skip to content
This repository has been archived by the owner on Apr 22, 2024. It is now read-only.

feat: (kernel, odk, ui, couchdb-sync) CDN static files collection on S3 and GCS #733

Merged
merged 12 commits into from
Dec 11, 2019

Conversation

lordmallam
Copy link
Contributor

Allows static files (webpack included) to be collected on S3 and GCS

README.md Outdated Show resolved Hide resolved
Copy link
Collaborator

@obdulia-losantos obdulia-losantos left a 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.

README.md Outdated Show resolved Hide resolved
@lordmallam lordmallam changed the title feat: (kernel, odk, ui) CDN static files collection on S3 and GCS feat: (kernel, odk, ui, couchdb-sync) CDN static files collection on S3 and GCS Dec 11, 2019
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 _
Copy link
Collaborator

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 _
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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':
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

@obdulia-losantos obdulia-losantos Dec 11, 2019

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

@obdulia-losantos obdulia-losantos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤞

@lordmallam lordmallam merged commit 22a82f8 into develop Dec 11, 2019
@lordmallam lordmallam deleted the CDN-static-files branch December 11, 2019 13:17
lordmallam added a commit that referenced this pull request Jan 6, 2020
* 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]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants