Letsrevel/revel-backend releases

New releases of letsrevel/revel-backend are posted here automatically.

Join @releases-revel to get a DM and a bell for every release.

letsrevel/revel-backend v3.1.2

Fixed

  • Series passes: the activation of a pass (offline confirm or completed checkout) no longer issues a new ticket for an event whose pass ticket was cancelled meanwhile. A checkout of a pass that the organizer hides or deactivates at the same moment now answers 404.
  • Events: the attendee count and the attendee visibility of an event are now updated also when a logo or cover image file of the event is missing from storage. Before, the update failed for such an event. A status change now also ignores invalid values in fields that it does not change; a cross-field rule that an earlier edit broke (for example a waitlist cutoff after the start) still blocks it, and the error names the field to fix.
  • Events: the attendee count and the attendee visibility of an event are now rebuilt also when the background job could not be queued after a series pass issued tickets. A sweep every 15 minutes finds an event whose count is stale, for tickets written in the last 24 hours, and queues its rebuild again on each run until the count is correct. It cannot find a lost rebuild whose changes leave the count unchanged.
  • Deleting an event, a ticket tier or an event series (in the API and in the Django admin), or an organization (in the Django admin), no longer fails when a series pass issues a ticket for that event at the same moment. A checkout that starts at the same moment as the delete now also gets its open Stripe Checkout session expired.

What’s Changed

Full Changelog: Comparing v3.1.1...v3.1.2 · letsrevel/revel-backend · GitHub

letsrevel/revel-backend v3.2.0

Added

  • Storage: a daily task counts the stored image files (logos, cover images, profile pictures, OAuth application logos and their derived images) that no row uses and that are older than 7 days.
    • It starts as a dry run that only counts.
    • An admin can turn on its deletes in the beat task settings, with no deploy.

Changed

  • API: OpenAPI operationIds no longer end in a random 8-character suffix, so they are the same in every schema dump (for example auth_obtain_token). A generated client gets stable type names after one regeneration.
  • Uploads: a new logo, cover image, profile picture or OAuth application logo is now stored under a random file name, not the name of the uploaded file. Files that are already stored keep their names.

Fixed

  • Image uploads (profile pictures, organization, event and series logos and cover images, OAuth application logos): the messages for an image that is too large (“Image must be under …MB.”, “… megapixels.”) and for a file that is not an image are now translated.
    • An uploaded file whose content is not an image now gets “File is not a valid image.” from the field check itself. A file that is already in storage is not read again.
  • Series passes: a pass holder who was on the waitlist of a covered event now leaves that waitlist when the pass gives a ticket for the event (free and offline passes, the offline confirmation, and tickets for events added to the pass later). An open waitlist offer of the holder for that event is withdrawn, so the spot goes to the next person. Before, the holder stayed on the waitlist and could get offers for a spot.
  • Django admin: the “delete selected” action on organizations now removes the stored image files of the organizations and of their events and series (logos, cover art and their derived images) that no other row uses.
  • OAuth applications: deleting an application (in the app settings, through client registration management, or in the Django admin, also with “delete selected”) now removes its stored logo files that no other application uses.
  • Series passes: a checkout of a pass that moves to another event series or organization at the same moment now answers 409 (“The events of this pass changed. Please try again.”). The buyer can then try again with the pass as it is now.
  • Admin: deleting a ticket in the Django admin now gives its place back to the ticket tier, and the admin refuses to delete a failed payment whose Stripe Checkout session is still open.
  • Django admin: the membership admins can no longer change billing data past the subscription service. An existing subscription is view-only, and the add view is refused. A history revert is refused on the subscription, plan, payment and customer-profile pages; the history stays viewable. Subscriptions and payments cannot be deleted from their own admin pages, while deleting a user still works.
  • Accounts: the set-password email that follows the email verification of a contested account now carries the return hint of the white-label organization site where the person signed up, as the other account emails do. The link stays on the platform, and the hint is added only while that organization site is still active.

