Skip to content

Database checks happen before installing pip requirements #169

@jnm

Description

@jnm

I think this only affects developer mode.

CLI.colored_print(
'Waiting for PostgreSQL database to be up & running...',
CLI.COLOR_INFO)
frontend_command = kpi_run_command + _kpi_db_alias_kludge(' '.join([
'python', 'manage.py',
'wait_for_database', '--retries', '45'
]))

Consider this situation:

  1. Version abc123 of kpi depends on formpack version alpha_uno;
  2. I build kpi using this code and have a great time;
  3. I check out version def456 of kpi, which depends on formpack version beta_five;
    • kpi def456 imports SUPER_GOOD_STUFF constant from formpack beta_five;
  4. I try to restart my environment;
  5. The call to manage.py (see link above) now fails because the last-built image (and hence my new kpi container) still has formpack version alpha_uno, which doesn't have the SUPER_GOOD_STUFF constant.

Before I added these manage.py database checks, I think the kpi container would've started normally and automatically installed the new beta_five version of formpack, without having to rebuild the kpi Docker image.

cc @p2edwards

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions