Consul Democracy - Open Government and E-Participation Web Software
Here's release 2.1.1. This is a maintenance release with:
Check the Changelog to see all the changes.
Check how to keep your fork updated; if you're upgrading from release 2.1.0 or release 2.0.1, you can just:
git checkout master
git pull
git checkout -b release
git fetch upstream tag 2.1.1
git merge 2.1.1
git checkout master
git merge release
git branch -d release
git push
If you're upgrading from version 2.0.1, make sure to check version 2.1.0 release notes too.
Here's release 2.1.0 with:
Check the Changelog to see all the changes. Please take your time reading all referenced pull requests to understand new features and changes.
Check how to keep your fork updated; if you're updating from release 2.0.1, you can just:
git checkout master
git pull
git checkout -b release
git fetch upstream tag 2.1.0
git merge 2.1.0
git checkout master
git merge release
git branch -d release
git push
:gear: After deploying the new version, execute the release tasks:
bin/rake consul:execute_release_tasks RAILS_ENV=production
:warning: We've upgraded Puma to a version that doesn't support running Puma as a daemon. If you're using Capistrano to deploy, a service to run and monitor Puma with Systemd will be configured automatically. If you aren't using Capistrano, you'll have to configure Systemd or a tool like Monit or God in order to start and monitor Puma. If you use Capistrano and you're already using tools like Monit or God, you might want to disable them or disable the integration with Systemd. If you are running Consul Democracy on a Debian or Ubuntu server, ensure you have the package policykit-1
installed so the Puma systemd unit works as expected. Due to these changes, your website will be down for a few seconds when upgrading to this version. See also issue #5392 for a possible side effect.
:warning: We now depend on a specific version of Node.js. If you use Capistrano to deploy, this version will be automatically installed during deployment. If you use a different system to deploy, you might need to take this into account. This also means we no longer support Ubuntu 18.04 (which is no longer supported by Ubuntu either).
:warning: JavaScript dependencies are now handled using NPM. During development, you'll have to run npm install
in order to get these dependencies (just like you run bundle install
to get Ruby dependencies). On production, this is done automatically during deployment if you use Capistrano; if you don't use Capistrano to deploy, you might need to take this into account. Note that, with our current configuration, you'll have to run npm install
in development when you switch to a branch that contains different packages; otherwise you'll still use the packages from the last time you executed npm install
, and you'll get no warning telling you so.
:warning: On production and staging environments, in order to avoid having log files with a size of several gigabytes, the log file will now keep the entries of the current day, and old log entries will automatically be moved to a different file under the same folder. If you were already implementing a similar system, you can either disable the system you were using or disable the changes we've done in pull request #5105.
:warning: If you've added custom settings to the database, take into account that we no longer display all database settings on the /admin/settings
page, so you'll have to add your custom settings by customizing a component under app/components/custom/admin/settings
. For examples regarding how to do so, check the components customization documentation.
:information_source: We've enabled Dependabot in order to make it easier to maintain the project dependencies. Your Consul Democracy fork shouldn't be affected by this change, but if you've enabled Dependabot on your fork in the past, there's a chance Dependabot might be opening dozens of pull requests on your fork. If that's the case, you can disable Dependabot in the "Settings" section of your GitHub's fork, under "Code security and analysis".
:information_source: Existing installations using a timezone other than Madrid can now add the time_zone
entry to the secrets.yml
file before upgrading, so, if you have some custom code to set the application timezone, you can remove it and use the secrets.yml
file instead. Check pull request #5318 for more information. This step is optional.
Here's release 2.0.1. This is a maintenance release with:
Check the Changelog to see all the changes.
Check how to keep your fork updated; if you're upgrading from release 2.0.0 or release 1.5.0, you can just:
git checkout master
git pull
git checkout -b release
git fetch upstream tag 2.0.1
git merge 2.0.1
git checkout master
git merge release
git branch -d release
git push
:gear: It you're upgrading from version 1.5.0, after deploying you have to run additional tasks on your server with bin/rake consul:execute_release_tasks RAILS_ENV=production
. Remember to check and apply the release notes from version 2.0.0. You can safely omit this step if you're upgrading form version 2.0.0.
Here's release 2.0.0 with:
Check the Changelog to see all the changes. Please take your time reading all referenced pull requests to understand new features and changes.
This release is dedicated to the memory of Pablo García (@pablovg2). We'll always be thankful for his contributions to this project and we send our deepest condolences and best wishes to his family and his coworkers at @enredacoop.
Check how to keep your fork updated; if you're updating from release 1.5.0, you can just:
git checkout master
git pull
git checkout -b release
git fetch upstream tag 2.0.0
git merge 2.0.0
git checkout master
git merge release
git branch -d release
git push
:gear: After deploying the new version, execute the release tasks:
bin/rake consul:execute_release_tasks RAILS_ENV=production
Thanks to a collaboration with the Cabildo de Tenerife, we've added support for multitenancy, that is, managing different institutions using just one Consul Democracy installation. Although we've done several tests in order to experience a smooth upgrade from previous version of Consul Democracy so this feature doesn't affect existing installations, as usual we still recommend backing up your database before upgrading.
If you'd like to enable multitenancy, check the multitenancy documentation.
If you enable this feature, it's also strongly recommended that you include a task in your CI to ensure the integrity of your schema.rb
file. An example workflow for GitHub Actions is included in this release (see pull request 5009).
:warning: When upgrading your development environment, update your config/database.yml
file and add the line schema_search_path: "public,shared_extensions"
(you can copy it from the config/database.yml.example
file). This is done automatically on production environments when running the consul:execute_release_tasks
rake task.
:warning: We've removed the url
configuration option in the administration settings. If you're using Setting["url"]
in your custom code, replace it with either root_url
(if the code is executed during a request) or with root_url(ActionMailer::Base.default_url_options)
(if the code is executed during a rake task or a delayed job).
:warning: DelayedJob processes now create processes which monitor and restart DelayedJob processes in case they crash (see pull request #5146). If you're already monitoring these processes with tools like monit or systemd, you might want to disable this feature. Also note that, in order to stop delayed job, we now need to pass the -n
option: RAILS_ENV=production bin/delayed_job -n 2 stop
.
:warning: Other than the standard production, development and test environments, Consul Democracy offers the option to setup both staging and preproduction environments. If you're using the preproduction environment (which is not the staging environment), note we're now using the same configuration for preproduction and staging environments. If your config/environments/preproduction.rb
is not identical to your config/environments/staging.rb
, you'll have to change the former in order to include the differences (or you can also choose to base it on your production environment instead). If you're using the staging environment but not the preproduction one (or you aren't using either of them), ignore this warning.
Here's release 1.5.0 with:
Check the Changelog to see all the changes. Please take your time reading all referenced pull requests to understand new features and changes.
Check how to keep your fork updated; if you're updating from release 1.4.1 you can just:
git checkout master
git pull
git checkout -b release
git fetch upstream tag 1.5.0
git merge 1.5.0
git checkout master
git merge release
git branch -d release
git push
:gear: After deploying the new version, execute the release tasks:
bin/rake consul:execute_release_tasks RAILS_ENV=production
:warning: We've finished replacing Paperclip with Active Storage to manage attachments. If you're upgrading from version 1.4.x, make sure you execute the release tasks immediately after upgrading, since you'll get 500 errors in many places if you don't.
Even if we've removed Paperclip, there might be references to paperclip attachments in any existing content (for example, custom pages) and so old attachment files generated by Paperclip should be removed with care or even kept indefinitely.
:warning: We've removed the newrelic and rollbar gem dependencies from our Gemfile. If you're using the services provided by newrelic, make sure you edit the Gemfile_custom
in order to uncomment it and restore the config/newrelic.yml
file (which we deleted in pull request #4645). In a similar way, if you're using the services provided by rollbar, make sure you edit the Gemfile_custom
in order to uncomment it and restore the config/initializers/rollbar.rb
file (which we deleted in the mentioned pull request #4645)
:warning: We've changed the way to define valid postal codes for the users verification. In the past, you had to change the code in app/models/custom/verification/residence.rb
. Now CONSUL administrators can define postal codes in the settings section of the administration.
If you had already defined custom postal codes in app/models/custom/verification/residence.rb
, when you get a conflict when merging these changes, keep your changes; they'll most probably still work but, depending on your implementation, the postal codes defined by administrators might be ignored. In this case, you might want to double-check your custom changes still work as expected and consider removing this custom code and use the setting instead. In order to ease the transition, the setting allows regular expressions. When using regular expressions, omit the ^
and $
characters (or the Ruby equivalents, \A
and \Z
); we're already adding them in the code. For example, if your code was postal_code =~ /^280[0-9]{2}$/
, use 280[0-9]{2}
in the setting.
:warning: We've updated the GraphQL API so it no longer uses a deprecated DSL (pull request #4766). If you've added custom fields or models to your GraphQL API, you'll need to update those changes to the new DSL.
:warning: JavaScript files in the app/assets/javascripts/custom/
folder are now automatically required. If you've added files to that folder that aren't present in CONSUL, like homepage_enhancements.js
, and are requiring them with //= require homepage_enhancements
, you need to delete the line saying //= require homepage_enhancements
. You don't have to delete this line if the files already exists in CONSUL (for example, you wouldn't have to delete //= require globalize
if you had a file in app/assets/javascripts/custom/globalize.js
because the file app/assets/javascripts/globalize.js
already exists in CONSUL).
:warning: Due to an upgrade of the sprockets gem, if you're overwriting images under the app/assets/images/
folder by adding an image with the same name to the app/assets/images/custom/
folder, you might run into a Sprockets::DoubleLinkError
(see issue #4882). As a workaround, you can rename the image under app/assets/images/
which has the conflicting name, for example adding a _consul
or _original
suffix (or prefix).
Here's release 1.4.1. This is a maintenance release with:
Check the Changelog to see all the changes.
Check how to keep your fork updated; if you're upgrading from release 1.4.0 or release 1.3.1, you can just:
git checkout master
git pull
git checkout -b release
git fetch upstream tag 1.4.1
git merge 1.4.1
git checkout master
git merge release
git branch -d release
git push
:gear: It you're upgrading from version 1.3.1, after deploying you have to run additional tasks on your server with bin/rake consul:execute_release_tasks RAILS_ENV=production
. You can safely omit this step if you're upgrading form version 1.4.0.
Here's release 1.4.0 with:
Check the Changelog to see all the changes. Please take your time reading all referenced pull requests to understand new features and changes.
Check how to keep your fork updated; if you're updating from release 1.3.1 you can just:
git checkout master
git pull
git checkout -b release
git fetch upstream tag 1.4.0
git merge 1.4.0
git checkout master
git merge release
git branch -d release
git push
:gear: After deploying the new version, execute the release tasks:
bin/rake consul:execute_release_tasks RAILS_ENV=production
⚠️ If you've added custom attachments, make sure to change these attachments so they use has_attachment
instead of has_attached_file
. Otherwise you might run into missing files when upgrading to version 1.5.0.
In version 1.5.0 we'll change the way we store attachments from Paperclip to Active Storage. In order to make the migration painless, version 1.4.0 stores new files using both systems. After copying the existing files to Active Storage, keep both the Active Storage files and the Paperclip files. The Paperclip files are needed in version 1.4.0, and the Active Storage files will be needed in version 1.5.0.
If you've changed anything related to the way attachments are handled, there's a chance you might run into some issues when executing consul:execute_release_tasks
(which includes a task to copy existing files to Active Storage). In version 1.5.0 we'll drop Paperclip and use just Active Storage, so if you run into problems when running this task, make sure you fix them or report them (otherwise you might run into missing files when upgrading to version 1.5.0); after fixing the problems, run the task again (you can run it as many times as you want; files which were already migrated won't be affected).
If you're storing files using an external service (such as S3), before executing the release tasks edit the config/storage.yml
file and configure the service. Sample configurations are provided for S3, GCS and Azure; uncomment them where appropriate and then edit your config/secrets.yml
file with your credentials. Then edit your config/environments/production.rb
file and add config.active_storage.service = :s3
(or :gcs
or :azure
, depending on the service you're using).
⚠️ CONSUL installations using Font Awesome HTML icon classes or extending Font Awesome selectors (like .fa-icon_name
) will now have to add extra @import
clauses in ther custom.scss
file to import files like font-awesome/icons
. Another option for these installations would be to remove these classes/selectors and use our has-fa-icon
mixin.
ℹ️ In new installations, we've enabled sending compressed CSS and JavaScript files to users by default, resulting in faster page loads. If you haven't already done so, you can enable them in your current CONSUL installation by editing your server's Nginx configuration file (which is probably in a place like /etc/nginx/sites-enabled/default
) and adding these lines right after the line starting with root
:
location ^~ /assets/ {
gzip_static on;
expires max;
add_header Cache-Control public;
}
Then, restart Nginx (on Ubuntu, run sudo service nginx restart
).
Here's release 1.3.1. This is a maintenance release with:
Check the Changelog to see all the changes. Please take your time reading all referenced pull requests to understand the changes.
Check how to keep your fork updated; if you're upgrading from release 1.3.0 or release 1.2.0, you can just:
git checkout master
git pull
git checkout -b release
git fetch upstream tag 1.3.1
git merge 1.3.1
git checkout master
git merge release
git branch -d release
git push
:gear: It you're upgrading from version 1.2.0, after deploying you have to run additional tasks on your server with bin/rake consul:execute_release_1.3.0_tasks RAILS_ENV=production
. You can safely omit this step if you're upgrading form version 1.3.0.
Here's release 1.3.0 with:
Check the Changelog to see all the changes. Please take your time reading all referenced pull requests to understand new features and changes.
:exclamation: ⚠️ Recently, one of the Ruby on Rails dependencies (mimemagic) yanked all its previous versions due to a licensing issue. Due to that, before upgrading to version 1.3.0, you must install shared-mime-info on your server and then continue with the following instructions.
⚠️ In your development environment, you must also install CMake and pkg-config; no need to do so on production, staging nor testing environments
Check how to keep your fork updated; if you're updating from release 1.2.0 you can just:
git checkout master
git pull
git checkout -b release
git fetch upstream tag 1.3.0
git merge 1.3.0
git checkout master
git merge release
git branch -d release
git push
:gear: After deploying the new version, execute the release tasks:
bin/rake consul:execute_release_tasks RAILS_ENV=production
⚠️ In version 1.3.0 we update the i18n gem. If you're still defining language fallbacks using config.i18n.fallbacks = true
(which we did until we changed it in CONSUL 1.1.0), you must replace it with config.i18n.fallbacks = [I18n.default_locale]
.
⚠️ If you've customized the config/api.yml file or you've deleloped services using the GraphQL API, make sure those services still work properly; we've updated the GraphQL version and there are some minor breaking changes in the new version.
⚠️ We've upgraded the PostgreSQL version used in our Dockerfile. If you've used Docker with PostgreSQL 9.4, you'll have to run pg_upgrade
in your Docker image. In your development environment, alternatively you can remove the volume used to store the database with docker volume rm <volume_name>
.
ℹ️ Due to the upgrade to Rails 5.2, when starting Puma you might get a warning which you can safely ignore:
#<Thread:0x00000000067ea620@/home/deploy/consul/shared/bundle/ruby/2.5.0/gems/activerecord-5.2.4.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:299 sleep> - /home/deploy/consul/shared/bundle/ruby/2.5.0/gems/activerecord-5.2.4.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:301:in 'sleep'`.
ℹ️ We've started to use components, which are a way to group helpers and views together. Existing helpers and views will still work properly. If you'd like to customize a component, check the components customization documentation.
Here's release 1.2.0 with:
Check the Changelog to see all the changes. Please take your time reading all referenced pull requests to understand new features and changes.
Check how to keep your fork updated; if you're updating from release 1.1.0 you can just:
git checkout master
git pull
git checkout -b release
git fetch upstream tag 1.2.0
git merge 1.2.0
git checkout master
git merge release
git branch -d release
git push
:gear: After deploying the new version, execute the release tasks:
bin/rake consul:execute_release_tasks RAILS_ENV=production
:warning: Our test suite now uses Rails 5.1 system tests. If you've added your own feature tests, consider converting them to system tests to make them run faster and to guarantee compatibility with our test suite configuration.
:warning: In version 1.3.0 we'll upgrade to Rails 5.2. In version 1.2.0 we've solved the deprecation warnings about code which will not work with version 1.3.0. If you've added custom code, after updating to version 1.2.0 make sure you don't get any deprecation warnings in your custom code either or solve them as soon as possible.