Hi Carlton,
I have had problems in the past with `setup.py sdist` and friends
actually depending on existing artefacts in build directories from
previous runs. A quick google turns up this bug report -
https://github.com/pypa/setuptools/issues/436 - originally filed by ....
oh, me :-) and it is still open. It seems that `git clean -dfx` does
clean out these files, so adding that to the release Makefile should fix
the issue if this was the root problem. The release process document
needs to be adjusted to mention that wanted build artefacts need to be
moved somewhere else before preparing the next release, otherwise they
are going to get deleted before they are uploaded.
Luke
On 11/02/2019 19:28, Carlton Gibson wrote:
Hi all.
This morning I released four versions of Django. Three of which, for
2.1, 2.0 and 1.11. (i.e. all the actually supported versions) were
broken.
In the package were additional files from `master`/2.2 which shouldn't
have been there.
This afternoon I have released follow-ups to correct this issue.
First of all, sorry about that, and for any inconvenience caused.
Then, these are process issues so, how can we do better next time?
I'm not 100% sure what occurred.
* The history in Git is correct.
* I must have had the right commits checked out, because the package
metadata is correct. (Filenames, version numbers and so on.)
My best guess is that I've failed to `git clean` correctly before
building each release.
I'm not certain here because switching between branches doesn't leave
the repos in an unclean state, and I'm pretty sure it was clean, but
this seems the most likely error.
Q: is there a nice git command to "assert I'm at exactly this tag"?
Steps I've taken:
* Moved the `git clean` step into the helper script used to build the
packages. No chance of then missing it.
* Added a `diff`-step after building just to make sure what's in the
`django` module matches the checkout.
The second of these, whilst just a visual check, would have worked
with what ended up in the package vs what was in my working tree when
I checked later, but I'm not sure it would have caught the issue when
the package was created (because presumably my working tree was wrong
at that point).
A similar issue affects the checksums, which check that nothing
changed since it was packaged, but not that the right things were
packaged...
(Similarly, pip install worked without error.)
On the new 1.11 package, I created a virtualenv with Python 2 and ran
the test suite. This worked so it should be good. But it would be good
to automate this.
(I'll look into it.) We don't ship the tests in the wheel, so we have
to use the src-dist for this. (We could then diff the two django
modules to make sure they were the same.)
On the other packages I visually looked for incorrect files, but,
beyond specific migrations (etc) that were known bad from the previous
release, this doesn't generalise.
"zaytsev" on IRC suggested running `makemigrations --check`, so having
a test project to install against might also be worth it.
(I'd guess running the test suite would be sufficient...)
Any other thoughts very welcome.
Kind Regards,
Carlton
--
You received this message because you are subscribed to the Google
Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to django-developers+unsubscr...@googlegroups.com
<mailto:django-developers+unsubscr...@googlegroups.com>.
To post to this group, send email to
django-developers@googlegroups.com
<mailto:django-developers@googlegroups.com>.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-developers/90c531fc-3d5b-4d9e-a55f-b88f2e04bb54%40googlegroups.com
<https://groups.google.com/d/msgid/django-developers/90c531fc-3d5b-4d9e-a55f-b88f2e04bb54%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Django
developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-developers/c795f471-9f0b-8794-8899-ed3bbec821aa%40cantab.net.
For more options, visit https://groups.google.com/d/optout.