Api v1.13.0 (#1318)
* chore(actions): disable debugging tmate * feat(chalice): allow health-check skip --------- Co-authored-by: rjshrjndrn <rjshrjndrn@gmail.com>
This commit is contained in:
parent
f89d84232a
commit
903edb2f51
3 changed files with 29 additions and 11 deletions
14
.github/workflows/api-ee.yaml
vendored
14
.github/workflows/api-ee.yaml
vendored
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue