-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Django Migration Linter Integration #43
Conversation
There are conflict with the main branch and I suspect this may be the reason the CI is not starting. Best to get this branch up to date with |
…ntmigrations custom output
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a couple of suggestions around the custom script
* Fix cookiebanner settings link URL variable name (CMS-265) * Make the contact details name + email unique (CMS-225) * Add test for the unique constraint * Update contact details listings to include email/phone * Bump deps. Mainly Django 5.1.4 # Conflicts: # poetry.lock
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One final question from me (sorry!)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The script was a nice addition. Let's see how this goes. If we find it hard to use and read, it's worth revisiting.
What is the context of this PR?
django-migration-linter
was added to the project to automatically identify potentially breaking changes in django migrations files.The linter will also run in the CI pipeline to provide visibility on migration issues early in the development workflow.
There are two different ways of running the django-linter-migration:
make lint-migrations
.make lint-migrations-custom
.The commands can be found in the
Makefile
: https://github.com/ONSdigital/dis-wagtail/pull/43/files#diff-76ed074a9305c04054cdebb9e9aad2d818052b07091de1f20cad0bbac34ffb52R53.The CI pipeline will run the custom output script for better readability in the CI pipeline where there are errors that arise.
Changes made:
cms/settings/base.py
,poetry.lock
andpyproject.toml
updated to integrate the linter to the project.How to review
Set up the project as normal and follow the django-migration-linter section.
Output for
make lint-migrations
will list out the migrations and have a summary at the end. Such as:Output for
make lint-migrations-custom
will have the list of apps linted, with each app having its migration checked and a summary for it. Such as :Follow-up Actions
n/a