What’s Changed

Full Changelog: Comparing v3.1.2...v3.2.0 · letsrevel/revel-backend · GitHub

letsrevel/revel-backend v3.2.1

Fixed

  • A save of a partly loaded record now writes only the fields that were loaded or set, as Django intends.
    • Before, it wrote every column, so it could undo a change that another request had saved to a column that was not loaded.

What’s Changed

Full Changelog: Comparing v3.2.0...v3.2.1 · letsrevel/revel-backend · GitHub

letsrevel/revel-backend v3.3.0

Deployment notes

  • Deploy order from production v3.1.0: do not deploy this release in one jump.
    1. Deploy the 3.2.0 image tag first, and let it run for about one day. If the v3.1.0 Stripe webhook step is not done yet, do it before this deploy. Use the 3.2.0 checks: showmigrations lists accounts 0042, common 0027, events 0158 and oauth 0003; the three new beat rows exist; the image sweep has dry_run: true.
    2. Then deploy 3.3.0 directly. 3.2.1 needs no separate step.
  • This release has one migration, events 0159. It changes only on_delete and emits no SQL.
  • After the deploy, check that:
    • manage.py showmigrations events lists 0159 as applied.
    • The Celery worker lists the new task events.link_blacklist_entries_for_user.
    • The web and Celery logs show no “unregistered task” errors. During the rollout, an old worker drops this task; the ban still applies, because every check matches the entry identifiers.
  • In the first hour, look for these events in Loki: blacklist_entries_linked, blacklist_link_task_not_queued, blacklist_link_after_verification_failed. A blacklist create answers 201 or 400, and no longer 500.
  • A rollback to 3.2.0 needs no reverse migration.

Changed

  • Django admin: the parent of a product is now fixed after creation, so that an open checkout cannot pay or issue tickets against a new parent.
    • The series of a series pass, the organization of an event series and the event of a ticket tier are read-only on the change page.
  • Django admin: the event series admin shows more about the visibility of each series.
    • The series list shows the organization visibility (also as a filter) and the number of events, with a link to them.
    • The series page shows its effective public visibility and the reason for it.

Fixed

  • Series passes: an event that a series pass covers can no longer become private or members-only, or move to another series or out of its series.
    • The API answers 400 on event_type or event_series, and the Django admin shows the error on that field.
    • An event that already broke this rule before the check can still be saved for other edits.
  • Ticket tiers: a tier that a series pass covers can no longer get a stricter purchase rule (a stricter “purchasable by” value, or a first membership-tier restriction) than the pass. The change answers 400; change the pass or unlink the tier first.
  • Event series: a series page (by id, or by organization and series slug) now opens when the visitor can see at least one event of the series, also when the organization is private.
    • Before, a public event of a private organization linked to a series page that answered 404.
    • The visitor can follow such a series.
    • The series list and search, the series passes and the series resources still follow the organization rule, so they show nothing of a private organization.
  • RSVPs, invitations, notification preferences and event-cancellation refunds: a failure to queue the attendee count update no longer turns a saved change into an error response, and no longer stops the steps after it (for example the staff notification of an RSVP). For an RSVP save or a ticket write that stamps its update time, a sweep every 15 minutes then corrects the count; after an RSVP delete, a lost update stays until the next rebuild of that event. An RSVP change also queues the update once, not twice.
  • Blacklist: an entry stays in place when its linked account is deleted or erased.
    • The entry is no longer linked to the account.
    • It keeps its email, phone number, Telegram username and reason.
    • It loses its name fields.
    • It also keeps the email that the account had at the time of deletion.
    • It keeps the account’s phone number and Telegram username only when the account is a known holder of the organization.
    • A value that the entry does not hold yet goes on it when the field is empty.
    • Otherwise the value goes on one new entry of the organization, unless another unlinked entry already holds it.
    • An identifier that another unlinked entry of the organization already holds stays on that entry.
    • The other identifiers move to that entry when it has no value for them.
    • The entry is deleted only when no identifier is left.
    • A new account that matches a kept entry is blacklisted at once.
    • Each organization links one matching entry to the new account, the oldest one. A match by email counts only when the email is verified, at registration or later.
    • A save of a blacklist entry in the Django admin now waits for the organization lock.
  • Blacklist: a manual entry with the phone number or the Telegram handle of an existing entry now answers 400 with a clear message. Before, it answered 500. When the account already has an entry, or the linked entry of another (erased) account holds its email, quick mode and manual mode now refuse with “This user is already blacklisted.”. When an unlinked entry holds the account’s verified email, that entry is linked to the account and no second entry is created. A phone number or Telegram handle typed in manual mode is added to that entry. The response of a linked entry now shows its real creator.
  • Blacklist: a registration or a Telegram connect no longer fails when two entries of one organization match the person, or when the account already has a linked entry there. Each organization links at most one entry to the account, and the ban applies in every matched organization, also when the only match is the entry of an erased account. Verifying an email, converting a guest account or changing to a new verified email now also links the matching entries. A registration links an entry by email only when the email is verified and the account is not a guest.
  • Blacklist: an entry that matches several accounts of the organization now applies the consequences to each one. For example, an entry that links one account by its email and also holds the phone number of a staff member now removes that staff member too. The owner is never affected.

