Version 4.1.3¶
Released: November 2, 2021
Status: Stable
Changes¶
Appearance¶
The copying of the bootstrap alert style was fixed. Alert styles now change when the theme changes.
The copying of the bootstrap alert style was optimized by executing it only
in the root template. This runs the code just once instead of running it
on each page refresh. The element #div-javascript-dynamic-content
was
also removed and it is now created and destroyed dynamically once just.
Converter¶
An asset duplication bug in the percent coordinate transformation was fixed.
The cache_hash
method of the Transformation
class was split to
allow subclasses to modify how the cache hash is calculated.
The asset transformations now include the image hash as part of the transformation hash calculation. This change allows automatic invalidation of all cached document images that use an asset if the asset image is modified.
The way the absolute coordinates of the percentage asset paste transformation were calculated has been updated to more closely reflect the purpose of the transformation. Minimum (0) or maximum (100) coordinate values does not cause the asset to clip outside of the image borders anymore.
Platform¶
The Sentry client backend received some updates to increase its usefulness. More SDK options were added. Sentry options are now typecasted from Mayan settings to ensure proper data types.
Celery and Redis instrumentation integration was added to the Sentry client backend.
The default value of traces_sample_rate
option was lowered from 1 to
0.25. This value is better suited for production deployments. Increase to 1
for full debug information capture during development or testing.
Sources¶
Several staging folder source fixes and patches were merged. Staging
folders now use StreamingHttpResponse
to serve previews bringing image
processing to the same level as the rest of the code. Code optimizations and
simplification were also merged which include better image cache
utilization and removal of a potential file descriptor leak.
Staging folders can now generate previews for office document files.
The source backend base class now does not assume all source backends provide an upload form. This expands the usability of the new source backend system introduced in version 4.1 to more stylwe of document sources.
A bug that prevented the SANE scanner source backend to work properly was fixed. The error handling of the SANE scanner source was also improved.
Error logging of non interactive sources was also fixed.
Vagrant¶
The development Vagrant setup was improved. The virtual machine deployment
script now loads all values from the root config.env
file. This ensures
that the virtual machine is generated using the same libraries,
dependencies and paths as the Docker image.
The version of the Supervisord
program is now updated automatically.
The way APT and PIP proxies are configured was updated to match how they are processed in the rest of the code base. This allows a single proxy configuration to work with all build methods.
A makefile was added to aid in working with the Vagrant setup.
Other¶
The devpi targets were moved to the main makefile to allow them to be used by all the build methods.
Removals¶
None
Upgrade process¶
Docker Compose¶
Check the Docker upgrading chapter for the complete upgrade process.
Direct deployment¶
Upgrading from Mayan EDMS 3.5.x¶
Important
Supervisord must be upgraded to version 4.2.2. See troubleshooting section: After upgrade to version 4.1
Stop supervisord:
sudo systemctl stop supervisor
Make a backup of your supervisord file:
sudo cp /etc/supervisor/conf.d/mayan-edms.conf /etc/supervisor/conf.d/mayan-edms.conf.bck
Make a backup of your database:
Use the respective backup command for the database:
Upgrade to the latest pip version:
sudo --user=mayan /opt/mayan-edms/bin/pip install --upgrade pip
Remove deprecated requirements:
sudo --user=mayan curl https://gitlab.com/mayan-edms/mayan-edms/raw/master/removals.txt --output /tmp/removals.txt \ && sudo --user=mayan /opt/mayan-edms/bin/pip uninstall --requirement /tmp/removals.txt --yes
Update the Mayan EDMS Python package:
sudo --user=mayan /opt/mayan-edms/bin/pip install mayan-edms==4.4.7
the requirements will also be updated automatically.
Update the Redis configuration to serve at least 3 databases:
Replace:
databases ...
with:
databases 3
Restart Redis for the changes to take effect:
sudo systemctl restart redis
Edit the config file at
/opt/mayan-edms/media/config.yml
:Replace:
LOCK_MANAGER_BACKEND: ... LOCK_MANAGER_BACKEND_ARGUMENTS: ...
with:
LOCK_MANAGER_BACKEND: mayan.apps.lock_manager.backends.redis_lock.RedisLock LOCK_MANAGER_BACKEND_ARGUMENTS: {'redis_url':'redis://:mayanredispassword@<IP address of Redis server>:6379/2'}
Update the supervisord configuration file. Replace the environment variables values shown here with your respective settings. This step will refresh the supervisord configuration file with the new queues and the latest recommended layout:
sudo --user=mayan MAYAN_MEDIA_ROOT=/opt/mayan-edms/media/ \ /opt/mayan-edms/bin/mayan-edms.py platformtemplate supervisord | sudo sh -c "cat > /etc/supervisor/conf.d/mayan-edms.conf"
Edit the supervisord configuration file and update any setting specific to your installation:
sudo vi /etc/supervisor/conf.d/mayan-edms.conf
Migrate existing database schema and static media files with:
sudo --user=mayan MAYAN_MEDIA_ROOT=/opt/mayan-edms/media/ \ /opt/mayan-edms/bin/mayan-edms.py performupgrade
Start supervisord:
sudo systemctl start supervisor
Clear the browser cache to avoid loading old web assets.
The upgrade procedure is now complete.
Troubleshooting¶
Follow the solutions outlined in the troubleshooting section: After upgrade to version 4.1
Backward incompatible changes¶
None
Issues closed¶
GitLab issue #1053 Paste an asset (percents coordinates) transformation duplicates asset
Issues addressed¶
GitLab issue #1049 [4.1] Front End: Source ACL server error.
GitLab issue #1050 [4.1] Workflow State Action “Http request to node API”: document.id missing
GitLab issue #1052 KeyError after upgrade to 4.1.2