None
- Updates workflows to handle multiple cardinality-n cards #9005
- Adds default language selection to advanced search #9028
- Fixes workflow bug for cards without a
resourceinstance_id
#9061 - Checks if bnodeid exists in tile data #8966
- Updates template preview in Graph Designer #9038
- Adds security fixes for time-based blind SQL injection #9065
- Updates webpack production config to preserve
Prototype
calls #9082
Python:
Upgraded:
None
Added:
None
JavaScript:
Upgraded:
None
Added:
None
None
-
You must be upgraded to at least version 7.0.0 before proceeding. If you are on an earlier version, please skip to Upgrading Arches :: If upgrading from version 6.1.x
-
Be sure to backup your database before proceeding.
-
Upgrade to Arches 7.2.0
pip install --upgrade arches==7.2.0
-
You must be upgraded to at least version 6.1.0 before proceeding.
-
Remove django-revproxy
pip uninstall django-revproxy
-
Be sure to backup your database before proceeding.
-
Upgrade to Arches 7.2.0
pip install --upgrade arches==7.2.0
-
Important: If you are maintaining an Arches package, be sure to export your graphs and resource instance data before re-importing or reloading your package.
-
Elasticsearch 8 (ES 8) enables a feature called xpack security by default. See the elasticsearch 8 documentation for details on the new features and how you can use them to secure your elasticsearch instance.
- By default, xpack security turns on SSL with a self-signed certificate and will expect requests to come from an ES user. Elasticsearch users can be created via the elasticsearch-users command. Uncomment and override
ELASTICSEARCH_CONNECTION_OPTIONS
insettings.py
line as needed (with an appropriate password and certificate settings) in your project settings or settings_local files. - If you choose to turn off xpack security in your ES 8 instance (not recommended) you will need to override the
ELASTICSEARCH_HOSTS
setting and change the scheme to "http".
- By default, xpack security turns on SSL with a self-signed certificate and will expect requests to come from an ES user. Elasticsearch users can be created via the elasticsearch-users command. Uncomment and override
-
Your project must be upgraded to at least version 7.0.0 before proceeding. If you are on an earlier version, please skip to Upgrading an Arches Project :: If upgrading from version 6.1.x:
-
Be sure to backup your database before proceeding.
-
In your project's
settings.py
file:- ensure
STATIC_URL
has a valid value - ensure
APP_ROOT
has a valid value - ensure
LANGUAGES
has at least one uncommented value - if not already updated, update the
package_settings
andsettings_local
import blocks:# 7.0.0 try: from .package_settings import * except ImportError: pass try: from .settings_local import * except ImportError: pass
# 7.2.0 try: from .package_settings import * except ImportError: try: from package_settings import * except ImportError as e: pass try: from .settings_local import * except ImportError as e: try: from settings_local import * except ImportError as e: pass
- if it doesn't already exist, add a return to the bottom of the file that NODEJS can parse:
if __name__ == "__main__": print( json.dumps({ 'ARCHES_NAMESPACE_FOR_DATA_EXPORT': ARCHES_NAMESPACE_FOR_DATA_EXPORT, 'STATIC_URL': STATIC_URL, 'ROOT_DIR': ROOT_DIR, 'APP_ROOT': APP_ROOT, 'WEBPACK_DEVELOPMENT_SERVER_PORT': WEBPACK_DEVELOPMENT_SERVER_PORT, }) ) sys.stdout.flush()
- ( optional ) by default
ARCHES_NAMESPACE_FOR_DATA_EXPORT
is assigned the value"http://localhost:8000/"
. If running your Django server elsewhere, overwriteARCHES_NAMESPACE_FOR_DATA_EXPORT
in your project'ssettings.py
file. - ( optional ) by default
WEBPACK_DEVELOPMENT_SERVER_PORT
is assigned the value9000
. If you want the webpack server to run on a different port, overwriteWEBPACK_DEVELOPMENT_SERVER_PORT
in your project'ssettings.py
file.
- ensure
-
Within your project, with your Python 3 virtual environment activated:
python manage.py migrate python manage.py updateproject python manage.py es reindex_database
NOTE: Running
python manage.py updateproject
will delete yourwebpack
directory and replace it with an updated version from arches core. It will also copy over.eslintrc.js
,.eslintignore
,.babelrc
,.browserslistrc
,.stylelintrc.json
from arches core to your project's root directory, overwriting the files if they already exist. -
If you have any project-level JavaScript dependencies, ensure they are aliased correctly in
webpack/webpack-node-modules-aliases.js
-
Update your
package.json
file:- ensure
dependencies
is pointing to the correct version, eg:archesproject/arches#stable/7.2.0
- ensure
devDependencies
is pointing to the correct version, eg:archesproject/arches-dev-dependencies#stable/7.2.0
- ensure
-
Delete out-of-date yarn configs:
- delete
yarn.lock
- if it exists, delete your
media/node_modules
folder
- delete
-
Start your application server.
-
In a seperate terminal, navigate to the root directory of the project ( you should be on the same level as
package.json
)- run
yarn
, this will install updated frontend dependencies in/media/node_modules
. - run
yarn build_development
oryarn_start
. This will regenerate yourmedia/build
directory.yarn build_development
will build a development bundle for the frontend assests of the application -- this should complete in less than 2 minutesyarn start
will build the frontend of the application and then start a webpack development server
- run
-
If you are running Arches on Apache, be sure to run:
python manage.py build_production
and restart your server.
sudo service apache2 reload
-
Finally, If you are running Celery, you should also restart your Celery worker(s). The process for doing this depends on how Celery is being run.
-
Be sure to backup your database before proceeding.
-
in your project's
settings.py
file:MOBILE_OAUTH_CLIENT_ID
must be renamed toOAUTH_CLIENT_ID
- ensure
webpack_loader
has been added toINSTALLED_APPS
- ensure
APP_NAME
andARCHES_NAMESPACE_FOR_DATA_EXPORT
have been defined - ensure the following attributes exist in the file:
STATIC_ROOT = os.path.join(ROOT_DIR, "staticfiles")
STATIC_URL = "/static/"
STATICFILES_DIRS = ( os.path.join(APP_ROOT, 'media', 'build'), os.path.join(APP_ROOT, 'media'), ) + STATICFILES_DIRS
WEBPACK_LOADER = { "DEFAULT": { "STATS_FILE": os.path.join(APP_ROOT, "webpack/webpack-stats.json"), }, }
- ensure
STATIC_URL
has a valid value - ensure
APP_ROOT
has a valid value - ensure
LANGUAGES
has at least one uncommented value - update the
package_settings
andsettings_local
import blocks:# 6.1.0 try: from .package_settings import * except ImportError: pass try: from .settings_local import * except ImportError: pass
# 7.2.0 try: from .package_settings import * except ImportError: try: from package_settings import * except ImportError as e: pass try: from .settings_local import * except ImportError as e: try: from settings_local import * except ImportError as e: pass
- add a return to the bottom of the file that NODEJS can parse:
if __name__ == "__main__": print( json.dumps({ 'ARCHES_NAMESPACE_FOR_DATA_EXPORT': ARCHES_NAMESPACE_FOR_DATA_EXPORT, 'STATIC_URL': STATIC_URL, 'ROOT_DIR': ROOT_DIR, 'APP_ROOT': APP_ROOT, 'WEBPACK_DEVELOPMENT_SERVER_PORT': WEBPACK_DEVELOPMENT_SERVER_PORT, }) ) sys.stdout.flush()
- ( optional ) By default
ARCHES_NAMESPACE_FOR_DATA_EXPORT
is assigned the value"http://localhost:8000/"
. If running your Django server elsewhere, overwriteARCHES_NAMESPACE_FOR_DATA_EXPORT
in your project'ssettings.py
file. - ( optional ) By default
WEBPACK_DEVELOPMENT_SERVER_PORT
is assigned the value9000
. If you want the webpack server to run on a different port, overwriteWEBPACK_DEVELOPMENT_SERVER_PORT
in your project'ssettings.py
file.
-
Within your project with your Python 3 virtual environment activated:
python manage.py migrate python manage.py es reindex_database
-
Run the update project command
python manage.py updateproject
This will create a
/webpack/
directory in your project and copy over the webpack configuration files from arches core. It will also copy over.eslintrc.js
,.eslintignore
,.babelrc
,.browserslistrc
,.stylelintrc.json
from arches core to your project's root directory, overwriting the files if they already exist. -
If you have any project-level JavaScript dependencies, ensure they are aliased correctly in
webpack/webpack-node-modules-aliases.js
. -
Update the project's
.gitignore
file to include:my_project/staticfiles my_project/webpack/webpack-stats.json node_modules
-
Update the contents of
.yarnrc
to referencenode_modules
instead ofpackages
:--install.modules-folder "./media/node_modules" --add.modules-folder "./media/node_modules"
-
The project's
package.json
file will need to be manually updated to include updates todependencies
,devDependencies
andscripts
. It should contain the following:"scripts": { "build_production": "NODE_PATH=./media/node_modules NODE_OPTIONS=--max_old_space_size=8192 NODE_ENV=production ./media/node_modules/.bin/webpack --config webpack/webpack.config.prod.js", "build_development": "NODE_PATH=./media/node_modules NODE_OPTIONS=--max_old_space_size=8192 ./media/node_modules/.bin/webpack --config webpack/webpack.config.dev.js", "build_test": "NODE_PATH=./media/node_modules NODE_OPTIONS=--max_old_space_size=8192 ./media/node_modules/.bin/webpack --config webpack/webpack.config.dev.js --env test=true", "start": "NODE_PATH=./media/node_modules NODE_OPTIONS=--max_old_space_size=8192 ./media/node_modules/.bin/webpack serve --config webpack/webpack.config.dev.js" },
"dependencies": { "arches": "archesproject/arches#stable/7.2.0" },
"devDependencies": { "arches-dev-dependencies": "archesproject/arches-dev-dependencies#stable/7.2.0" },
-
Update the templates in your project:
- If a template is using the
{% load staticfiles %}
template tag, it must be updated to{% load static %}
- If a template is using the
{% static '/path/to/file' %}
template tag, it must be updated to{% webpack_static '/path/to/file' %}
- Be sure to include
{% load webpack_static from webpack_loader %}
at the top of any template where this change is made
- Be sure to include
- If a template is using the
-
The pattern used for JavaScript component template dependencies has changed, and any project components must be updated as well. Consider the following example with our
reports/default.js
component:# 6.1.0 define(['knockout', 'viewmodels/report'], function(ko, ReportViewModel) { return ko.components.register('default-report', { viewModel: function(params) { params.configKeys = []; ReportViewModel.apply(this, [params]); }, template: { require: 'text!report-templates/default' } }); });
# 7.2.0 define(['knockout', 'viewmodels/report' 'templates/views/report-templates/default.htm'], function(ko, ReportViewModel, defaultReportTemplate) { return ko.components.register('default-report', { viewModel: function(params) { params.configKeys = []; ReportViewModel.apply(this, [params]); }, template: defaultReportTemplate }); });
-
(optional) If internationalization is important to your project, strings in component templates (eg. any template that is a dependency of a JavaScript file) should be moved to
javascript.htm
and added as a key-value pair to anarches-translations
HTML object. You must then update your component template to use the new string:# my_project/my_project/templates/javascript.htm {% extends "javascript.htm" %} {% load static %} {% load l10n %} {% load i18n %} {% block arches_translations %} <div class='arches-translations' my-key-name='{% trans "My key value." as myKeyValue %} "{{ myKeyValue|escapejs }}"' ></div> {% endblock arches_translations %}
# my_project/my_project/templates/path/to/component.htm <span data-bind="text: $root.translations.textKeyOnArchesTranslationObject"></span> # OR <select data-bind="placeholder: $root.translations.textKeyOnArchesTranslationObject" ></select> # OR <input data-bind="attr:{placeholder: $root.translations.textKeyOnArchesTranslationObject}></input>
Note: Keys added to the
arches-translations
HTML object should be dash-delineated, eg.my-key-name
. When referenced in a component template, the key should be camelcase instead, eg.myKeyName
. -
Update the project's
index.htm
/package
references to/node_modules
references, along with any other references to/media/packages
in your codebase. -
Start your application server.
-
In a seperate terminal, navigate to the root directory of the project ( you should be on the same level as
package.json
)- manually remove the
yarn.lock
file, eg.rm yarn.lock
- if it already exists, delete your
media/node_modules
folder - run
yarn
, this will install updated frontend dependencies in/media/node_modules
. - (optional) You can remove
/media/packages
- manually remove the
-
In the same terminal window where you ran
yarn
,yarn build_development
oryarn_start
. This will generate yourmedia/build
directory.yarn build_development
will build a development bundle for the frontend assests of the application -- this should complete in less than 2 minutesyarn start
will build the frontend of the application and then start a webpack development server
-
If you are running Arches on Apache, be sure to run:
python manage.py build_production
and restart your server.
sudo service apache2 reload
-
Finally, If you are running Celery, you should also restart your Celery worker(s). The process for doing this depends on how Celery is being run.