Fix enable_job_execution_logging
GUC context
#19641
Workflow file for this run
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
name: Pull Request Validation | |
"on": | |
pull_request: | |
types: [opened, synchronize, reopened, edited, auto_merge_enabled, auto_merge_disabled] | |
branches: [main] | |
jobs: | |
# Count the number of commits in a pull request. This can be | |
# disabled by adding a trailer line of the following form to the | |
# pull request message: | |
# | |
# Disable-Check: commit-count | |
# | |
# The check is case-insensitive and ignores other contents on the | |
# line as well, so it is possible to add several different checks if | |
# that is necessary. | |
# | |
# It is assumed that the trailer is following RFC2822 conventions, | |
# but this is currently not enforced. | |
count_commits: | |
name: Enforce single commit pull request | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
fetch-depth: 0 | |
- name: Dump GitHub context (for debugging) | |
env: | |
GITHUB_CONTEXT: ${{ toJSON(github) }} | |
run: | | |
echo "GITHUB_CONTEXT: $GITHUB_CONTEXT" | |
- name: Check number of commits | |
shell: bash --norc --noprofile {0} | |
env: | |
BODY: ${{ github.event.pull_request.body }} | |
run: | | |
echo "$BODY" | egrep -qsi '^disable-check:.*\<commit-count\>' | |
if [[ $? -ne 0 ]] && [[ "${{ github.event.pull_request.auto_merge.merge_method }}" != "squash" ]] | |
then | |
base=${{ github.event.pull_request.base.sha }} | |
head=${{ github.event.pull_request.head.sha }} | |
count=`git rev-list --count $base..$head` | |
if [[ "$count" -ne 1 ]]; then | |
echo "Found $count commits in pull request (there should be only one):" | |
git log --format=format:'- %h %s' $base..$head | |
echo | |
echo "To disable commit count, add this trailer to pull request message:" | |
echo | |
echo "Disable-check: commit-count" | |
echo | |
echo "Trailers follow RFC2822 conventions, so no whitespace" | |
echo "before field name and the check is case-insensitive for" | |
echo "both the field name and the field body." | |
exit 1 | |
fi | |
fi | |
check_loader_change: | |
name: Check for loader changes | |
# Ignore loader changes if acknowledged already | |
if: ${{ !contains(github.event.pull_request.labels.*.name, 'upgrade-requires-restart') }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v4 | |
- name: Check if the pull request changes the loader | |
shell: bash --norc --noprofile {0} | |
env: | |
BODY: ${{ github.event.pull_request.body }} | |
GH_TOKEN: ${{ github.token }} | |
PR_NUMBER: ${{ github.event.pull_request.number }} | |
run: | | |
echo "$BODY" | egrep -qsi '^disable-check:.*\<loader-change\>' | |
if [[ $? -ne 0 ]]; then | |
# Get the list of modified files in this pull request | |
files=$(gh pr view $PR_NUMBER --json files --jq '.files.[].path') | |
# Check for loader changes | |
if echo "${files}" | grep -Eq "^src/loader/.+$"; then | |
echo "Warning: This PR changes the loader. Therefore, upgrading to the next TimescaleDB" | |
echo "version requires a restart of PostgreSQL. Make sure to bump the loader version if" | |
echo "necessary and coordinate the release with the cloud team before merging." | |
echo | |
echo "After the release is coordinated, add the 'upgrade-requires-restart' label" | |
echo "to the PR to acknowledge this warning." | |
echo | |
echo "To disable this check, add this trailer to pull request message:" | |
echo | |
echo "Disable-check: loader-change" | |
echo | |
exit 1 | |
fi | |
fi | |