What’s Changed

Full Changelog: Comparing v3.2.1...v3.3.0 · letsrevel/revel-backend · GitHub

letsrevel/revel-backend v3.3.1

Deployment notes

  • Production runs 3.2.0, pinned with REVEL_TAG=3.2.0. The pin stays until a deploy names a new tag, so deploy with ./deploy.sh 3.3.1. A deploy from 3.2.0 directly to 3.3.1 is safe, and 3.3.0 needs no separate step.
  • Migrations: only events 0159 (from 3.3.0). It changes only on_delete and emits no SQL. This release adds no migration.
  • Celery: this release adds no task and no beat row. 3.3.0 added the task events.link_blacklist_entries_for_user. During the rollout, an old 3.2.0 worker can reject this task. The ban still applies, because every check matches the entry identifiers.
  • After the deploy, check that:
    • /api/version answers 3.3.1.
    • manage.py check_orphaned_beat_tasks shows no orphaned beat rows.
    • The web and Celery logs show no “unregistered task” errors.
    • Loki shows blacklist_entries_linked after an email verification.
    • The logs show no raw email addresses.
  • Staff: some Django admin fields are now read-only, and a save is refused when the row changed after the page opened. Tell staff to reload the admin pages that they opened before the deploy.
  • API: the changes are additive only (4 series pass link fields, has_membership_plans, and the 400/422 answers for series passes). Frontend 2.41.0 and 2.42.0 work with this release. The frontend release that contains frontend #1347 must deploy after backend 3.3.x.
  • A database deadlock now answers 409 concurrent_change. Before, it answered 500.
  • Rollback: ./deploy.sh 3.2.0. No database step is necessary.

Added

  • Organization admin API: the organization details now include has_membership_plans (true when the organization has an active membership plan).
  • Series pass admin API: each coverage row of a pass now includes the covered event’s event_type, event_visibility and event_status, and the linked tier’s tier_purchasable_by. The admin UI uses these fields to warn about coverage that buyers cannot use.

