Repository navigation
major upgrade - #215
Merged
Merged
major upgrade#215
Conversation
Both catalog and citation now resolve dependencies via pyproject.toml + uv.lock (Django~=5.2.17, Python 3.12 baseline). requirements.txt is kept as an intentionally-empty tombstone since some tooling still probes for its presence, but no longer feeds the build. Bumps the citation submodule to its 1.0.0 release commit. Also ignores build-generated *.egg-info/ directories.
… to Gunicorn
- deploy/images/django.Dockerfile: Python 3.12-slim base, uv-locked
dependency install (uv sync --locked), Gunicorn as the production WSGI
runtime.
- deploy/docker/{dev,prod,test}.sh: sync dev dependency group on
container start, launch Gunicorn instead of uWSGI.
- nginx configs and deploy/uwsgi/catalog.ini: proxy to the Gunicorn unix
socket over plain HTTP instead of the uwsgi protocol; retired
uwsgi_params/catalog.ini are kept only as documented tombstones until
staging.yml's config sources are updated.
- tasks.py: add check_migrations/migrate invoke tasks, turn
reload_uwsgi into a documented no-op.
- CI: build via ./compose/./build.sh, add a makemigrations --check gate
before running tests.
- catalog/core/urls.py: django.conf.urls.url() -> path()/re_path() (removed in Django 4+). - catalog/core/views.py: is_safe_url -> url_has_allowed_host_and_scheme, ugettext_lazy -> gettext_lazy (both removed in Django 4+); drop the elasticsearch_dsl 7.x-only include_meta/skip_empty kwargs from Hit.to_dict() for the ES8 client. - catalog/core/tests/test_views.py: assertEquals -> assertEqual (removed from unittest in Python 3.12).
…g, raven with sentry-sdk - django-cas-client is abandoned and incompatible with Django 5.2; switch to django-cas-ng (settings, urls.py, middleware/backends, CAS_* settings mapped to their django-cas-ng equivalents). - raven (legacy Sentry client) is abandoned; switch to sentry_sdk.init(), initialized at settings import when SENTRY_DSN is configured. Existing RAVEN_PRIVATE_DSN/RAVEN_PUBLIC_DSN secret keys are read as-is so no deployment secret changes are required. - Expose sentry_public_dsn/release_version to templates via a new context processor, replacing the old raven.js browser include across base/login/index/network-graph templates. - Also updates the settings docstring's Django doc links to 5.2, the DB engine alias (postgresql_psycopg2 -> postgresql), and sets DEFAULT_AUTO_FIELD = BigAutoField (citation's CitationConfig already opts in; catalog.core defines no models, so no new migrations).
…olr/ES6 Adds an elasticsearch8 service (base.yml, dev.yml) and its cluster config (deploy/elasticsearch.conf.d/elasticsearch8.yml) alongside the existing Solr/ES6 stack, plus: - catalog/core/apps.py, search_indexes.py, forms.py: ES8 client wiring and index document definitions. - catalog/core/management/commands/rebuild_es_index.py: rebuild/validate the ES8 public index with an atomic alias swap, distinct from the Solr/Haystack index which remains the live search backend. - Tests for the rebuild command and search index document mapping. This is additive: the app continues to search against Solr/Haystack; ES8 is populated and validated ahead of a future gated cutover (see the deploy-management changeset for the cutover/rollback mechanics).
- staging.yml/prod.yml: django image must be an immutable tag/digest
(${CATALOG_IMAGE}), never :latest; ELASTICSEARCH_HOST is an explicit
per-release env var (defaults to the ES6 elasticsearch service) so a
release opts into ES8 deliberately.
- deploy.sh: validate image refs and ES host, record the previous
{image, ES host} pair as service labels and a deploy history log
before rolling over, so a rollback redeploys the exact previous pair
rather than drifting to :latest or a mismatched ES endpoint.
- docs/deployment-runbook.md: documents the build/stage/validate/cutover/
rollback procedure referenced by the compose files and deploy.sh.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
upgrade to citation 1.0.0 and all other major django deps