Skip to content

Commit

Permalink
Warn when PR may require regenerating cloud PG settings
Browse files Browse the repository at this point in the history
These generated Postgres settings JSON files can get out of sync causing
the control plane to reject updated to an endpoint or project's Postgres
settings.

Signed-off-by: Tristan Partin <[email protected]>
  • Loading branch information
tristan957 committed Dec 19, 2024
1 parent 9c53b41 commit 5bad197
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/regenerate-pg-setting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Regenerate Postgres Settings

on:
pull_request:
types:
- opened
- synchronize
- reopened
paths:
- pgxn/neon/**.c
- vendor/postgres-v*
- vendor/revisions.json

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true

permissions:
pull-requests: write

jobs:
regenerate-pg-settings:
runs-on: ubuntu-latest

Check failure on line 23 in .github/workflows/regenerate-pg-setting.yml

View workflow job for this annotation

GitHub Actions / actionlint

Please use 'ubuntu-22.04' instead of 'ubuntu-latest'

steps:
- name: Add comment
uses: thollander/actions-comment-pull-request@v3
with:
comment-tag: ${{ github.job }}
pr-number: ${{ github.event.number }}
message: |
If this PR added a GUC in the Postgres fork or `neon` extension,
please regenerate the Postgres settings in the `cloud` repo:
```
make NEON_WORKDIR=path/to/neon/checkout \
-C goapp/internal/shareddomain/postgres generate
```
If you're an external contributor, a Neon employee will assist in
making sure this step is done.

0 comments on commit 5bad197

Please sign in to comment.