Skip to content

Commit

Permalink
flakiness: attempt to avoid direct failure when no target up
Browse files Browse the repository at this point in the history
This change also adds:
- a retry on Install operator via OLM
- set the timeout to 4m instead of 2m (default value)

Change-Id: Ia04fb40dee2973cf395fb77ff9d940915e7f8fba
  • Loading branch information
morucci committed Dec 15, 2023
1 parent 08dc9dd commit ee401cb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 4 additions & 2 deletions roles/health-check/test-monitoring/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@
status_code: [302, 200]
validate_certs: "{{ validate_certs }}"

- name: Fetch defined Prometheus targets
- name: Wait for Prometheus targets
ansible.builtin.shell: curl -k https://{{ prometheus_host }}/api/v1/targets | jq '.data.activeTargets[] | select(.labels.container == "{{ item }}") | .health'
register: target_health
failed_when: '"up" not in target_health.stdout'
until: '"up" in target_health.stdout'
delay: 10
retries: 6
loop:
- "zuul-web"
- "zuul-executor"
Expand Down
5 changes: 5 additions & 0 deletions roles/install-operator/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,15 @@
bin/operator-sdk
run
bundle
--timeout 4m0s
--skip-tls
--skip-tls-verify
{{ ci_bundle_img }}
--namespace operators
--security-context-config restricted
register: run_bundle
retries: 3
delay: 10
until: run_bundle is success
args:
chdir: "{{ src_dir }}"

0 comments on commit ee401cb

Please sign in to comment.