Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent unintentional Postgres submodule update #4692

Merged
merged 5 commits into from
Jul 12, 2023

Conversation

bayandin
Copy link
Member

@bayandin bayandin commented Jul 12, 2023

Problem

Postgres submodule can be changed unintentionally, and these changes are easy to miss during the review.
Adding a check that should prevent this from happening, the check fails build-neon job with the following message:

Expected postgres-v14 rev to be at '1414141414141414141414141414141414141414', but it is at '1144aee1661c79eec65e784a8dad8bd450d9df79'
Expected postgres-v15 rev to be at '1515151515151515151515151515151515151515', but it is at '1984832c740a7fa0e468bb720f40c525b652835d'
Please update vendors/revisions.json if these changes are intentional.

This is an alternative approach to #4603

Summary of changes

  • Add vendor/revisions.json file with expected revisions
  • Add built-time check (to build-neon job) that Postgres submodules match revisions from vendor/revisions.json
  • A couple of small improvements for logs from Add Postgres commit sha to Postgres version #4603
  • Fixed GitHub autocomment for no tests was run case

Checklist before requesting a review

  • I have performed a self-review of my code.
  • If it is a core feature, I have added thorough tests.
  • Do we need to implement analytics? if so did you add the relevant metrics to the dashboard?
  • If this PR requires public announcement, mark it with /release-notes label and add several sentences in this section.

Checklist before merging

  • Do not forget to reformat commit message to not include the above checklist

@bayandin bayandin requested a review from koivunej July 12, 2023 10:56
@bayandin bayandin requested review from a team as code owners July 12, 2023 10:56
@bayandin bayandin requested review from knizhnik and removed request for a team July 12, 2023 10:56
@bayandin bayandin force-pushed the bayandin/add-postgres-version-test2 branch from 72fa961 to 1f9ccc8 Compare July 12, 2023 11:03
bayandin and others added 2 commits July 12, 2023 12:05
before: `Timed out while waiting for WAL record at LSN ... to
arrive, last_record_lsn ... disk consistent LSN=...,
WalReceiver status: WalReceiver status: disconnected`

after: `Timed out while waiting for WAL record at LSN ... to
arrive, last_record_lsn ... disk consistent LSN=...,
WalReceiver status: disconnected`
@bayandin bayandin force-pushed the bayandin/add-postgres-version-test2 branch from 1f9ccc8 to f52daf1 Compare July 12, 2023 11:05
@bayandin bayandin force-pushed the bayandin/add-postgres-version-test2 branch from f52daf1 to 0b8f032 Compare July 12, 2023 11:08
@github-actions
Copy link

github-actions bot commented Jul 12, 2023

1028 tests run: 976 passed, 0 failed, 52 skipped (full report)


Flaky tests (2)

Postgres 15

  • test_remote_storage_upload_queue_retries[local_fs]: release

Postgres 14

  • test_threshold_based_eviction: debug

Copy link
Member

@koivunej koivunej left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's test this still with wrong commits but I can't see why it wouldn't work. You beat me to it :) Maybe add just revert 9169c99 so others will see this was tested...?

@bayandin
Copy link
Member Author

Let's test this still with wrong commits but I can't see why it wouldn't work. You beat me to it :) Maybe add just revert 9169c99 so others will see this was tested...?

Here's an example of failed step:

Expected postgres-v14 rev to be at '1414141414141414141414141414141414141414', but it is at '1144aee1661c79eec65e784a8dad8bd450d9df79'
Expected postgres-v15 rev to be at '1515151515151515151515151515151515151515', but it is at '1984832c740a7fa0e468bb720f40c525b652835d'
Please update vendors/revisions.json if these changes are intentional

@bayandin bayandin force-pushed the bayandin/add-postgres-version-test2 branch from 91bec0d to 8a3968f Compare July 12, 2023 12:33
@bayandin bayandin merged commit ed845b6 into main Jul 12, 2023
@bayandin bayandin deleted the bayandin/add-postgres-version-test2 branch July 12, 2023 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants