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

Latest commit

 

History

History
1240 lines (938 loc) · 84.8 KB

CHANGELOG.md

File metadata and controls

1240 lines (938 loc) · 84.8 KB

Changelog

All notable changes to this project will be documented in this file. If possible, each change should also include a short reasoning for why the change was introduced.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

Unreleased

1.12.0 - 2022-12-30

  • Move from CirleCI to Github Actions
  • Fix coordinate order breaking change in osoite import:
    • Uprade to python 3.7 and use buster image in importer workaround platform dependency issue
  • Fix YSO importer to skip saami language
  • Fix osoite importer with django-munigeo fork
  • Add harrastushaku topics
  • Add Erityisryhmät espoo audience
  • Change handikappade -> funktionsnedsatta
  • Upgrade dependencies (security issues), see requirements.txt in 1.12.0

1.11.1 - 2022-08-11

Added

  • Return recently published events with the last_modified_since query

Security

  • Update container deps to latests when building

Fixed

  • Fix postgres container build

1.11.0 - 2022-05-05

Added

  • Timed publication of events. Use the date_published field to support timed publication. Events with date_published in the future are filtered out from event listings for unauthenticated users and users of other organizations than the publisher.

Security

Fixed

  • Fail the CI run if tests fail

1.10.21 - 2022-04-27

Changed

  • Remove Laajalahti from automatic 02600 tagging (ES-438)
  • Update to latest Helsinki version
  • Fix build and apply sensible dev practises

1.10.20 - 2021-10-27

Changed

  • Change importer base url ESPOO_BASE_URL to espoo.eu

1.10.19 - 2021-10-27

Fixed

  • Fix pipeline by changing builder_image_version and python_image_version.

1.10.18 - 2021-08-06

Security

1.10.17 - 2021-08-06

Security

  • Fix CVE-2021-33203 by upgrading django from 2.2.20 to 2.2.24 (automatic Dependabot upgrade)
  • Fix CVE-2021-33571 by upgrading django from 2.2.20 to 2.2.24 (automatic Dependabot upgrade)
  • Fix CVE-2021-32052 by upgrading django from 2.2.20 to 2.2.24 (automatic Dependabot upgrade)
  • Fix CVE-2021-31542 by upgrading django from 2.2.20 to 2.2.24 (automatic Dependabot upgrade)

1.10.16 - 2021-06-03

Fixed

  • Fix the YSO-importer from crashing when an invalid id is encountered while getting replacement for a deprecated id

1.10.15 - 2021-05-19

Security

  • Fix GHSA-pghf-347x-c2gj by upgrading django-debug-toolbar from 3.1.1 to 3.2.1 (automatic Dependabot upgrade)

1.10.14 - 2021-05-19

Security

  • Fix GHSA-pghf-347x-c2gj by upgrading django-debug-toolbar from 3.1.1 to 3.2.1 (automatic Dependabot upgrade)

1.10.13 - 2021-05-19

Security

  • Fix CVE-2020-29651 by upgrading py from 1.9.0 to 1.10.0 (automatic Dependabot upgrade)

1.10.12 - 2021-05-18

Fixed

  • Fix CVE-2020-25658 by upgrading rsa from 4.6 to 4.7 (automatic Dependabot upgrade)

1.10.11 - 2021-03-30

Fixed

  • Fix CVE-2021-27291 by upgrading pygments from 2.7.2 to 2.7.4 (automatic Dependabot upgrade)

1.10.10 - 2021-03-29

Fixed

1.10.9 - 2021-03-29

Fixed

  • Fix CVE-2020-14343 by upgrading pyyaml from 5.3.1 to 5.4 (automatic Dependabot upgrade)

1.10.8 - 2021-03-29

Fixed

  • Fix CVE-2020-28493 by upgrading jinja2 from 2.11.2 to 2.11.3 (automatic Dependabot upgrade)

1.10.7 - 2021-03-26

Fixed

  • Fix CVE-2020-25626 by upgrading djangorestframework from 3.11.0 to 3.11.2 (automatic Dependabot upgrade)

1.10.6 - 2021-03-26

Fixed

1.10.5 - 2021-03-26

Fixed

1.10.4 - 2021-03-26

Fixed

  • Fix GHSA-vv2x-vrpj-qqpq by upgrading bleach from 3.1.5 to 3.3.0 (automatic Dependabot upgrade)

1.10.3 - 2021-03-26

Fixed

  • Ingored /venv folder at gitignore to avoid trying to commit it's contents.

1.10.2 - 2021-03-26

Fixed

  • Fix CircleCI by changing builder_image_version.

1.10.1 - 2021-01-08

Fixed

  • Changed the push-version-tag.sh script so that it works although the tag to be pushed already exists. This way, the CircleCI workflow can be restarted without the push-version-tag.sh script failing.

1.10.0 - 2021-01-07

Added

  • A feature to the add_espoo_places management command for automatically adding Espoo place keywords to existing imported events based on the event location. This needs to be done in order for the imported events to have any Espoo place keywords and thus be visible in the new Espoo.fi site. The feature works in the following way:
    • If an imported event has a location in Espoo with a geographical postal code, the corresponding place keywords are automatically added for the event based on a hardcoded mapping of Espoo postal codes to place keywords.
    • If an imported event has a location in Espoo with a non-geographical postal code, the corresponding place keyword is automatically added based on a hardcoded mapping of location IDs to place keywords. Currently, only Sellosali has been mapped to a place keyword since it has a lot of events and has a postal code of 02070 which isn't tied to a specific geographical area.
    • If an imported event has a location with a postal code outside of Espoo, the place keyword Other than Espoo will be automatically added for the event.
  • A feature to the add_espoo_places management command for automatically removing the Espoo place keyword Online event from such events that don't have the YSO keyword Remote participation anymore. The reason why a reimported event might not have the YSO keyword anymore is that the event might have changed from being a remote event to a non-remote event.
  • A feature to the add_espoo_audience management command for automatically removing any Espoo audience keywords whose corresponding YSO keywords have been removed from a reimported event. This way, the Espoo audience keywords are kept in sync with the events' YSO audience keywords also for removed YSO audience keywords.

Changed

  • The add_espoo_audience management command to only update Espoo audience keywords for events that haven't been edited by a user since we don't want to accidentally overwrite any keywords modified by a user.
  • The add_espoo_places management command to only add the Espoo place keyword Online event to remote events that haven't been edited by a user since we don't want to accidentally overwrite any keywords modified by a user.

1.9.2 - 2021-01-06

Fixed

  • The helmet importer (or any other importer for that matter) from removing Espoo audience keywords added by the add_espoo_audience management command and Espoo place keywords added by the add_espoo_places management command when reimporting and thus updating an existing event. This change fixes the issue by checking whether the event has any Espoo audiences or keywords and keeping them although the reimported event data doesn't have any Espoo audiences or keywords. This way, we don't accidentally overwrite any audiences and keywords for events that have been augmented by the add_espoo_audience and add_espoo_places management commands.

1.9.1 - 2020-12-30

This release syncs the pull request City-of-Helsinki/linkedevents#440 from linkedevents to espooevents-service. The pull request is synced separately since it's still unmerged in the upstream linkedevents repository but we already need the change in espooevents-service.

Added

  • Instructions for submitting a pull request to the Helsinki Linked Events repository. This is useful, e.g., when we have more general changes that aren't Espoo-specific and which should therefore be included in the upstream linkedevents repository to prevent linkedevents and espooevents-service from diverging too much from each other.

Fixed

  • The automatic creation of the Internet location in the helmet importer. Currently, the helmet importer checks if an Internet location exists and creates one if it doesn't exist. This, however, currently fails since the self.system_data_source variable passed as an argument to the Place creation query contains a tuple and not a DataSource object resulting in the following error:

    ValueError: Cannot assign "(<DataSource: espooevents>, True)": "Place.data_source" must be a "DataSource" instance.
    

    This change fixes the bug by correctly assigning the DataSource object to the self.system_data_source variable so that the Internet location can be successfully created if it doesn't already exist.

1.9.0 - 2020-12-29

Added

  • A new HELMET_CITY environment variable and corresponding Django setting for controlling whether the helmet importer imports Helmet events located in all Helmet cities (i.e., Espoo, Helsinki, Kauniainen, and Vantaa) or just events located in Espoo. The default value of HELMET_CITY is all which tells the helmet importer to import events from all Helmet cities.
  • Some documentation for the Helmet API queries to ease future maintanance and development

Changed

  • Grouped the Helmet libraries in the helmet importer LOCATIONS mapping by city so that it's easier to see whether the mapping is up-to-date and what libraries are missing (Helmet.fi also lists the libraries based on city).

    KNOWN ISSUES: The current helmet importer LOCATIONS mapping isn't up-to-date, e.g., some Espoo libraries are missing. To update the mapping, we'd need an up-to-date list of the libraries along with their Helmet Node IDs from the Helmet maintainer.

  • The example helmet command in Makefile to only import events located in Espoo

  • The install_templates command to be run in a Docker container. This was previously changed to be run on the host in version 1.8.1 since the previous command that executed the command in a Docker container didn't work. However, the command can easily be fixed to work in a Docker container by just mounting the source code directory to the container where the install_templates command is being run. This way, the installed templates are correctly installed to the correct host source code directory which is also visible to the container that runs espooevents-service.

1.8.1 - 2020-12-22

Fixed

  • The location mapping from Espoo's NetCommunity CMS Node IDs to Palvelukartta (tprek) location IDs in the espoo importer. It seems that the tprek IDs have changed for some of the existing places and the hardcoded mapping is thus out of date.

    For espooevents-service instances that have already imported the locations with the old IDs, the espoo importer doesn't fail since the old IDs defined in the mapping are found in the database. However, for new clean instances which don't have the locations with the old IDs, the espoo importer fails for the missing location IDs.

    To fix the issue, we replace the old tprek IDs in the location mapping with the corresponding new tprek IDs. These have been found by just looking up the new locations imported by the tprek importer in the database based on the place names.

    Note, also, that for espooevents-service instances that already have the locations with the old IDs, the old locations have been correctly marked as replaced by the newer locations.

  • The incorrect install_templates example command in Makefile. The current install_templates example command doesn't actually work since it installs the templates in the admin Docker image and not the local development Docker image. To fix the issue, we change the command to be run directly on the host instead of in the admin Docker container so that the templates are installed in the host source code directory. Since the host source code directory is mounted in the development Docker container, running the install_templates command will now correctly install the templates for the local development environment.

