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

Fix reset-postgres task volume name #27

Conversation

PrateekKumar1709
Copy link
Contributor

Problem Statement
Fix volume name in reset-postgres task

Related Issue
Fixes #17

Proposed Changes

  • Added vars section at the top of the taskfile to define COMPOSE_FILE and POSTGRES_VOLUME_NAME variables.
  • Updated all docker compose commands to use {{.COMPOSE_FILE}} instead of hardcoding the path.
  • In the reset-postgres task, replaced 'odr_database_postgres_data' with {{.POSTGRES_VOLUME_NAME}}.
  • Used Task's variable expansion syntax ({{.VAR_NAME}}) throughout the file for consistency and to ensure proper variable expansion.

These changes ensure that the correct volume name (omi-postgres_postgres_data) is used when resetting the Postgres database, resolving the "no such volume" error previously encountered.

Testing:

  • Verified that all postgres-related tasks work as expected, especially the reset-postgres task.
  • Confirmed that the volume is correctly removed and recreated during reset.

Signed-off-by: Prateek Kumar <85689959+PrateekKumar1709@users.noreply.github.com>
Copy link
Collaborator

@CheesyLaZanya CheesyLaZanya left a comment

Choose a reason for hiding this comment

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

Volume name looks to be updated correctly and additional enhancements seem reasonable so looks good to me.

@CheesyLaZanya CheesyLaZanya merged commit 88ece20 into Open-Model-Initiative:main Aug 19, 2024
1 check passed
@PrateekKumar1709 PrateekKumar1709 deleted the fix/reset-postgres-volume-name branch August 19, 2024 13:00
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.

In reset-postgres task, volume name to remove is incorrect
2 participants