Skip to content

Releases: mozilla-it/ctms-api

v0.7.2 - Filter updates by MoFo relevancy

12 May 23:46
v0.7.2
e45a267
Compare
Choose a tag to compare

This release adds further improvements for the soft launch:

  • Allow filtering /updates by relevancy to the Mozilla Foundation.
  • Speed up calls to GET /ctms by sfdc_id and other non-unique alternate identifiers

API Changes

  • The /ctms lookup endpoint was very slow for non-unique identifiers, such as sfdc_id and amo_user_id. Database indexes has been added that makes these as fast as the unique identifiers like primary_email.
  • The /updates endpoint accepts an optional parameter mofo_relevant. When set to a truthy value (such as 1 or true), then only contact with mofo.mofo_relevant=true will be returned. When set to a falsey value (such as 0 or f), only contacts with mofo.mofo_relevant=false will be returned, which includes records with no related MoFo data. If the parameter is omitted, all records in the relative timespan are returned.

Other Changes

  • Database indexes are added via migration for the non-unique identifiers email.sfdc_id, fxa.primary_email, amo.user_id, and mofo.mofo_contact_id.

v0.7.1 - Fix database sessions

28 Apr 23:35
v0.7.1
67961fe
Compare
Choose a tag to compare

This release should address an issue where sessions were closed by one request and reused by other requests.

Bug Fixes

  • Sessions are created per request and not shared with a thread via scoped_session

v0.7.0 - Soft launch

28 Apr 19:14
v0.7.0
73f3da9
Compare
Choose a tag to compare

This version supports the soft launch of CTMS:

  • Existing contacts from Salesforce have been imported into CTMS via BigQuery
  • Basket will query CTMS to see if there is an existing record, and read just the email_id
  • Basket will create new contacts in CTMS at the same time as SFDC, with CTMS picking the email_id
  • Basket will update contacts in CTMS when SFDC has an email_id/

API Changes

  • Emails (email.primary_email and fxa.fxa_primary_email) are no longer validated as emails, to allow legacy email addresses
  • The /update endpoint accepts blank values for end_date, limit, and after
  • The /update response JSON includes the after value
  • Update timestamps such as amo.update_timestamp are now updated. When group data changes, email.update_timestamp is also updated.

Deployment changes

  • Logs are formatted in the MozLog JSON format
  • Sentry captures and logs exceptions
  • gunicorn, with multiple workers, is used to serve the CTMS app
  • 3 migrations, to modify timestamp fields, to add an index, and to add then remove an index

Importer changes

  • Allowed import without obfuscating user data
  • Many fixes and changes to importing CSVs
  • Directly import from BigQuery
  • Handle missing and duplicate identifiers by populating or dropping data

Other changes

  • Added indexes to improve the performance of /update
  • Removed the PR template
  • Expanded linting to tests