Compare commits

...

8 Commits

Author SHA1 Message Date
Heikki Linnakangas
4dfbb54b60 test going backwards
this should fail
2024-09-20 14:44:22 +03:00
Heikki Linnakangas
4a2f0f4496 also remove the 'branch'
Without 'branch', it will only check for "forward progress"x
2024-09-20 14:37:58 +03:00
Heikki Linnakangas
0701935994 remove first_parent=true
that's not what we want. The submodule is allowed to be *ahead* of the
current REL_*_STABLE_neon branch.
2024-09-20 14:22:10 +03:00
Heikki Linnakangas
0cd871f28c test submodule check, do not merge
this is supposed to pass the test
2024-09-20 13:36:37 +03:00
Heikki Linnakangas
67efddc391 Only run the submodule checks if anything in vendor/** changed
Because the checks are fairly expensive, taking about 4 minutes.
2024-09-20 13:33:36 +03:00
Heikki Linnakangas
e7e351377e Switch to existing jtmullen/submodule-branch-check-action 2024-09-20 12:49:23 +03:00
Heikki Linnakangas
d8851806b7 Try to use a composite action to reduce duplication 2024-09-20 12:49:23 +03:00
Heikki Linnakangas
485eada701 Add a check that vendor/postgres-* submodules are up-to-date (#8949)
We frequently mess up our submodule references. This adds one
safeguard: it checks that the submodule references point to the
corresponding REL_*_STABLE_neon branches, or to some commit descending
from them.

As next step, I'm thinking that we should automate things so that when
you merge a PR to the 'neon' repository that updates the submodule
references, the REL_*_STABLE_neon branches are automatically updated
to match the submodule references. That way, you never need to
manually merge PRs in the postgres repository, it's all triggered from
commits in the 'neon' repository. But that's not included here.
2024-09-20 12:49:23 +03:00
2 changed files with 55 additions and 1 deletions

View File

@@ -120,6 +120,59 @@ jobs:
- name: Run mypy to check types
run: poetry run mypy .
# Check that the vendor/postgres-* submodules point to the
# corresponding REL_*_STABLE_neon branches.
check-submodules:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- uses: dorny/paths-filter@v3
id: check-if-submodules-changed
with:
filters: |
vendor:
- 'vendor/**'
- name: Check vendor/postgres-v14 submodule reference
if: steps.check-if-submodules-changed.outputs.vendor == 'true'
uses: jtmullen/submodule-branch-check-action@v1
with:
path: "vendor/postgres-v14"
fetch_depth: "50"
sub_fetch_depth: "50"
pass_if_unchanged: true
- name: Check vendor/postgres-v15 submodule reference
if: steps.check-if-submodules-changed.outputs.vendor == 'true'
uses: jtmullen/submodule-branch-check-action@v1
with:
path: "vendor/postgres-v15"
fetch_depth: "50"
sub_fetch_depth: "50"
pass_if_unchanged: true
- name: Check vendor/postgres-v16 submodule reference
if: steps.check-if-submodules-changed.outputs.vendor == 'true'
uses: jtmullen/submodule-branch-check-action@v1
with:
path: "vendor/postgres-v16"
fetch_depth: "50"
sub_fetch_depth: "50"
pass_if_unchanged: true
- name: Check vendor/postgres-v17 submodule reference
if: steps.check-if-submodules-changed.outputs.vendor == 'true'
uses: jtmullen/submodule-branch-check-action@v1
with:
path: "vendor/postgres-v17"
fetch_depth: "50"
sub_fetch_depth: "50"
pass_if_unchanged: true
check-codestyle-rust:
needs: [ check-permissions, build-build-tools-image ]
strategy:
@@ -1152,6 +1205,7 @@ jobs:
# Usually we do `needs: [...]`
needs:
- build-and-test-locally
- check-submodules
- check-codestyle-python
- check-codestyle-rust
- promote-images