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

Database checks happen before installing pip requirements #169

Open
jnm opened this issue Sep 14, 2021 · 0 comments
Open

Database checks happen before installing pip requirements #169

jnm opened this issue Sep 14, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@jnm
Copy link
Member

jnm commented Sep 14, 2021

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

@jnm jnm added the bug Something isn't working label Sep 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant