Skip to content
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

[Tagging 71-74-86] Cleaning up Some Tagging Issues #92

Closed
wants to merge 121 commits into from

Conversation

BethanyG
Copy link
Member

@BethanyG BethanyG commented Feb 29, 2020

lpatmo and others added 30 commits August 26, 2019 23:21
@BethanyG BethanyG added this to the resources milestone Feb 29, 2020
Copy link
Contributor

@billglover billglover left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testing steps:

Revert to master, recreate the DB, run the backend, create a user and resource. I do this to ensure that I'm validating what this PR will do to master.

git checkout master
git pull
docker-compose down
docker volume rm backend_cb_data
docker-compose up -d --build

Checkout this PR.

gh pr checkout 92

At this point I noticed that our repo is back up to 66 MB. I'm not sure why this has happened but it appears to be this branch that causes the issue. I'd like to avoid merging this in with this issue if at all possible.

docker-compose up -d --build

At this point I get a failure in applying migrations.

Operations to perform:
  Apply all migrations: account, admin, auth, contenttypes, django_celery_beat, resources, sessions, sites, socialaccount, tagging, taggit, users
Running migrations:
  Applying resources.0002_auto_20200228_2334...Traceback (most recent call last):
  File "/opt/cbv3_django_prototype/manage.py", line 30, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python3.7/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.7/site-packages/django/core/management/__init__.py", line 375, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.7/site-packages/django/core/management/base.py", line 323, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python3.7/site-packages/django/core/management/base.py", line 364, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python3.7/site-packages/django/core/management/base.py", line 83, in wrapped
    res = handle_func(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/django/core/management/commands/migrate.py", line 234, in handle
    fake_initial=fake_initial,
  File "/usr/local/lib/python3.7/site-packages/django/db/migrations/executor.py", line 117, in migrate
    state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial)
  File "/usr/local/lib/python3.7/site-packages/django/db/migrations/executor.py", line 147, in _migrate_all_forwards
    state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)
  File "/usr/local/lib/python3.7/site-packages/django/db/migrations/executor.py", line 245, in apply_migration
    state = migration.apply(state, schema_editor)
  File "/usr/local/lib/python3.7/site-packages/django/db/migrations/migration.py", line 124, in apply
    operation.database_forwards(self.app_label, schema_editor, old_state, project_state)
  File "/usr/local/lib/python3.7/site-packages/django/db/migrations/operations/fields.py", line 112, in database_forwards
    field,
  File "/usr/local/lib/python3.7/site-packages/django/db/backends/base/schema.py", line 430, in add_field
    if field.many_to_many and field.remote_field.through._meta.auto_created:
AttributeError: 'str' object has no attribute '_meta'

I'm unable to start the application with failed migrations.

I'm surprised to see changes to the existing migration files included as part of this PR. I was expecting to see new migrations, but not modifications to existing migration files. I'm wondering if I've misunderstood how migrations work. This discussion on Django migrations seems to support the view that we should not be seeing any changes in migrations files, only new migrations.

I think we need to fix the following before merge:

  • migrations
  • repository size

@BethanyG
Copy link
Member Author

Yeah. I think this PR needs to be hard-booted, and I need to start over with less dubious history. 10-1, the repo size is due to the "recovery turdlets" git left on my system after I had to run **git fsck.

The migrations are a longer story, and one I'd welcome help on. I am going backup and do a hard clear of my local repo, and a refresh of my fork and re-apply these individual changes. I'll try to get a new (smaller!!) PR for testing before EOD.

@BethanyG
Copy link
Member Author

I am going to close this as unsalvageable, and will open a new PR when things are reset.

@BethanyG BethanyG closed this Feb 29, 2020
@billglover billglover mentioned this pull request Mar 1, 2020
@BethanyG BethanyG deleted the tagging-71-74-86 branch March 3, 2020 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants