This would allow you to fail an automated build when migrations (or any other management command) failed. Currently I see no way of doing that.
Beyond that, I noticed that the sys.exit(1) is not very consistently applied on the makemigrations management command (for example, it is not called when the --merge parameter is supplied).
I can do the PR for the CommandError thing (unless anyone sees a reason not to, or that would not work/there is a better place to put it).
--
Ben Liyanage | Software Engineer | Rentlytics, Inc.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Django developers (Contributions to Django itself)
Is it ok if I do a PR on this? This seems like it would be really useful for automation.
-Ben
Tim Graham
unread,
Oct 26, 2015, 2:21:17 PM10/26/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Django developers (Contributions to Django itself)
The place you linked to is ignoring CommandError when parsing arguments. I'm not sure under what conditions this happens (if at all) -- the Django tests don't cover it.
Could you clarify how to reproduce the problem you're seeing?
bliy...@rentlytics.com
unread,
Oct 27, 2015, 4:00:32 PM10/27/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Django developers (Contributions to Django itself)
Hm, let me check it out and get back to you. We had some migrations that exited in failure, but with a non-0 exit status during our release. I'll see if I can reproduce this this week.