-
-
Notifications
You must be signed in to change notification settings - Fork 166
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
Migrations Fail When Deploying to AWS with NodeNotFoundError #205
Comments
Yes, this due to a change in Django in 3.2 (release notes for 3.2). The settings in the default settings file is now setting models missing a primary_key to I encountered the similar problem, when installing from I have made a pull request #206 to the project, maybe that can help you. |
This is still an issue, running |
This has been fixed in #211 and will be included in a release soon. |
@valberg, Could you please release a new version with this fix ? The 2.0.0 is not usable in production in the current state. |
Hi! I have just issued 2.1.0 release. I hope this fixes your problem. Sorry for the delay. |
Everything works fine locally, but when I attempt to deploy to AWS Elastic Beanstalk, migrations fail. The following is from the log:
2022-11-13 23:43:33,659 P31312 [INFO] Command 01_makemigrations
2022-11-13 23:43:34,219 P31312 [INFO] -----------------------Command Output-----------------------
2022-11-13 23:43:34,220 P31312 [INFO] Traceback (most recent call last):
2022-11-13 23:43:34,220 P31312 [INFO] File "manage.py", line 22, in
2022-11-13 23:43:34,220 P31312 [INFO] main()
2022-11-13 23:43:34,220 P31312 [INFO] File "manage.py", line 18, in main
2022-11-13 23:43:34,220 P31312 [INFO] execute_from_command_line(sys.argv)
2022-11-13 23:43:34,220 P31312 [INFO] File "/var/app/venv/staging-LQM1lest/lib/python3.8/site-packages/django/core/management/init.py", line 446, in execute_from_command_line
2022-11-13 23:43:34,220 P31312 [INFO] utility.execute()
2022-11-13 23:43:34,220 P31312 [INFO] File "/var/app/venv/staging-LQM1lest/lib/python3.8/site-packages/django/core/management/init.py", line 440, in execute
2022-11-13 23:43:34,220 P31312 [INFO] self.fetch_command(subcommand).run_from_argv(self.argv)
2022-11-13 23:43:34,220 P31312 [INFO] File "/var/app/venv/staging-LQM1lest/lib/python3.8/site-packages/django/core/management/base.py", line 414, in run_from_argv
2022-11-13 23:43:34,220 P31312 [INFO] self.execute(*args, **cmd_options)
2022-11-13 23:43:34,220 P31312 [INFO] File "/var/app/venv/staging-LQM1lest/lib/python3.8/site-packages/django/core/management/base.py", line 460, in execute
2022-11-13 23:43:34,220 P31312 [INFO] output = self.handle(*args, **options)
2022-11-13 23:43:34,220 P31312 [INFO] File "/var/app/venv/staging-LQM1lest/lib/python3.8/site-packages/django/core/management/base.py", line 98, in wrapped
2022-11-13 23:43:34,221 P31312 [INFO] res = handle_func(*args, **kwargs)
2022-11-13 23:43:34,221 P31312 [INFO] File "/var/app/venv/staging-LQM1lest/lib/python3.8/site-packages/django/core/management/commands/makemigrations.py", line 100, in handle
2022-11-13 23:43:34,221 P31312 [INFO] loader = MigrationLoader(None, ignore_no_migrations=True)
2022-11-13 23:43:34,221 P31312 [INFO] File "/var/app/venv/staging-LQM1lest/lib/python3.8/site-packages/django/db/migrations/loader.py", line 58, in init
2022-11-13 23:43:34,221 P31312 [INFO] self.build_graph()
2022-11-13 23:43:34,221 P31312 [INFO] File "/var/app/venv/staging-LQM1lest/lib/python3.8/site-packages/django/db/migrations/loader.py", line 276, in build_graph
2022-11-13 23:43:34,221 P31312 [INFO] self.graph.validate_consistency()
2022-11-13 23:43:34,221 P31312 [INFO] File "/var/app/venv/staging-LQM1lest/lib/python3.8/site-packages/django/db/migrations/graph.py", line 198, in validate_consistency
2022-11-13 23:43:34,221 P31312 [INFO] [n.raise_error() for n in self.node_map.values() if isinstance(n, DummyNode)]
2022-11-13 23:43:34,221 P31312 [INFO] File "/var/app/venv/staging-LQM1lest/lib/python3.8/site-packages/django/db/migrations/graph.py", line 198, in
2022-11-13 23:43:34,221 P31312 [INFO] [n.raise_error() for n in self.node_map.values() if isinstance(n, DummyNode)]
2022-11-13 23:43:34,221 P31312 [INFO] File "/var/app/venv/staging-LQM1lest/lib/python3.8/site-packages/django/db/migrations/graph.py", line 60, in raise_error
2022-11-13 23:43:34,221 P31312 [INFO] raise NodeNotFoundError(self.error_message, self.key, origin=self.origin)
2022-11-13 23:43:34,221 P31312 [INFO] django.db.migrations.exceptions.NodeNotFoundError: Migration webapp.0032_invitationdetails_installer_invitation_and_more dependencies reference nonexistent parent node ('invitations', '0004_alter_invitation_id')
It just seems like it can't find the migrations for invitations. I have verified that they are in the venv/lib/site-packages/invitations/migrations.
Am I missing a setting or command argument or something or is this a bug in Django or Invitations? Any workarounds?
Thanks. I'm pretty new to Django.
The text was updated successfully, but these errors were encountered: