Skip to content

Commit

Permalink
[download] Don't fail on 304 Not Modified (kubernetes-sigs#10452) (ku…
Browse files Browse the repository at this point in the history
…bernetes-sigs#10559)

i.e when file was not modified since last download

Co-authored-by: Mathieu Parent <[email protected]>
  • Loading branch information
2 people authored and unai-ttxu committed Nov 3, 2023
1 parent bd72650 commit 740025b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion roles/download/tasks/download_file.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@
run_once: "{{ download_force_cache }}"
register: get_url_result
become: "{{ not download_localhost }}"
until: "'OK' in get_url_result.msg or 'file already exists' in get_url_result.msg"
until: "'OK' in get_url_result.msg or
'file already exists' in get_url_result.msg or
get_url_result.status_code == 304"
retries: "{{ download_retries }}"
delay: "{{ retry_stagger | default(5) }}"
environment: "{{ proxy_env }}"
Expand Down

0 comments on commit 740025b

Please sign in to comment.