Changed

  • Django admin: the use count of event and organization tokens is read-only. A save of a token page writes only the fields of the form, so claims made while the page is open are kept, and a save over a value that changed after the page opened is refused. To re-open a used-up token, staff raise its maximum uses.
  • Django admin: the organization of an event and the series pass of a held pass are fixed after creation, so that an open checkout cannot pay against a new parent.
  • Django admin: the admin can no longer change ticket or series pass capacity behind the services.
    • Tickets and held series passes cannot be added in the admin. Their status and tier (or pass) are read-only.
    • The holder of a held series pass is read-only, and its own delete page is refused. A user delete still removes it.
    • The sold count of a ticket tier and of a series pass is read-only, so a save no longer writes back the count shown when the page opened.
    • A save of a ticket, ticket tier, series pass, held series pass, discount code or announcement writes only the fields of the form. A sold count, ticket status, check-in, code use count or send status that a service writes during the save is kept. The cancellation reason of a ticket is read-only.
    • On these admin pages, a save is refused when a value on the page changed in the database after the page opened. The staff user reloads the page and makes the change again.
    • Before, an admin add, status edit or held pass delete left the sold count wrong, so a tier or pass could oversell or lose places.
  • Django admin: membership payments and customer profiles are protected like membership subscriptions.
    • Membership payments cannot be added in the admin, and an existing payment is view-only.
    • Customer profiles cannot be added in the admin. The user and organization of an existing profile are read-only, and its own delete page is refused. A user or organization delete still removes the profile.
  • Series passes: a pass holder no longer gets a ticket for a covered event that is in draft. Before, only a cancelled event gave no ticket.
    • This applies when a pass is extended to a new event, when a pending pass is activated, and in the sweep that issues missed tickets.
    • The sweep issues the ticket when the event is open or closed again. An event that is un-cancelled to draft gives no ticket until then.
    • A closed covered event still gives its holders a ticket.

Fixed

  • Calendar: a request for week 53 in a year that has only 52 ISO weeks now answers 422. Before, it returned the first week of the next year (#1556).
  • Series passes: two changes at the same moment can no longer together break the coverage rule of a series pass. The second change waits for the first, and is then checked against the committed state. It is refused only when it breaks the rule.
    • This applies to a new link through the API, and to a change of the event, the tier, or the pass rule or currency.
    • It also applies to a stricter tier rule and a looser pass rule on the same link.
  • API: a request that the database stops because of a deadlock now answers 409 with the code concurrent_change, not 500. Nothing of the request is saved, so the client can send it again.
  • Django admin: a series pass link that is added or changed in the admin now follows the same coverage rules as the API. The event must be public, open and ticketed, and its series must not repeat.
    • The admin shows the error on the event field. An existing link stays saveable for other edits.
    • A link saved in the admin and a change of its event, tier or pass at the same moment no longer both pass. The second one waits, and is then checked against the committed state. It is refused only when it breaks the rule.
  • Series passes: an event that a series pass covers must keep requiring a ticket. A change to RSVP-only is refused while a pass covers the event.
  • Ticket tiers and series passes: an ONLINE price below 1 is refused.
    • A tier edit that sends the unchanged ONLINE method no longer fails when the organization has no Stripe. The Stripe check runs only when the method changes or the edit resumes sales.
    • A tier edit can no longer set an ONLINE price below 1.
    • A series pass refuses ONLINE with a price below 1, when it is created or when its price or method changes.
    • A pro-rata quote of an ONLINE pass that falls below 1 is raised to 1. A quote of 0 stays free.
    • Existing rows below 1 stay editable for other fields. An ONLINE tier below 1 cannot resume sales until its price is 1 or more.
  • A forced full delete of an erased account (a superuser admin action) gives back the places of the tickets and series passes that it deletes. A tier or series pass no longer stays too full.

Security

  • Log calls no longer pass email addresses, Telegram usernames, email or Telegram ban values, or ban reasons. They name an account by its Revel id. Two operational values stay: the Telegram bot logs the numeric Telegram id, and a processed domain ban logs the normalized banned domain.
    • A log processor also masks email-shaped text that a log line still carries, in any field, in a nested value, and in an exception text, also when the “@” is URL-encoded.
    • Known limits of that safety net: a rarer character in the local part, encoded dots, dotless domains and full-width at signs (#1632).
  • The result of the task that deletes old unverified accounts no longer stores their email addresses.
  • The result of the domain-ban task stores the ban id, not the banned domain.

What’s Changed

New Contributors

Full Changelog: Comparing v3.3.0...v3.3.1 · letsrevel/revel-backend · GitHub