Skip to content

Commit ee25b55

Browse files
committed
Add retry for getting the TS version from Github
The HTTP request fails intermittently so I'm adding retry and wait logic. Disable-check: force-changelog-file Disable-check: approval-count
1 parent 5231b40 commit ee25b55

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

.github/workflows/apt-installcheck.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
image_type=$(lsb_release -i -s | tr '[:upper:]' '[:lower:]')
5353
echo "deb https://packagecloud.io/timescale/timescaledb/${image_type}/ $(lsb_release -c -s) main" \
5454
> /etc/apt/sources.list.d/timescaledb.list
55-
wget --quiet -O - https://packagecloud.io/timescale/timescaledb/gpgkey | gpg --dearmor -o /etc/apt/trusted.gpg.d/timescale_timescaledb.gpg
55+
wget --quiet --tries=6 --waitretry=15 -O - https://packagecloud.io/timescale/timescaledb/gpgkey | gpg --dearmor -o /etc/apt/trusted.gpg.d/timescale_timescaledb.gpg
5656
5757
- name: Install timescaledb
5858
timeout-minutes: 15
@@ -67,7 +67,7 @@ jobs:
6767
- name: Get version of latest release
6868
id: versions
6969
run: |
70-
version=$(wget -q https://api.github.com/repos/timescale/timescaledb/releases/latest -O - | jq -r .tag_name)
70+
version=$(wget -q --tries=6 --waitretry=15 https://api.github.com/repos/timescale/timescaledb/releases/latest -O - | jq -r .tag_name)
7171
echo "version=${version}"
7272
echo "version=${version}" >>$GITHUB_OUTPUT
7373

.github/workflows/apt-packages.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ jobs:
5151
echo "deb https://packagecloud.io/timescale/timescaledb/${image_type}/ $(lsb_release -c -s) main" \
5252
> /etc/apt/sources.list.d/timescaledb.list
5353
if [ "${{ matrix.image }}" = "ubuntu:22.04" ]; then
54-
wget --quiet -O - https://packagecloud.io/timescale/timescaledb/gpgkey | apt-key add -
54+
wget --quiet --tries=6 --waitretry=15 -O - https://packagecloud.io/timescale/timescaledb/gpgkey | apt-key add -
5555
else
56-
wget --quiet -O - https://packagecloud.io/timescale/timescaledb/gpgkey | gpg --dearmor -o /etc/apt/trusted.gpg.d/timescale_timescaledb.gpg
56+
wget --quiet --tries=6 --waitretry=15 -O - https://packagecloud.io/timescale/timescaledb/gpgkey | gpg --dearmor -o /etc/apt/trusted.gpg.d/timescale_timescaledb.gpg
5757
fi
5858
5959
@@ -79,7 +79,7 @@ jobs:
7979
- name: Get version of latest release
8080
id: versions
8181
run: |
82-
version=$(wget -q https://api.github.com/repos/timescale/timescaledb/releases/latest -O - | jq -r .tag_name)
82+
version=$(wget -q --tries=6 --waitretry=15 https://api.github.com/repos/timescale/timescaledb/releases/latest -O - | jq -r .tag_name)
8383
echo "version=${version}"
8484
echo "version=${version}" >>$GITHUB_OUTPUT
8585
@@ -101,7 +101,7 @@ jobs:
101101
run: |
102102
# Since this runs nightly on main we have to get the previous version
103103
# from the last released version and not current branch.
104-
prev_version=$(wget --quiet -O - \
104+
prev_version=$(wget --quiet --tries=6 --waitretry=15 -O - \
105105
https://raw.githubusercontent.com/timescale/timescaledb/${{ steps.versions.outputs.version }}/version.config \
106106
| grep previous_version | sed -e 's!previous_version = !!')
107107
sudo -u postgres psql -X -c "ALTER EXTENSION timescaledb UPDATE TO '${prev_version}'" \

.github/workflows/rpm-packages.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ jobs:
7676
- name: Get version of latest release
7777
id: versions
7878
run: |
79-
version=$(wget -q https://api.github.com/repos/timescale/timescaledb/releases/latest -O - | jq -r .tag_name)
79+
version=$(wget -q --tries=6 --waitretry=15 https://api.github.com/repos/timescale/timescaledb/releases/latest -O - | jq -r .tag_name)
8080
echo "version=${version}"
8181
echo "version=${version}" >>$GITHUB_OUTPUT
8282
@@ -99,7 +99,7 @@ jobs:
9999
run: |
100100
# Since this runs nightly on main we have to get the previous version
101101
# from the last released version and not current branch.
102-
prev_version=$(wget --quiet -O - \
102+
prev_version=$(wget --quiet --tries=6 --waitretry=15 -O - \
103103
https://raw.githubusercontent.com/timescale/timescaledb/${{ steps.versions.outputs.version }}/version.config \
104104
| grep previous_version | sed -e 's!previous_version = !!')
105105
yum downgrade -y timescaledb-2${{ matrix.pkg_suffix }}-postgresql-${{ matrix.pg }}-${prev_version}

0 commit comments

Comments
 (0)