Skip to content

Commit

Permalink
[patch] replaces assert with a wait condition in compatibility check …
Browse files Browse the repository at this point in the history
…for upgrade
  • Loading branch information
Harsh Tamakuwala authored and Harsh Tamakuwala committed Jan 28, 2025
1 parent d256f79 commit 59692d2
Showing 1 changed file with 14 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,17 @@
debug:
var: app_ws_cr_lookup

- name: "{{ mas_app_id }} : Check that the Application Workspace CRs are in a healthy state"
assert:
that:
- app_ws_cr_lookup.resources is defined
- app_ws_cr_lookup.resources | json_query('[*].status.conditions[?type==`Ready`][].reason') | select ('in', ['Ready', 'WorkspaceReady']) | list | length == app_ws_cr_lookup.resources | length
- name: '{{ mas_app_id }} : Check that the Application Workspace CRs are in a healthy state'
kubernetes.core.k8s_info:
api_version: "{{ app_info[mas_app_id].api_version }}"
kind: "{{ app_info[mas_app_id].ws_kind }}"
namespace: "{{ mas_app_namespace }}"
label_selectors:
- mas.ibm.com/instanceId={{ mas_instance_id }}
- mas.ibm.com/applicationId={{ mas_app_id }}
retries: 20 # about 40 minutes
delay: 120 # 2 minutes
until:
- app_ws_cr_lookup.resources is defined
- app_ws_cr_lookup.resources | json_query('[*].status.conditions[?type==`Ready`][].reason') | select ('in', ['Ready', 'WorkspaceReady']) | list | length == app_ws_cr_lookup.resources | length
register: app_ws_cr_lookup

0 comments on commit 59692d2

Please sign in to comment.