-
Notifications
You must be signed in to change notification settings - Fork 895
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changes in the loader code require a restart of PostgreSQL during upgrades. This check creates awareness of these changes and allows the coordination of the update process early.
- Loading branch information
1 parent
01a65d8
commit 4150b1c
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Check for loader changes | ||
"on": | ||
pull_request: | ||
types: [opened, synchronize, reopened, edited] | ||
jobs: | ||
check_changelog_file: | ||
name: Check for loader changes | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@v3 | ||
|
||
- name: Check if the pull request changes the loader | ||
shell: bash --norc --noprofile {0} | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
BODY: ${{ github.event.pull_request.body }} | ||
PR_NUMBER: ${{ github.event.pull_request.number }} | ||
run: | | ||
# Get the list of modified files in this pull request | ||
files=$(gh pr view $PR_NUMBER --json files --jq '.files.[].path') | ||
# Ignore loader changes if acknowledged | ||
if echo "$BODY" | egrep -qsi "Acknowledge-check:[[:space:]]*loader-change"; then | ||
exit 0 | ||
fi | ||
# Check for loader changes | ||
if echo "${files}" | grep -Eq "^src/loader/.+$"; then | ||
echo "Warning: This PR does change the loader. Therefore, upgrading to the next TimescaleDB" | ||
echo "version requires a restart of PostgreSQL. Please coordinate the release with the" | ||
echo "cloud team before merging." | ||
echo | ||
echo "After the release is coordinated, add:" | ||
echo "Acknowledge-check: loader-change" | ||
echo "to the PR message to acknowledge this warning" | ||
exit 1 | ||
fi |