wagtail-torchbox icon indicating copy to clipboard operation
wagtail-torchbox copied to clipboard

increase minor node version

Open William-Blackie opened this issue 3 years ago • 2 comments

These fixes bump the minor node version which fails in docker-compose as it resolves to a lower version than is built in production.

William-Blackie avatar Mar 22 '22 11:03 William-Blackie

To test this could you run fab build and confirm the build succeeds @jhancock532 ?

William-Blackie avatar Mar 22 '22 11:03 William-Blackie

Ran fab build after destroying my old containers, build completed without issues. Fab start had also no issues, ./manage.py migrate has an error, but I believe the current workaround for this is to pull staging data? I'm not sure.

Error Log
  Applying blog.0021_update_streamblock_templates... OK
  Applying blog.0022_update_image_model...Traceback (most recent call last):
  File "./manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", line 413, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 354, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 398, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 89, in wrapped
    res = handle_func(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/commands/migrate.py", line 244, in handle
    post_migrate_state = executor.migrate(
  File "/usr/local/lib/python3.8/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.8/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.8/site-packages/django/db/migrations/executor.py", line 227, in apply_migration
    state = migration.apply(state, schema_editor)
  File "/usr/local/lib/python3.8/site-packages/django/db/migrations/migration.py", line 126, in apply
    operation.database_forwards(self.app_label, schema_editor, old_state, project_state)
  File "/usr/local/lib/python3.8/site-packages/django/db/migrations/operations/fields.py", line 244, in database_forwards
    schema_editor.alter_field(from_model, from_field, to_field)
  File "/usr/local/lib/python3.8/site-packages/django/db/backends/base/schema.py", line 581, in alter_field
    new_db_params = new_field.db_parameters(connection=self.connection)
  File "/usr/local/lib/python3.8/site-packages/django/db/models/fields/related.py", line 1004, in db_parameters
    return {"type": self.db_type(connection), "check": self.db_check(connection)}
  File "/usr/local/lib/python3.8/site-packages/django/db/models/fields/related.py", line 1001, in db_type
    return self.target_field.rel_db_type(connection=connection)
  File "/usr/local/lib/python3.8/site-packages/django/db/models/fields/related.py", line 897, in target_field
    return self.foreign_related_fields[0]
  File "/usr/local/lib/python3.8/site-packages/django/utils/functional.py", line 48, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "/usr/local/lib/python3.8/site-packages/django/db/models/fields/related.py", line 644, in foreign_related_fields
    return tuple(rhs_field for lhs_field, rhs_field in self.related_fields if rhs_field)
  File "/usr/local/lib/python3.8/site-packages/django/utils/functional.py", line 48, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "/usr/local/lib/python3.8/site-packages/django/db/models/fields/related.py", line 632, in related_fields
    return self.resolve_related_fields()
  File "/usr/local/lib/python3.8/site-packages/django/db/models/fields/related.py", line 936, in resolve_related_fields
    related_fields = super().resolve_related_fields()
  File "/usr/local/lib/python3.8/site-packages/django/db/models/fields/related.py", line 615, in resolve_related_fields
    raise ValueError('Related model %r cannot be resolved' % self.remote_field.model)
ValueError: Related model 'images.customimage' cannot be resolved
Ran the FE tooling via NPM locally, tooling ran as expected. I could look into the migration issue later on if this is unexpected.

jhancock532 avatar Mar 22 '22 13:03 jhancock532

Closing as the docker setup has changed since this was done.

helenb avatar Jun 22 '23 09:06 helenb