From 7ea0e2add86a68e3d3f3cc462988f87165ba0e50 Mon Sep 17 00:00:00 2001 From: Stavros kois Date: Fri, 25 Oct 2024 00:09:41 +0300 Subject: [PATCH] fix healthcheck for pg --- library/2.0.0/tests/__init__.py | 0 .../enterprise/minio/v1_1_7 => library/2.0.1}/__init__.py | 0 library/{2.0.0 => 2.0.1}/configs.py | 0 library/{2.0.0 => 2.0.1}/container.py | 0 library/{2.0.0 => 2.0.1}/depends.py | 0 library/{2.0.0 => 2.0.1}/deploy.py | 0 library/{2.0.0 => 2.0.1}/deps.py | 3 ++- library/{2.0.0 => 2.0.1}/device.py | 0 library/{2.0.0 => 2.0.1}/devices.py | 0 library/{2.0.0 => 2.0.1}/dns.py | 0 library/{2.0.0 => 2.0.1}/environment.py | 0 library/{2.0.0 => 2.0.1}/error.py | 0 library/{2.0.0 => 2.0.1}/formatter.py | 0 library/{2.0.0 => 2.0.1}/functions.py | 0 library/{2.0.0 => 2.0.1}/healthcheck.py | 2 +- library/{2.0.0 => 2.0.1}/labels.py | 0 library/{2.0.0 => 2.0.1}/notes.py | 0 library/{2.0.0 => 2.0.1}/portal.py | 0 library/{2.0.0 => 2.0.1}/portals.py | 0 library/{2.0.0 => 2.0.1}/ports.py | 0 library/{2.0.0 => 2.0.1}/render.py | 0 library/{2.0.0 => 2.0.1}/resources.py | 0 library/{2.0.0 => 2.0.1}/restart.py | 0 library/{2.0.0 => 2.0.1}/storage.py | 0 library/{2.0.0 => 2.0.1/tests}/__init__.py | 0 library/{2.0.0 => 2.0.1}/tests/test_build_image.py | 0 library/{2.0.0 => 2.0.1}/tests/test_configs.py | 0 library/{2.0.0 => 2.0.1}/tests/test_container.py | 0 library/{2.0.0 => 2.0.1}/tests/test_depends.py | 0 library/{2.0.0 => 2.0.1}/tests/test_deps.py | 2 +- library/{2.0.0 => 2.0.1}/tests/test_device.py | 0 library/{2.0.0 => 2.0.1}/tests/test_dns.py | 0 library/{2.0.0 => 2.0.1}/tests/test_environment.py | 0 library/{2.0.0 => 2.0.1}/tests/test_functions.py | 0 library/{2.0.0 => 2.0.1}/tests/test_healthcheck.py | 2 +- library/{2.0.0 => 2.0.1}/tests/test_labels.py | 0 library/{2.0.0 => 2.0.1}/tests/test_notes.py | 0 library/{2.0.0 => 2.0.1}/tests/test_portal.py | 0 library/{2.0.0 => 2.0.1}/tests/test_ports.py | 0 library/{2.0.0 => 2.0.1}/tests/test_render.py | 0 library/{2.0.0 => 2.0.1}/tests/test_resources.py | 0 library/{2.0.0 => 2.0.1}/tests/test_restart.py | 0 library/{2.0.0 => 2.0.1}/tests/test_volumes.py | 0 library/{2.0.0 => 2.0.1}/validations.py | 0 library/{2.0.0 => 2.0.1}/volume_mount.py | 0 library/{2.0.0 => 2.0.1}/volume_mount_types.py | 0 library/{2.0.0 => 2.0.1}/volume_sources.py | 0 library/{2.0.0 => 2.0.1}/volume_types.py | 0 library/{2.0.0 => 2.0.1}/volumes.py | 0 library/hashes.yaml | 2 +- 50 files changed, 6 insertions(+), 5 deletions(-) delete mode 100644 library/2.0.0/tests/__init__.py rename {ix-dev/enterprise/minio/templates/library/enterprise/minio/v1_1_7 => library/2.0.1}/__init__.py (100%) rename library/{2.0.0 => 2.0.1}/configs.py (100%) rename library/{2.0.0 => 2.0.1}/container.py (100%) rename library/{2.0.0 => 2.0.1}/depends.py (100%) rename library/{2.0.0 => 2.0.1}/deploy.py (100%) rename library/{2.0.0 => 2.0.1}/deps.py (99%) rename library/{2.0.0 => 2.0.1}/device.py (100%) rename library/{2.0.0 => 2.0.1}/devices.py (100%) rename library/{2.0.0 => 2.0.1}/dns.py (100%) rename library/{2.0.0 => 2.0.1}/environment.py (100%) rename library/{2.0.0 => 2.0.1}/error.py (100%) rename library/{2.0.0 => 2.0.1}/formatter.py (100%) rename library/{2.0.0 => 2.0.1}/functions.py (100%) rename library/{2.0.0 => 2.0.1}/healthcheck.py (98%) rename library/{2.0.0 => 2.0.1}/labels.py (100%) rename library/{2.0.0 => 2.0.1}/notes.py (100%) rename library/{2.0.0 => 2.0.1}/portal.py (100%) rename library/{2.0.0 => 2.0.1}/portals.py (100%) rename library/{2.0.0 => 2.0.1}/ports.py (100%) rename library/{2.0.0 => 2.0.1}/render.py (100%) rename library/{2.0.0 => 2.0.1}/resources.py (100%) rename library/{2.0.0 => 2.0.1}/restart.py (100%) rename library/{2.0.0 => 2.0.1}/storage.py (100%) rename library/{2.0.0 => 2.0.1/tests}/__init__.py (100%) rename library/{2.0.0 => 2.0.1}/tests/test_build_image.py (100%) rename library/{2.0.0 => 2.0.1}/tests/test_configs.py (100%) rename library/{2.0.0 => 2.0.1}/tests/test_container.py (100%) rename library/{2.0.0 => 2.0.1}/tests/test_depends.py (100%) rename library/{2.0.0 => 2.0.1}/tests/test_deps.py (99%) rename library/{2.0.0 => 2.0.1}/tests/test_device.py (100%) rename library/{2.0.0 => 2.0.1}/tests/test_dns.py (100%) rename library/{2.0.0 => 2.0.1}/tests/test_environment.py (100%) rename library/{2.0.0 => 2.0.1}/tests/test_functions.py (100%) rename library/{2.0.0 => 2.0.1}/tests/test_healthcheck.py (98%) rename library/{2.0.0 => 2.0.1}/tests/test_labels.py (100%) rename library/{2.0.0 => 2.0.1}/tests/test_notes.py (100%) rename library/{2.0.0 => 2.0.1}/tests/test_portal.py (100%) rename library/{2.0.0 => 2.0.1}/tests/test_ports.py (100%) rename library/{2.0.0 => 2.0.1}/tests/test_render.py (100%) rename library/{2.0.0 => 2.0.1}/tests/test_resources.py (100%) rename library/{2.0.0 => 2.0.1}/tests/test_restart.py (100%) rename library/{2.0.0 => 2.0.1}/tests/test_volumes.py (100%) rename library/{2.0.0 => 2.0.1}/validations.py (100%) rename library/{2.0.0 => 2.0.1}/volume_mount.py (100%) rename library/{2.0.0 => 2.0.1}/volume_mount_types.py (100%) rename library/{2.0.0 => 2.0.1}/volume_sources.py (100%) rename library/{2.0.0 => 2.0.1}/volume_types.py (100%) rename library/{2.0.0 => 2.0.1}/volumes.py (100%) diff --git a/library/2.0.0/tests/__init__.py b/library/2.0.0/tests/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ix-dev/enterprise/minio/templates/library/enterprise/minio/v1_1_7/__init__.py b/library/2.0.1/__init__.py similarity index 100% rename from ix-dev/enterprise/minio/templates/library/enterprise/minio/v1_1_7/__init__.py rename to library/2.0.1/__init__.py diff --git a/library/2.0.0/configs.py b/library/2.0.1/configs.py similarity index 100% rename from library/2.0.0/configs.py rename to library/2.0.1/configs.py diff --git a/library/2.0.0/container.py b/library/2.0.1/container.py similarity index 100% rename from library/2.0.0/container.py rename to library/2.0.1/container.py diff --git a/library/2.0.0/depends.py b/library/2.0.1/depends.py similarity index 100% rename from library/2.0.0/depends.py rename to library/2.0.1/depends.py diff --git a/library/2.0.0/deploy.py b/library/2.0.1/deploy.py similarity index 100% rename from library/2.0.0/deploy.py rename to library/2.0.1/deploy.py diff --git a/library/2.0.0/deps.py b/library/2.0.1/deps.py similarity index 99% rename from library/2.0.0/deps.py rename to library/2.0.1/deps.py index 43c444aabd..2445aa9fb3 100644 --- a/library/2.0.0/deps.py +++ b/library/2.0.1/deps.py @@ -242,7 +242,8 @@ def perform_action(action): print("Permissions are correct. Skipping...") print(f"Time taken: {(time.time() - start_time) * 1000:.2f}ms") - print(f"=== Finished applying configuration on volume with identifier [{action['identifier']}] ===") + print(f"=== Finished applying configuration on volume with identifier [{action['identifier']}] ==") + print() if __name__ == "__main__": start_time = time.time() diff --git a/library/2.0.0/device.py b/library/2.0.1/device.py similarity index 100% rename from library/2.0.0/device.py rename to library/2.0.1/device.py diff --git a/library/2.0.0/devices.py b/library/2.0.1/devices.py similarity index 100% rename from library/2.0.0/devices.py rename to library/2.0.1/devices.py diff --git a/library/2.0.0/dns.py b/library/2.0.1/dns.py similarity index 100% rename from library/2.0.0/dns.py rename to library/2.0.1/dns.py diff --git a/library/2.0.0/environment.py b/library/2.0.1/environment.py similarity index 100% rename from library/2.0.0/environment.py rename to library/2.0.1/environment.py diff --git a/library/2.0.0/error.py b/library/2.0.1/error.py similarity index 100% rename from library/2.0.0/error.py rename to library/2.0.1/error.py diff --git a/library/2.0.0/formatter.py b/library/2.0.1/formatter.py similarity index 100% rename from library/2.0.0/formatter.py rename to library/2.0.1/formatter.py diff --git a/library/2.0.0/functions.py b/library/2.0.1/functions.py similarity index 100% rename from library/2.0.0/functions.py rename to library/2.0.1/functions.py diff --git a/library/2.0.0/healthcheck.py b/library/2.0.1/healthcheck.py similarity index 98% rename from library/2.0.0/healthcheck.py rename to library/2.0.1/healthcheck.py index 9da7477f95..a54f3f3133 100644 --- a/library/2.0.0/healthcheck.py +++ b/library/2.0.1/healthcheck.py @@ -182,7 +182,7 @@ def postgres_test(config: dict) -> str: port = get_key(config, "port", 5432, False) host = get_key(config, "host", "127.0.0.1", False) - return f"pg_isready -h {host} -p {port} -U $POSTGRES_USERNAME -d $POSTGRES_DATABASE" + return f"pg_isready -h {host} -p {port} -U $POSTGRES_USER -d $POSTGRES_DB" def mariadb_test(config: dict) -> str: diff --git a/library/2.0.0/labels.py b/library/2.0.1/labels.py similarity index 100% rename from library/2.0.0/labels.py rename to library/2.0.1/labels.py diff --git a/library/2.0.0/notes.py b/library/2.0.1/notes.py similarity index 100% rename from library/2.0.0/notes.py rename to library/2.0.1/notes.py diff --git a/library/2.0.0/portal.py b/library/2.0.1/portal.py similarity index 100% rename from library/2.0.0/portal.py rename to library/2.0.1/portal.py diff --git a/library/2.0.0/portals.py b/library/2.0.1/portals.py similarity index 100% rename from library/2.0.0/portals.py rename to library/2.0.1/portals.py diff --git a/library/2.0.0/ports.py b/library/2.0.1/ports.py similarity index 100% rename from library/2.0.0/ports.py rename to library/2.0.1/ports.py diff --git a/library/2.0.0/render.py b/library/2.0.1/render.py similarity index 100% rename from library/2.0.0/render.py rename to library/2.0.1/render.py diff --git a/library/2.0.0/resources.py b/library/2.0.1/resources.py similarity index 100% rename from library/2.0.0/resources.py rename to library/2.0.1/resources.py diff --git a/library/2.0.0/restart.py b/library/2.0.1/restart.py similarity index 100% rename from library/2.0.0/restart.py rename to library/2.0.1/restart.py diff --git a/library/2.0.0/storage.py b/library/2.0.1/storage.py similarity index 100% rename from library/2.0.0/storage.py rename to library/2.0.1/storage.py diff --git a/library/2.0.0/__init__.py b/library/2.0.1/tests/__init__.py similarity index 100% rename from library/2.0.0/__init__.py rename to library/2.0.1/tests/__init__.py diff --git a/library/2.0.0/tests/test_build_image.py b/library/2.0.1/tests/test_build_image.py similarity index 100% rename from library/2.0.0/tests/test_build_image.py rename to library/2.0.1/tests/test_build_image.py diff --git a/library/2.0.0/tests/test_configs.py b/library/2.0.1/tests/test_configs.py similarity index 100% rename from library/2.0.0/tests/test_configs.py rename to library/2.0.1/tests/test_configs.py diff --git a/library/2.0.0/tests/test_container.py b/library/2.0.1/tests/test_container.py similarity index 100% rename from library/2.0.0/tests/test_container.py rename to library/2.0.1/tests/test_container.py diff --git a/library/2.0.0/tests/test_depends.py b/library/2.0.1/tests/test_depends.py similarity index 100% rename from library/2.0.0/tests/test_depends.py rename to library/2.0.1/tests/test_depends.py diff --git a/library/2.0.0/tests/test_deps.py b/library/2.0.1/tests/test_deps.py similarity index 99% rename from library/2.0.0/tests/test_deps.py rename to library/2.0.1/tests/test_deps.py index dcc6ba0945..d627425150 100644 --- a/library/2.0.0/tests/test_deps.py +++ b/library/2.0.1/tests/test_deps.py @@ -56,7 +56,7 @@ def test_add_postgres(mock_values): assert output["services"]["pg_container"]["deploy"]["resources"]["limits"]["cpus"] == "2.0" assert output["services"]["pg_container"]["deploy"]["resources"]["limits"]["memory"] == "4096M" assert output["services"]["pg_container"]["healthcheck"] == { - "test": "pg_isready -h 127.0.0.1 -p 5432 -U $$POSTGRES_USERNAME -d $$POSTGRES_DATABASE", + "test": "pg_isready -h 127.0.0.1 -p 5432 -U $$POSTGRES_USER -d $$POSTGRES_DB", "interval": "10s", "timeout": "5s", "retries": 30, diff --git a/library/2.0.0/tests/test_device.py b/library/2.0.1/tests/test_device.py similarity index 100% rename from library/2.0.0/tests/test_device.py rename to library/2.0.1/tests/test_device.py diff --git a/library/2.0.0/tests/test_dns.py b/library/2.0.1/tests/test_dns.py similarity index 100% rename from library/2.0.0/tests/test_dns.py rename to library/2.0.1/tests/test_dns.py diff --git a/library/2.0.0/tests/test_environment.py b/library/2.0.1/tests/test_environment.py similarity index 100% rename from library/2.0.0/tests/test_environment.py rename to library/2.0.1/tests/test_environment.py diff --git a/library/2.0.0/tests/test_functions.py b/library/2.0.1/tests/test_functions.py similarity index 100% rename from library/2.0.0/tests/test_functions.py rename to library/2.0.1/tests/test_functions.py diff --git a/library/2.0.0/tests/test_healthcheck.py b/library/2.0.1/tests/test_healthcheck.py similarity index 98% rename from library/2.0.0/tests/test_healthcheck.py rename to library/2.0.1/tests/test_healthcheck.py index 739ec2d4d4..8267b986b4 100644 --- a/library/2.0.0/tests/test_healthcheck.py +++ b/library/2.0.1/tests/test_healthcheck.py @@ -172,7 +172,7 @@ def test_postgres_healthcheck(mock_values): output = render.render() assert ( output["services"]["test_container"]["healthcheck"]["test"] - == "pg_isready -h 127.0.0.1 -p 5432 -U $$POSTGRES_USERNAME -d $$POSTGRES_DATABASE" + == "pg_isready -h 127.0.0.1 -p 5432 -U $$POSTGRES_USER -d $$POSTGRES_DB" ) diff --git a/library/2.0.0/tests/test_labels.py b/library/2.0.1/tests/test_labels.py similarity index 100% rename from library/2.0.0/tests/test_labels.py rename to library/2.0.1/tests/test_labels.py diff --git a/library/2.0.0/tests/test_notes.py b/library/2.0.1/tests/test_notes.py similarity index 100% rename from library/2.0.0/tests/test_notes.py rename to library/2.0.1/tests/test_notes.py diff --git a/library/2.0.0/tests/test_portal.py b/library/2.0.1/tests/test_portal.py similarity index 100% rename from library/2.0.0/tests/test_portal.py rename to library/2.0.1/tests/test_portal.py diff --git a/library/2.0.0/tests/test_ports.py b/library/2.0.1/tests/test_ports.py similarity index 100% rename from library/2.0.0/tests/test_ports.py rename to library/2.0.1/tests/test_ports.py diff --git a/library/2.0.0/tests/test_render.py b/library/2.0.1/tests/test_render.py similarity index 100% rename from library/2.0.0/tests/test_render.py rename to library/2.0.1/tests/test_render.py diff --git a/library/2.0.0/tests/test_resources.py b/library/2.0.1/tests/test_resources.py similarity index 100% rename from library/2.0.0/tests/test_resources.py rename to library/2.0.1/tests/test_resources.py diff --git a/library/2.0.0/tests/test_restart.py b/library/2.0.1/tests/test_restart.py similarity index 100% rename from library/2.0.0/tests/test_restart.py rename to library/2.0.1/tests/test_restart.py diff --git a/library/2.0.0/tests/test_volumes.py b/library/2.0.1/tests/test_volumes.py similarity index 100% rename from library/2.0.0/tests/test_volumes.py rename to library/2.0.1/tests/test_volumes.py diff --git a/library/2.0.0/validations.py b/library/2.0.1/validations.py similarity index 100% rename from library/2.0.0/validations.py rename to library/2.0.1/validations.py diff --git a/library/2.0.0/volume_mount.py b/library/2.0.1/volume_mount.py similarity index 100% rename from library/2.0.0/volume_mount.py rename to library/2.0.1/volume_mount.py diff --git a/library/2.0.0/volume_mount_types.py b/library/2.0.1/volume_mount_types.py similarity index 100% rename from library/2.0.0/volume_mount_types.py rename to library/2.0.1/volume_mount_types.py diff --git a/library/2.0.0/volume_sources.py b/library/2.0.1/volume_sources.py similarity index 100% rename from library/2.0.0/volume_sources.py rename to library/2.0.1/volume_sources.py diff --git a/library/2.0.0/volume_types.py b/library/2.0.1/volume_types.py similarity index 100% rename from library/2.0.0/volume_types.py rename to library/2.0.1/volume_types.py diff --git a/library/2.0.0/volumes.py b/library/2.0.1/volumes.py similarity index 100% rename from library/2.0.0/volumes.py rename to library/2.0.1/volumes.py diff --git a/library/hashes.yaml b/library/hashes.yaml index 5187690638..529901b300 100644 --- a/library/hashes.yaml +++ b/library/hashes.yaml @@ -1,3 +1,3 @@ 0.0.1: f074617a82a86d2a6cc78a4c8a4296fc9d168e456f12713e50c696557b302133 1.1.4: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 -2.0.0: 1d4f6760d7abd712271ff40ae0cabe3285f34a1f84c6922709d51f1f0bf5ce33 +2.0.1: 77e44b15832ac747aadc0d04c3eaac54cd0a9810cf761670b0215cb9c6aa7608