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

Add regression tests for a cloud-based Neon instance #8681

Merged
merged 123 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from 81 commits
Commits
Show all changes
123 commits
Select commit Hold shift + click to select a range
418ccba
First attempt
a-masterov Aug 9, 2024
82ba115
Add regress.so to the image
a-masterov Aug 9, 2024
224564e
Merge branch 'main' into amasterov/regress-arm
a-masterov Aug 14, 2024
1dba884
Add regress.so to the image
a-masterov Aug 14, 2024
e42dbae
Add regress.so to the image
a-masterov Aug 14, 2024
236e855
renew patches
a-masterov Aug 14, 2024
95ef3e8
renew patches
a-masterov Aug 14, 2024
5315a78
renew patches
a-masterov Aug 15, 2024
8e90dba
renew patches
a-masterov Aug 16, 2024
b1c5330
Merge branch 'main' into amasterov/regress-arm
a-masterov Aug 16, 2024
fc89b66
renew patches
a-masterov Aug 20, 2024
362f411
renew patches
a-masterov Aug 22, 2024
9b0e277
New patch
a-masterov Aug 28, 2024
b3d90a7
Merge branch 'main' into amasterov/regress-arm
a-masterov Aug 29, 2024
0c6b34b
New patch
a-masterov Aug 30, 2024
8fb8ec5
Add python script, rename patch file
a-masterov Aug 30, 2024
e2921e3
Change the patch file
a-masterov Sep 2, 2024
d4f656d
Change the python file
a-masterov Sep 2, 2024
5a4a2ae
Fix the trailing space
a-masterov Sep 2, 2024
ecf20bb
Add the workflow file
a-masterov Sep 3, 2024
8959cb1
change on:
a-masterov Sep 3, 2024
e8775dd
Add patch
a-masterov Sep 4, 2024
1645011
Fix a syntax error
a-masterov Sep 4, 2024
6b5d33d
debug
a-masterov Sep 4, 2024
a07fda3
debug
a-masterov Sep 4, 2024
b2af44f
debug
a-masterov Sep 4, 2024
173aef9
directory change
a-masterov Sep 4, 2024
c7dde2e
fix an obvious error
a-masterov Sep 4, 2024
c14d53b
debug
a-masterov Sep 4, 2024
6ff6843
add submodules
a-masterov Sep 4, 2024
d143822
update patches
a-masterov Sep 4, 2024
4104b1c
Add CONNSTR
a-masterov Sep 4, 2024
c34323e
Fix the test selection
a-masterov Sep 4, 2024
f7f0be8
Temporary disable the extension.
a-masterov Sep 4, 2024
61f3ac3
change path
a-masterov Sep 4, 2024
bc1697a
change path
a-masterov Sep 4, 2024
302a220
change path
a-masterov Sep 4, 2024
777c019
fix
a-masterov Sep 4, 2024
9414976
uncomment the extension creation
a-masterov Sep 4, 2024
2e1725c
modify the patch
a-masterov Sep 5, 2024
f8c9966
modify the patch
a-masterov Sep 5, 2024
bfb7bf9
fix linters' warnings
a-masterov Sep 5, 2024
288388f
remove the temp script
a-masterov Sep 5, 2024
9e61284
fix mypy warnings
a-masterov Sep 5, 2024
e8676ff
Remove regress.so form image as we use the extension for this now
a-masterov Sep 5, 2024
99f9ab2
Fix regex
a-masterov Sep 5, 2024
afd25c8
Get rid of redundant local variables
a-masterov Sep 5, 2024
b54a919
Fix Line
a-masterov Sep 5, 2024
7a324f8
Fix Line
a-masterov Sep 5, 2024
e4dc7fe
Remove running the cloud test on a pull request
a-masterov Sep 5, 2024
226464e
Fix format
a-masterov Sep 5, 2024
815d7d6
Merge branch 'main' into amasterov/regress-arm
a-masterov Sep 5, 2024
243db8a
Some refactoring
a-masterov Sep 5, 2024
8bb0e97
Some refactoring
a-masterov Sep 6, 2024
195c7a3
Some refactoring
a-masterov Sep 6, 2024
74eec88
Some refactoring
a-masterov Sep 6, 2024
6140e3b
Some refactoring
a-masterov Sep 6, 2024
c7d9eda
Some refactoring
a-masterov Sep 6, 2024
0510676
Some refactoring
a-masterov Sep 6, 2024
7cd76ee
add an allure report and slack posting
a-masterov Sep 6, 2024
6f6d5f1
Add AWS access keys
a-masterov Sep 6, 2024
222f483
Add a debug
a-masterov Sep 6, 2024
a8d1cbe
Change the directories calculation
a-masterov Sep 6, 2024
6d66a2e
Fix an error in the path
a-masterov Sep 6, 2024
d0cf670
Fix an error in the path
a-masterov Sep 6, 2024
6c679f7
Fix an error in the path
a-masterov Sep 6, 2024
ebdd187
Fix an error in the path
a-masterov Sep 6, 2024
c7f2a26
Revert "Fix an error in the path"
a-masterov Sep 6, 2024
2098184
Revert "Revert "Fix an error in the path""
a-masterov Sep 6, 2024
ac72832
Change the runner
a-masterov Sep 6, 2024
e54f8bc
Change the workdir to test_output_dir
a-masterov Sep 6, 2024
9d8ba21
make the test fail for debug purposes
a-masterov Sep 6, 2024
7469656
Add regression.out to allure reports
a-masterov Sep 6, 2024
8a00cc8
Revert "make the test fail for debug purposes"
a-masterov Sep 6, 2024
6f2d7b4
Try to avoid passwords in clean text
a-masterov Sep 9, 2024
1300668
Fix an error
a-masterov Sep 9, 2024
3b6449f
Fix an error
a-masterov Sep 9, 2024
b4d9632
Fix an error
a-masterov Sep 9, 2024
b7fd9e5
Fix an error
a-masterov Sep 9, 2024
c29f78a
Fix errors
a-masterov Sep 9, 2024
650fb7b
Drop subscriptions if exist
a-masterov Sep 9, 2024
287e05f
Fix the error
a-masterov Sep 9, 2024
b04995f
Fix the security problem
a-masterov Sep 9, 2024
e127e97
Fix the security problem
a-masterov Sep 9, 2024
b74d463
Update the patch
a-masterov Sep 9, 2024
c7157d1
Update the patch
a-masterov Sep 9, 2024
84ca400
We are going to calculate md5 sum dynamically
a-masterov Sep 10, 2024
e989bf1
remove unused import os
a-masterov Sep 10, 2024
01c37c6
Refactor, delete roles accidentally left into a project
a-masterov Sep 10, 2024
dbde226
Add debug
a-masterov Sep 10, 2024
fe8fee0
Add debug
a-masterov Sep 10, 2024
841b39f
Some refactoring
a-masterov Sep 10, 2024
9ac06ea
Debug
a-masterov Sep 10, 2024
c4d9891
Refactoring
a-masterov Sep 10, 2024
b45560d
Fix the error
a-masterov Sep 10, 2024
f8b9ec0
Merge branch 'main' into amasterov/regress-arm
a-masterov Sep 10, 2024
8b04fc4
Fix the complains
a-masterov Sep 10, 2024
9b6e469
Update .github/workflows/cloud-regress.yml
a-masterov Sep 17, 2024
f4493a6
Refactor the workflow
a-masterov Sep 17, 2024
7601639
Fix the actionlint warnings
a-masterov Sep 17, 2024
81e1001
Fix add mask
a-masterov Sep 17, 2024
caaa399
an attempt
a-masterov Sep 17, 2024
b2a8d96
an attempt
a-masterov Sep 17, 2024
cdd6a97
an attempt
a-masterov Sep 18, 2024
0ec1d6f
an attempt
a-masterov Sep 18, 2024
24431cf
Finally add the mask
a-masterov Sep 18, 2024
234d328
Switch the submodule branch for tests
a-masterov Sep 18, 2024
d753fd9
tc
a-masterov Sep 18, 2024
46348cf
Revert "tc"
a-masterov Sep 18, 2024
9353b8e
Revert "Switch the submodule branch for tests"
a-masterov Sep 18, 2024
bf008b8
Merge branch 'main' into amasterov/regress-arm
a-masterov Sep 18, 2024
f08e6ab
change submodules
a-masterov Sep 18, 2024
6b90ea8
Update .github/workflows/cloud-regress.yml
a-masterov Sep 18, 2024
72c99f8
Clarify ambiguous messages and comments
a-masterov Sep 18, 2024
feb6eaa
change local branch
a-masterov Sep 19, 2024
0e21105
Revert "change submodules"
a-masterov Sep 19, 2024
494c60f
Revert "change local branch"
a-masterov Sep 19, 2024
df92c40
Merge branch 'main' into amasterov/regress-arm
a-masterov Sep 19, 2024
e530b6e
Merge branch 'main' into amasterov/regress-arm
a-masterov Sep 20, 2024
a655f16
A workaround was removed, TODO comments added.
a-masterov Sep 23, 2024
c520743
Merge branch 'main' into amasterov/regress-arm
a-masterov Sep 23, 2024
04f06b6
Remove running on push, amend schedule
a-masterov Sep 23, 2024
0bbe5c4
Fix some minor errors
a-masterov Sep 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 100 additions & 0 deletions .github/workflows/cloud-regress.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: Cloud Regression Test
on:
push:
branches: [amasterov/regress-arm]
a-masterov marked this conversation as resolved.
Show resolved Hide resolved
schedule:
# * is a special character in YAML so you have to quote this string
# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
# │ │ ┌───────────── day of the month (1 - 31)
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
- cron: '0 3 * * *' # run once a day, timezone is utc
workflow_dispatch: # adds ability to run this manually

defaults:
run:
shell: bash -euxo pipefail {0}

concurrency:
# Allow only one workflow per any non-`main` branch.
a-masterov marked this conversation as resolved.
Show resolved Hide resolved
group: ${{ github.workflow }}
cancel-in-progress: true

jobs:
regress:
strategy:
fail-fast: false
matrix:
include:
- DEFAULT_PG_VERSION: 16
a-masterov marked this conversation as resolved.
Show resolved Hide resolved
env:
POSTGRES_DISTRIB_DIR: /tmp/neon/pg_install
DEFAULT_PG_VERSION: ${{ matrix.DEFAULT_PG_VERSION }}
TEST_OUTPUT: /tmp/test_output
BUILD_TYPE: remote
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_DEV }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_KEY_DEV }}

runs-on: us-east-2
container:
image: neondatabase/build-tools:pinned
lubennikovaav marked this conversation as resolved.
Show resolved Hide resolved
options: --init

steps:
- uses: actions/checkout@v4
with:
submodules: true

- name: Patch the test
run: |
cd /__w/neon/neon/vendor/postgres-v${{ matrix.DEFAULT_PG_VERSION }}
a-masterov marked this conversation as resolved.
Show resolved Hide resolved
patch -p1 < ../../patches/cloud_regress_pg${{ matrix.DEFAULT_PG_VERSION }}.patch

- name: Generate a random password
id: pwgen
run: |
DBPASS=$(dd if=/dev/random bs=48 count=1 2>/dev/null | base64)
echo DBPASS="${DBPASS//\//}" >> "${GITHUB_OUTPUT}"
a-masterov marked this conversation as resolved.
Show resolved Hide resolved

- name: Change tests according to the generated password
run: |
cd /__w/neon/neon/vendor/postgres-v"${{ matrix.DEFAULT_PG_VERSION }}"/src/test/regress
for fname in sql/*.sql expected/*.out; do
sed -i.bak s/NEON_PASSWORD_PLACEHOLDER/"'${{ steps.pwgen.outputs.DBPASS }}'"/ "${fname}"
done

- name: Download Neon artifact
uses: ./.github/actions/download
with:
name: neon-${{ runner.os }}-${{ runner.arch }}-release-artifact
path: /tmp/neon/
prefix: latest

- name: Run the regression tests
uses: ./.github/actions/run-python-test-set
with:
build_type: ${{ env.BUILD_TYPE }}
test_selection: cloud_regress
pg_version: ${{ env.DEFAULT_PG_VERSION }}
extra_params: -m remote_cluster
env:
BENCHMARK_CONNSTR: ${{ secrets.PG_REGRESS_CONNSTR }}
lubennikovaav marked this conversation as resolved.
Show resolved Hide resolved

- name: Create Allure report
id: create-allure-report
if: ${{ !cancelled() }}
uses: ./.github/actions/allure-report-generate

- name: Post to a Slack channel
if: ${{ github.event.schedule && failure() }}
uses: slackapi/slack-github-action@v1
with:
channel-id: "C033QLM5P7D" # on-call-staging-stream
slack-message: |
Periodic regression testing: ${{ job.status }}
a-masterov marked this conversation as resolved.
Show resolved Hide resolved
<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|GitHub Run>
<${{ steps.create-allure-report.outputs.report-url }}|Allure report>
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}

Loading
Loading