diff --git a/.github/workflows/api-ee.yaml b/.github/workflows/api-ee.yaml index 32e031287..32c1cb627 100644 --- a/.github/workflows/api-ee.yaml +++ b/.github/workflows/api-ee.yaml @@ -144,11 +144,11 @@ jobs: SLACK_USERNAME: "OR Bot" SLACK_MESSAGE: 'Build failed :bomb:' - - name: Debug Job - # if: ${{ failure() }} - uses: mxschmitt/action-tmate@v3 - env: - DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }} - IMAGE_TAG: ${{ github.sha }}-ee - ENVIRONMENT: staging + # - name: Debug Job + # if: ${{ failure() }} + # uses: mxschmitt/action-tmate@v3 + # env: + # DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }} + # IMAGE_TAG: ${{ github.sha }}-ee + # ENVIRONMENT: staging diff --git a/api/chalicelib/core/health.py b/api/chalicelib/core/health.py index bf04ee9f5..4c368780c 100644 --- a/api/chalicelib/core/health.py +++ b/api/chalicelib/core/health.py @@ -203,10 +203,19 @@ def get_health(): "details": __get_sessions_stats, "ssl": __check_SSL } + return __process_health(health_map) + + +def __process_health(tenant_id, health_map): for parent_key in health_map.keys(): - if isinstance(health_map[parent_key], dict): + if config(f"SKIP_H_{parent_key.upper()}", cast=bool, default=False): + health_map.pop(parent_key) + elif isinstance(health_map[parent_key], dict): for element_key in health_map[parent_key]: - health_map[parent_key][element_key] = health_map[parent_key][element_key]() + if config(f"SKIP_H_{parent_key.upper()}_{element_key.upper()}", cast=bool, default=False): + health_map[parent_key].pop(element_key) + else: + health_map[parent_key][element_key] = health_map[parent_key][element_key]() else: health_map[parent_key] = health_map[parent_key]() return health_map diff --git a/ee/api/chalicelib/core/health.py b/ee/api/chalicelib/core/health.py index f37586f66..1b666667c 100644 --- a/ee/api/chalicelib/core/health.py +++ b/ee/api/chalicelib/core/health.py @@ -212,10 +212,19 @@ def get_health(tenant_id=None): "details": __get_sessions_stats, "ssl": __check_SSL } + return __process_health(tenant_id, health_map) + + +def __process_health(tenant_id, health_map): for parent_key in health_map.keys(): - if isinstance(health_map[parent_key], dict): + if config(f"SKIP_H_{parent_key.upper()}", cast=bool, default=False): + health_map.pop(parent_key) + elif isinstance(health_map[parent_key], dict): for element_key in health_map[parent_key]: - health_map[parent_key][element_key] = health_map[parent_key][element_key](tenant_id) + if config(f"SKIP_H_{parent_key.upper()}_{element_key.upper()}", cast=bool, default=False): + health_map[parent_key].pop(element_key) + else: + health_map[parent_key][element_key] = health_map[parent_key][element_key](tenant_id) else: health_map[parent_key] = health_map[parent_key](tenant_id) return health_map