mysqladmin ping and mariadb-admin ping can return healthy during their
initialization stage as by default these connect over unix socket.
Add --protocol=tcp to mysqladmin to report healthy when a TCP
connection occurs. The initial startup uses --skip-networking.
MariaDB has a built-in healthcheck.sh in its container:
https://mariadb.com/kb/en/using-healthcheck-sh-script/
and update the docstring of the revision query to reflect the actual
behaviour. The query does:
- a filter on TaskState to get the ones that are associated with the
current workflow state, then gets the IDs of the revisions associated
with those task states, and
- use it as a subquery to get the revisions with those IDs
TaskState objects are only created when a task's state changes – this
means we don't create new TaskState objects when you save the
page/snippet without performing a workflow action.
This means the query will only result in revisions that were made as
part of a workflow action, not just any edits.
If the method was used with a base Page instance, it wouldn't return any
revisions because we would be filtering on the content_type FK using the
current model (the base Page model) instead of the specific model.
Filter on base_content_type and make use of
RevisionMixin.get_base_content_type() instead, which will
resolve to the base Page model (and the correct the most basic
non-abstract model for non-Page models with MTI).
Use the old logic if the instance's model does not use RevisionMixin for
some reason.
This logic is similar to WorkflowStateQuerySet.for_instance() and
TaskQuerySet.for_instance().
MySQL 8.1 has been EOL since 2023-10-25. Use the next LTS 8.4
(2032-04-30). Add MYSQL_ROOT_PASSWORD to ensure the root password
is set.
Also use email user model and disable timezone on the 8.4 strategy to
ensure we test these configurations with MySQL as well.
000d417ec9 (in #12236) skips the check that `self.model` is non-null in `is_searchable`. This means that it is no longer possible to define IndexView subclasses without a model property, which was previously valid - for example this one from wagtail-review:
ce2f6d814b/wagtail_review/views/admin.py (L98-L104)
We don't really need its __iter__ implementation, but Django added a
check in
e4a2e22ddb
that requires ModelIterable to be used when using in_bulk() with
values() or values_list().
This template is useful for other page listings where we may also want
to enable bulk actions, e.g. the search view – and later, the workflows
usage view, as well as the page type usage view.
This is a separate commit just so git knows we're just renaming. We'll
reinstate the pages/index.html as a no-op extension of this
pages/listing.html template.
Now that the listing_results.html template supports rendering the "There
are x matches" message, we can enforce the consistency between the view
class and the template. Previously there were BaseListingView subclasses
(that are not IndexView subclasses) that used the index_results.html
template just to get that message when filtering.
- Use a single class with index_url_name, index_results_url_name,
template_name, and results_template_name
- Extend generic/listing.html and generic/listing_results.html templates
- Set page_title and header_icon to show breadcrumbs properly
- Set is_searchable = True and keep using the custom search and
filtering logic with the full get_queryset override to prevent scope
creep for now