1.8.0 - 2020-12-22

This release syncs the pull request City-of-Helsinki/linkedevents#438 from linkedevents to espooevents-service. The pull request is synced separately since it's still unmerged in the upstream linkedevents repository but we already need the change in espooevents-service.

Added

  • Possibility to view and edit Language object translations in the Django admin so that the appropriate language names and translations can be displayed instead of language codes (City-of-Helsinki/linkedevents#438). This is useful, e.g., when displaying the event languages in espooevents-frontend.
  • Instructions for syncing a specific pull request from Helsinki's Linked Events repository to the Espoo Events repository. This can be useful, e.g., when wanting to sync an unmerged pull request needed by espooevents-service from the upstream repository.

Fixed

  • The Language rows not being clickable in the Django admin (City-of-Helsinki/linkedevents#438). Currently, when no languages have been created and an importer is run, a set of languages are dynamically created based on settings.LANGUAGES and the languages supported by the importer. However, the current implementation sets only the id field for the new Language and not the name field which is shown in the Django admin list view. Thus, the created languages can't be clicked in the Django admin list view and the only way to get to the edit view is by a direct URL. This change fixes the issue by setting the name field for the created Language so that the language can be clicked in the Django admin.

1.7.0 - 2020-12-22

This release syncs the latest changes from linkedevents (commits 76d10d2...70d3504) to espooevents-service.

Added

  • The django-debug-toolbar to display various types of debug information in local development (City-of-Helsinki/linkedevents#435)
    • NOTE! Fixed a bug with the django-debug-toolbar change that caused the dependency to be mandatory also in the production environment.
  • combined_local_ongoing filter for events for filtering local events based on settings.MUNIGEO_MUNI that are currently ongoing or are upcoming (City-of-Helsinki/linkedevents#436)
    • NOTE! The changes related to the new ongoing_local cache have been customized for Espoo Events. Also, python-memcached has been dropped since espooevents-service already has django-redis configured.
  • populate_local_event_cache management command that should be run hourly to update the combined_local_ongoing cache used by the combined_local_ongoing filter (City-of-Helsinki/linkedevents#436)
  • ONGOING_LOCAL_CACHE_URL environment variable setting for specifying the ongoing_local cache URL for the Django app
  • The following new environment variables for the local and distribution Docker images:
    • CACHE_DB for configuring the Django default cache DB. The default value is 1 if CACHE_DB hasn't been specified.
    • ONGOING_LOCAL_CACHE_DB for configuring the Django ongoing_local cache DB. The default value is the value of CACHE_DB if ONGOING_LOCAL_CACHE_DB hasn't been specified.
  • The following new environment variable for the admin Docker image:
    • CACHE_HOST for specifying the Redis host
    • CACHE_PASSWORD_SSM_KEY for specifying the SSM key for the cache password. This is used for fetching the password for the ongoing_local cache from AWS SSM in the Docker entrypoint script. This is currently only needed for running the populate_local_event_cache management command. Alternatively, the CACHE_PASSWORD environment variable can also be passed but this shouldn't be used for AWS Batch jobs since the password would be visible, e.g., in AWS Console.
    • CACHE_TLS for specifying whether a TLS connection should be used for the Redis connection. This is needed since the admin Docker image is used in both the local and non-local environments but the local Redis container doesn't have TLS configured whereas the non-local environments have TLS configured.
    • ONGOING_LOCAL_CACHE_DB for configuring the Django ongoing_local cache DB. The default value is 1 if ONGOING_LOCAL_CACHE_DB hasn't been specified.
  • Example command to Makefile for running the populate_local_event_cache management command locally
  • A note in README about being careful when rebasing changes synced from the upstream linkedevents repository

Changed

  • The hardcoded value of the MUNIGEO_MUNI setting from kunta:helsinki to kunta:espoo. The value is used by the new populate_local_event_cache management command to search for local upcoming events. Since we want to search for local events in Espoo, the value needs to be kunta:espoo.

Fixed

1.6.1 - 2020-12-15

Changed

  • The IDs of some of the place keywords in the espoo:places keyword set since we've added the missing place keyword Vanha-Nuuksio in between the other place keywords. Since the espoo:places keyword set hasn't been taken into use yet in Espoo Events, we can safely change the IDs of the place keywords to follow the original order in the specification. This is done just as a cosmetic change and it doesn't have any other practical reasons.

    NOTE! If you've already added the espoo:places keyword set, you need to remove it and run the add_espoo_places management command again to add the place keywords with their new IDs. For instance, the ID of the Online event place keyword has changed from espoo:p62 to espoo:p63 so you also need to remove any references to it. You can run the following SQL statements to delete any existing Espoo place keywords from the database:

    DELETE FROM events_event_keywords WHERE keyword_id ILIKE 'espoo:p%';
    DELETE FROM events_keywordset_keywords WHERE keywordset_id = 'espoo:places';
    DELETE FROM events_keywordset WHERE id = 'espoo:places';
    DELETE FROM events_keyword WHERE id ILIKE 'espoo:p%';
    

Fixed

  • The espoo:places keyword set by adding the missing place keyword Vanha-Nuuksio

1.6.0 - 2020-12-15

Added

  • A new Django management command add_espoo_places for adding a new keyword set espoo:places with Espoo's place keywords. The keywords in the keyword set are based on Espoo's neighborhoods (Finnish: kaupunginosat).

    Another option would've been to instead of keywords add the neighborhoods in the place hierarchy similarly as the python manage.py geo_import helsinki --divisions command does for, e.g., Helsinki's neighborhoods. However, this would've required that the Espoo place hierarchy is defined or can be fetched from somewhere and that a new django-munigeo importer would've been implemented for Espoo. This could of course still be implemented in the future if it's deemed necessary.

    For now, the Espoo places are added using the keywords-based implementation since it was considered simpler to implement and more flexible from the event management perspective. A downside is that there isn't a strong link between the event places and the event place keywords. Thus, it's possible that the place keyword of an event isn't correct in relation to the event place which can occur, e.g., because of a human error. A keywords-based implementation is, on the other hand, more flexible since it allows to tag an event with multiple place keywords. Also, not all events might have an explicit and unambiguous place or the event place information might be incomplete whereby a keywords-based place implementation might be more suitable than the place hierarcy based implementation.

    The management command also automatically adds the "Online event" (espoo:p62) place keyword to any events that have the YSO "remote participation" (yso:p26626) keyword. This is mostly relevant for events added to Espoo Events by the importers. Instead of implementing the mapping directly in the importers, the mapping is now done in this management command in order to better isolate the change and thus minimize changes to existing functionality. This in turn helps to keep the repository compatible with the upstream linkedevents repository. Since the mapping needs to be done to newly imported events, it's recommended to run this management command hourly since some of the importers should also be run hourly.

  • Example command to Makefile for running the add_espoo_places management command locally

1.5.0 - 2020-12-10

Added

  • A new Django management command add_espoo_topics for adding a new keyword set espoo:topics with Espoo's topic keywords. All of the keywords in the keyword set are based on existing YSO keywords. Since the add_espoo_topics command only adds a new keyword set and adds existing YSO keywords to the set, there's no need to run the management command based on a regular schedule. In other words, it's sufficient to run the management command manually only when the keyword set or its keywords change.

Changed

  • Replaced the add_helsinki_topics example command in Makefile with the new add_espoo_topics command

Fixed

  • A couple of small typos in the log messages of the add_espoo_audience management command

1.4.0 - 2020-12-09

Changed

  • Replaced all of the YSO keywords added by the add_espoo_audience management command with custom Espoo audience keywords so that the Finnish audience terms and their translations correspond to the terms and translations in Espoo.fi. The terms used in Espoo.fi differ from the corresponding YSO keywords which makes the YSO keywords unsuitable for Espoo.

    NOTE! If you've already added the espoo:audiences keyword set, you need to remove it and run the add_espoo_audience management command again to add the correct audience keywords. For instance, the ID of the seniorit keyword has changed from espoo:a1 to espoo:a4 so you also need to remove any references to it. You can run the following SQL statements to delete any existing Espoo audience keywords from the database:

    DELETE FROM events_event_keywords WHERE keyword_id ILIKE 'espoo:a%';
    DELETE FROM events_keywordset_keywords WHERE keywordset_id = 'espoo:audiences';
    DELETE FROM events_keywordset WHERE id = 'espoo:audiences';
    DELETE FROM events_keyword WHERE id ILIKE 'espoo:a%';
    
  • The add_espoo_audience management command to use Python 3's f-strings for formatting strings instead of the older format() function since f-strings make the template strings more readable

Fixed

  • Added the missing YSO audience keyword p2433 to the KEYWORDS_TO_ADD_TO_AUDIENCE dictionary in the yso importer. The p2433 keyword corresponds to one of the custom Espoo audience keywords and should therefore be added to the audience list. This fixes the issue where other importers using the KEYWORDS_TO_ADD_TO_AUDIENCE dict didn't add the p2433 keyword to the audience list when encountering the keyword.
  • The English translation of the custom seniorit Espoo audience keyword from senior citizens to elderly which is the correct translation that Espoo uses

1.3.0 - 2020-12-08

Added

  • A new Django management command add_espoo_audience for adding a new keyword set espoo:audiences with Espoo's target audience keywords. The management command also adds a new custom Espoo audience keyword espoo:a1 (seniorit) to all events that have the yso:p2433 (ikääntyneet) YSO keyword. The custom Espoo audience keyword has been added because Espoo wants to use the term seniorit instead of the term ikääntyneet since seniorit is the established term that Espoo is using in Espoo.fi. Instead of renaming the YSO keyword or implementing the mapping directly in the importers, the mapping is now done in this management command in order to better isolate the change and thus minimize changes to existing functionality for keeping the repository compatible with the upstream linkedevents repository. Since the mapping needs to be done to newly imported events, it's recommended to run this management command hourly since some of the importers should also be run hourly.

Changed

  • The yso importer's KEYWORDS_TO_ADD_TO_AUDIENCE list to only include the YSO keywords that the espoo:audiences keyword set contains so that only the audience keywords that are relevant to Espoo are added to an event's audience list in event imports. Note that this doesn't affect just the yso importer since other importers use the KEYWORDS_TO_ADD_TO_AUDIENCE list although it's defined in the yso importer.
  • Replaced the add_helsinki_audience example command in Makefile with the new add_espoo_audience command

1.2.1 - 2020-12-08

Fixed

  • The dependency resolution issue on the CI caused by incompatible versions of the click dependency. Currently, click is locked to version 7.1.2 in requirements-dev.txt but gitlint version 0.12.0 requires version 7.0 of click. However, gitlint version 0.15.0 requires version 7.1.2 of click which is the same as the locked version in requirements-dev.txt. So, upgrading gitlint fixes the dependency resolution error.

1.2.0 - 2020-12-03

Added

  • Versioning for espooevents-service based on Semantic Versioning so that it's easier to understand what type of changes each release contain and to better communicate breaking changes
  • Instructions for versioning and a rationale for why versioning is useful
  • Scripts for validating the version number and pushing the version tag to GitHub
  • CircleCI configuration for automatically pushing the version tag to GitHub when a change has been merged to master
  • A changelog to better document what's changed and why so that future development and maintenance would hopefully be a bit easier
  • Changelog entries to all previous releases to better document the changes and their rationale for future developers
  • Checklist item to the GitHub pull request template for ensuring that the changelog has been updated and the version number incremented for each release

1.1.1 - 2020-11-18

Fixed

  • The lint task in Makefile by adding the missing environment variable which is required by the Docker entrypoint script although it isn't actually required by the lint command
  • The importer tasks in Makefile by adding the missing environment variable for specifying the data source. It's better to set it explicitly since some of the importers use the SYSTEM_DATA_SOURCE_ID setting and if it isn't set, the application uses the default value of system which isn't very descriptive.

1.1.0 - 2020-11-16

This release syncs the latest changes from linkedevents (commits ead9059...76d10d2) to espooevents-service.

Added

  • uWSGI configuration for running the app with uwsgi in a Docker container (City-of-Helsinki/linkedevents#412)
    • NOTE! The changes related to uwsgi have been dropped from Espoo Events since Espoo Events uses gunicorn to run the app. However, the other minor changes in this PR have been kept.
  • audience_min_age_lt, audience_min_age_gt, audience_max_age_lt, and audience_max_age_gt filters to the API (City-of-Helsinki/linkedevents#419)
  • WhiteNoise configuration for letting Django serve its own static files (City-of-Helsinki/linkedevents#413)
    • NOTE! The changes related to WhiteNoise have been dropped from Espoo Events since Espoo Events doesn't use Django to serve any static files. The other minor changes in this PR have been kept.
  • A new funactionnuorille importer for importing courses to Linked Courses from funactionnuorille.fi (City-of-Helsinki/linkedevents#421)
  • starts_after, starts_before, ends_after, and ends_before filters to the API (City-of-Helsinki/linkedevents#422)
  • has_upcoming_events filter for keywords for filtering only such keywords that have upcoming events and a corresponding management command update_has_upcoming_events that should be run hourly to update the has_upcoming_events field for keywords (City-of-Helsinki/linkedevents#423)
  • has_upcoming_events filter for places for filtering only such places that have upcoming events and a corresponding management command update_has_upcoming_events that should be run hourly to update the has_upcoming_events field for places (City-of-Helsinki/linkedevents#424)
  • free_text filter for similarity based search of keywords (City-of-Helsinki/linkedevents#425)
  • combined_text filter to search for event content and keywords (City-of-Helsinki/linkedevents#426)
  • Support for the combined_text filter for searching for events that must contain multiple search terms by using a comma to separate the search terms (City-of-Helsinki/linkedevents#428)
  • Settings to data sources in the Django admin site for specifying whether the creation and editing of past events is allowed (City-of-Helsinki/linkedevents#233)
  • Support for creating, updating, and removing keywords and places using the API (City-of-Helsinki/linkedevents#236)
  • Support for creating registration links in the harrastushaku course importer for Linked Courses (City-of-Helsinki/linkedevents#430)
  • A new importer for Mikkeli Nyt events (City-of-Helsinki/linkedevents#431)
  • Instructions for syncing the Espoo Events repository with Helsinki's Linked Events repository
  • Example command to Makefile for running the update_has_upcoming_events management command locally

Changed

Deprecated

  • The audience_min_age and audience_max_age filters in the API which should be replaced with the new _lt and _gt filters introduced above (City-of-Helsinki/linkedevents#419)

Fixed

  • The app from crashing in the local development environment by using the django.core.mail.backends.console.EmailBackend email backend when Mailgun hasn't been configured (City-of-Helsinki/linkedevents#411)
  • The base importer to prevent overwriting user edited fields with older data from importer (City-of-Helsinki/linkedevents@9d177ce)
  • The base importer to prevent importers from changing images in user edited events (City-of-Helsinki/linkedevents@ed45a96)
  • The lippupiste importer to not empty the super event name when encountering user edited names (City-of-Helsinki/linkedevents@9120176)
  • The PostgreSQL volume path in the Docker Compose configuration (City-of-Helsinki/linkedevents#416)
  • A flake8 issue in helevents/tests/conftest.py (City-of-Helsinki/linkedevents@6c8351e)
  • The external link creation in the base importer (City-of-Helsinki/linkedevents#429)
  • The Docker image build error by installing build-essential which is needed because python-Levenshtein seems to require gcc
  • The app not starting by changing the database initialization script to install the pg_trgm extension which is required by one of the Linked Events changes. The pg_trgm extension can't be installed using an application database migration since we haven't granted the migration user rights to create extensions.
    • NOTE! Since the init script is only run once when setting up the database, we need to install the extension manually for any databases that have already been initialized
  • A flake8 trailing whitespace issue in linkedevents/settings.py

1.0.0 - 2020-05-13

This marks the 1.0.0 release which defines the public API of espooevents-service. This also means that the public API should be stable and the way in which the version is incremented after this release is dependent upon how the public API changes.

This release syncs the latest changes from linkedevents (commits 5c7b4cd...ead9059) to espooevents-service.

Changed

0.20.0 - 2020-05-05

Added

  • The remote participation keyword, i.e., "Etäosallistuminen" to the helsinki:topics keyword set since this keyword is automatically added to an event when the event location is set to Internet in espooevents-frontend

0.19.0 - 2020-04-20

This release syncs the latest changes from linkedevents (commits 3e3d9a9...5c7b4cd) to espooevents-service.

Added

Changed

Fixed

Security

0.18.0 - 2020-04-07

Changed

  • BREAKING: The Git hook installation script to create symlinks to the Git hook files instead of copying them. This way, the hook files don't have to be copied again if any of the hook files change. For this to take effect, it requires that the currently installed Git hooks are removed from the .git/hooks directory and that the Git hook installation script is rerun.

Fixed

  • The issue with truffleHog's --since_commit option (see trufflesecurity/trufflehog#108) by instead searching for secrets only in the current feature branch's commits by using the --branch and --max_depth options

0.17.0 - 2020-03-30

Added

  • Example commands to Makefile for running the update_n_events management command for keywords and places locally

0.16.0 - 2020-03-27

Added

  • Example commands to Makefile for building the development Docker image and for running tests locally

Changed

  • The layer order in the distribution Docker image for better cache reuse. For instance, the build and commit args passed to the Docker image change frequently causing the Docker layer cache to be invalidated and all later layers to be rebuilt. Thus, it's better to move the build and commit args as down as possible in the Dockerfile. By optimizing cache reuse by better layer ordering, we can, e.g., speed up the CI workflows and save storage space.
  • Removed all files that aren't copied to the distribution Docker image from the .dockerignore whitelist since these files are unnecessary
  • Refactored the development Docker image so that it can be used for running linting and tests on the CI instead of using the CircleCI Python image. This way we can utilize CircleCI's Docker Layer Caching feature and speed up the CI workflows.
  • The lint example command in Makefile to work with the development Docker image
  • The CircleCI configuration and scripts to run tests on CircleCI with the development Docker image. This way we can speed up the workflow by using CircleCI's Docker Layer Caching feature.
  • The distribution Docker image to define the Docker labels only once since CircleCI's Docker daemon doesn't support BuildKit whereby there's no way to skip stages in multi-stage builds. Therefore, when building the admin image, it also builds the dist image. This in turn caused the label statements to be run twice.

0.15.1 - 2020-03-27

Fixed

  • Two tests that failed due to datetime calculations that differ from the actual implementation. The calculations in the tests don't take daylight saving time correctly into account. This fixes the issue by calculating the expected end_time in the tests in the same way as the implementation calculates the automatic end_time.

0.15.0 - 2020-03-27

This release syncs the latest changes from linkedevents (commits ef70f3f...3e3d9a9) to espooevents-service.

Added

Changed

Fixed

Security

0.14.1 - 2020-03-26

Fixed

  • The CircleCI Jira orb rate limit issues with downloading jq by caching jq so that it doesn't have to be downloaded again in each CircleCI job

0.14.0 - 2020-03-19

Changed

  • Upgraded the builder-aws Docker image used by CircleCI to the latest version which has Terraform 0.12.23 installed. This needs to be done in order for the deployments to continue working since espooevents-infra was upgraded to use Terraform 0.12 and the deployments would fail if trying to run them with Terraform 0.11.

0.13.1 - 2020-03-12

Fixed

  • The app throwing an exception when the Mailgun settings haven't been configured by accepting a new environment variable ENABLE_NOTIFICATIONS which is used to define whether the notification feature is enabled or not. This way, if Mailgun and the email settings haven't been configured, the notification feature can be disabled thus preventing the app from crashing when trying to send notifications.

0.13.0 - 2020-03-11

This release syncs the latest changes from linkedevents (commits 907bbda...ef70f3f) to espooevents-service.

Added

Changed

Fixed

Security

0.12.1 - 2020-03-11

Fixed

  • The issue with the espooevents-service admin site not working correctly when multiple instances are deployed. The issue was caused by linkedevents/settings.py not reading the SECRET_KEY environment variable causing the app to always generate a file-based secret key. This, in turn, caused each deployed instance to have different local secret keys whereby they couldn't access each others sessions since they used different secrets. Because of this an admin user randomly appeared to be logged out from the admin site depending on which instance received the request. This was fixed by making linkedevents/settings.py read the SECRET_KEY environment variable so that each instance uses the same secret for the admin site sessions.

0.12.0 - 2020-03-10

Added

  • Support for running espooevents-service behind a proxy so that the hostnames, e.g., in the links in the browsable API are shown correctly. This is achieved by accepting the following environment variables which control the behaviour of the app when running it behind a proxy:

    • SECURE_PROXY_SSL_HEADER which should be set to ('HTTP_X_FORWARDED_PROTO', 'https') when running the app behind a proxy which terminates the TLS connection
    • USE_X_FORWARDED_HOST which should be set to True when running the app behind a proxy
  • A custom Django middleware to replace the X-Forwarded-{Port|Proto} header values based on the values specified in the headers defined by the following environment variables:

    • CUSTOM_X_FORWARDED_PORT_HEADER for specifying the custom header which should be used to override the X-FORWARDED-PORT header value
    • CUSTOM_X_FORWARDED_PROTO_HEADER for specifying the custom header which should be used to override the X-FORWARDED-PROTO header value

    The middleware has been added to circumvent the issue with AWS load balancers overwriting the X-Forwarded-{Port|Proto} headers whereby setting them in a reverse proxy has no effect if the reverse proxy routes requests to the app via a load balancer. For more information, see the AWS documentation.

0.11.0 - 2020-03-06

Added

  • django-redis for configuring Redis for session storage in order to make espooevents-service stateless which enables the deployment of multiple espooevents-service instances for better fault tolerance. The Docker images now accept the following environment variables for configuring the session cache:
    • CACHE_HOST for configuring the Redis host
    • CACHE_PASSWORD for configuring the Redis password
  • Docker Compose configuration for setting up a local Redis instance for local development
  • Configuration for tests for using an in-memory cache for storing sessions in order to simplify the configuration needed for running tests

Changed

  • BREAKING: Prefixed the database environment variables accepted by the different Docker entrypoint scripts with DB_ so that it's easier to distinguish the DB environment variables from the Redis environment variables

0.10.0 - 2020-03-02

Added

Changed

0.9.0 - 2020-03-02

Added

  • django-storages and boto3 and configured them for storing static files in AWS S3 and changed entrypoint.dist.sh to run collectstatic for copying static files to the location specified by settings.STATIC_ROOT. The app now also accepts the following environment variables for configuring static file storage:
  • Example commands to Makefile for importing Helsinki's audience and topic keywords and for creating a Django superuser
  • A CircleCI build job for automatically installing the city-specific Linked Events templates for the browsable API as part of the CircleCI workflow
  • CircleCI configuration for checking if a deployment succeeded and reverting to the previous deployment on failure. This makes deployments more robust by automating rollbacks on failure.
  • Docker Layer Caching for the test and dockerize jobs on CircleCI to speed up Docker builds

Changed

  • Renamed entrypoint.importer.sh to entrypoint.admin.sh and also renamed importer to admin in other places using the importer Docker image since the importer Docker image is used also for other administrative tasks besides importing
  • Refactored the CircleCI configuration to split the distribution and importer dockerizations to their own jobs for being able to run the jobs in parallel and thus speeding up the CircleCI workflow
  • The CircleCI configuration to only target the espooevents-service ECS module on deployments with terraform apply since we don't want deployments to fail because of errors in the other ECS modules

0.8.0 - 2020-02-27

Added

  • A new multi-stage build stage to Dockerfile.dist for creating a separate Docker image for running the importers using AWS Batch jobs and a corresponding entrypoint.importer.sh entrypoint script for setting up the required environment variables and fetching the DB credentials from AWS SSM Parameter Store
  • New build steps to the CircleCI dockerize job for building and uploading the importer Docker image to AWS ECR
  • Example commands to Makefile for building the importer Docker image and for running some of the importers and management commands locally

Changed

  • The EditorConfig configuration to use tabs for Makefiles since Makefiles don't support spaces
  • The EditorConfig configuration to use 4 spaces for Python files since that's an established convention and adheres to the official pep8 code style guide for Python code
  • The shell scripts to use an indentation of 2 spaces instead of 4 spaces
  • Refactored the CircleCI configuration to use CircleCI's own structures for code reuse instead of using YAML aliases and anchors
  • Refactored how the variables are passed to the dockerize job in the CircleCI configuration

Fixed

  • Added the missing flake8 command to the lint task in the Makefile

0.7.0 - 2020-02-15

Added

  • CircleCI configuration for deploying to the dev, test, staging, and prod environments
  • An entrypoint.dist.sh entrypoint script for the distribution Docker image to:
    • Inspect the Django project for common problems
    • Run DB migrations
    • Sync translation fields
    • Provide the required environment variables, such as DB configs, to run the app
    • Run the app with Gunicorn

Changed

  • Replaced the current database initialization scripts with more thorough database initialization scripts that are compatible with AWS RDS and also create the necessary users, roles, privileges, and databases in addition to installing the necessary DB extensions. In addition to the master DB user, two additional DB users are now created:

    • A DB migration user with less privileges than the master DB user but with enough privileges to run DB migrations
    • A DB application user with less privileges than the migration DB user but with enough privileges to be able to perform the DB operations needed to run the application

    It's also good to be aware that the PostgreSQL public schema has some security concerns. Thus, the database initialization script now also revokes all privileges from the public schema.

  • The CircleCI and Docker Compose configuration files and scripts to provide the necessary DB configs, such as users and passwords, in order to initialize the database successfully

  • The docker/django/docker-entrypoint.sh script to check for required DB environment variables and provide them to the Django management commands

  • The default DB master user credentials used in local development and when running tests

  • Moved all scripts to the bin directory in order to clean up the project root

  • Refactored code to remove as many references to espooevents-service as possible in order to keep the code general and compatible with the upstream linkedevents repository

  • The distribution Docker image to use the official Python Docker image as the base image instead of the Voltti Ubuntu image in order to minimize dependencies to Voltti and to benefit from security updates to the official image. Also, made some changes to set up the timezones, locales, and a non-root user based on common Voltti practices.

  • The example commands in the Makefile to provide the required arguments and environment variables for using the official Python image and for running the app using Docker

  • Refactored the CircleCI configuration to use YAML aliases for CircleCI contexts

0.6.0 - 2020-01-30

Added

  • Instructions for manually generating JSON Web Tokens (JWT) in order to more easily test JWT authentication and the API if needed. This also documents the JWT structure expected by espooevents-service.

0.5.0 - 2020-01-28

Added

  • CircleCI configuration and scripts for linting and testing the code and for building and uploading the distribution Docker image to AWS ECR
  • CircleCI Slack orb to be able to notify of failed builds to Slack
  • CircleCI Jira orb for updating the CircleCI build status to Jira
  • A separate settings file to be used when running tests. For now, the settings file only contains the test database URL.
  • Git hooks for running the following tools:
    • flake8 for linting Python files and ensuring that a common coding style is used
    • circleci CLI tool for validating the CircleCI config
    • yamllint for linting the CircleCI config and other YAML files
    • truffleHog for preventing non-AWS credentials from being committed to the repo thus complementing git-secrets
  • The lint example command to the Makefile for being able to easily run the flake8 linter

Removed

  • The Helsinki-specific Travis configuration file since Espoo Events uses CircleCI for continuous integration and delivery

Fixed

  • flake8 lint errors in linkedevents/prod.py by ignoring the errors since these errors aren't relevant when extending Django settings
  • yamllint lint errors and warnings in the YAML files

0.4.0 - 2020-01-22

Added

  • Gunicorn to the production dependencies so that we can use it to run the Django app in production inside a Docker container
  • A separate placeholder settings file for the production environment
  • Docker configuration for distributing and running the app in the other non-local environments, e.g., production
  • A Makefile as a cheatsheet with examples for running and debugging different commands, e.g., Docker commands locally

Changed

  • The Django configs to not install the django_extensions app in production so that we don't need to install development dependencies in production

0.3.0 - 2020-01-20

Added

  • EditorConfig file for making sure that developers use consistent IDE settings
  • Scripts to manage and install Git hooks for running the following tools:
  • A health endpoint that can be used by load balancer health checks to see whether espooevents-service is running or not

Changed

  • Updated some of the instructions related to setting up the local development environment, e.g., installing the Git hooks

0.2.0 - 2020-01-16

Added

  • GitHub pull request template with a definition of done checklist for ensuring that the necessary steps have been done before merging and releasing the change
  • GitHub code owners file for specifying the owners of the repository

0.1.0 - 2020-01-10

Added

  • A fork of the linkedevents repository starting from commit City-of-Helsinki/linkedevents@907bbda. The repository was forked so that we can apply the necessary changes to get linkedevents to run in the City of Espoo's Voltti environment according to Voltti's conventions. The purpose is to keep espooevents-service as close as possible to the original linkedevents so that it's compatible with the upstream which in turn makes it possible to cooperate and share changes between the repositories. Thus, any Espoo Events specific code should be avoided or kept to a minimum. This version marks the initial 0.1.0 relase and the initial linkedevents commit on which espooevents-service is based on.