Skip to content

Remove user interaction for DWH prefix - #21

Open
codemonkey2357 wants to merge 2 commits into
mainfrom
feature/non-interactive-option-to-docker-delete-script
Open

Remove user interaction for DWH prefix#21
codemonkey2357 wants to merge 2 commits into
mainfrom
feature/non-interactive-option-to-docker-delete-script

Conversation

@codemonkey2357

Copy link
Copy Markdown

-removed user interaction
-check_dwh_prefix() checks if matching database and wildfly servers are running. Therefore redundance in main() was removed
-also removed functions that were no longer needed

@LongusBongus LongusBongus left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Deleting worked, but interactive option is removed and the containers are not checked if running. Find a way to incorporate both interactive and non-interactive execution (maybe by checking the command line arguments) and add the function to check if a container is running

Comment thread dwh-scripts/docker_delete_encounters.sh Outdated
@LongusBongus

Copy link
Copy Markdown
Contributor

Sorry, Containers are being checked inside "check_dwh_prefix", then safely remove the function still calling "service_running"

@aktin aktin deleted a comment from LongusBongus Dec 18, 2025
@LongusBongus

LongusBongus commented Apr 13, 2026

Copy link
Copy Markdown
Contributor

The prefix selection is unintuitive (typing the number instead of the name, my bad). Change the requirement of the prefix preview: From now on the preview of currently running prefixes is just a helper. The main functionality will be, to type the preview by hand or write it into the script call. If the script needs to be terminated, use these logging-functions:

log_info() { echo -e "\033[0;34m[INFO]\033[0m $1"; }
log_success() { echo -e "\033[0;32m[SUCCESS]\033[0m $1"; }
log_warn() { echo -e "\033[1;33m[WARN]\033[0m $1"; }
log_error() { echo -e "\033[0;31m[ERROR]\033[0m $1" >&2; }
awdf

Definition of Done:

  1. Script executes using sudo ./docker_delete_encounters.sh 20220101 20220201
  2. Script executes using sudo ./docker_delete_encounters.sh 20220101 20220201 dwh1
  3. Script terminates with status 1 and logs a Validation not successful comment, if given prefix did not meet requirements.

(these are just examples, replace with your own test dates and container prefix)

Other wise good job, core functionality is ready and seems stable.

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.

2 participants