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

Sam/oriole17 flake check #1399

Merged
merged 24 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
5992298
chore: WIP check harness
samrose Jan 3, 2025
d674b4f
chore: consolidate start-server/start-client
samrose Jan 6, 2025
0f31d4e
chore: consolidate start-server, start-client and check harness
samrose Jan 7, 2025
84e8c04
chore: rm dup cleanup
samrose Jan 7, 2025
2b99b04
chore: do not run pg with overmin, just pg_ctl in daemon mode
samrose Jan 7, 2025
d04658b
chore: deprecate x86_64-darwin and run check on oriole17
samrose Jan 7, 2025
924ce92
wip toward fixing for all systems
samrose Jan 7, 2025
a247689
chore: refactoring to create reusable makePostgresDevSetup
samrose Jan 8, 2025
4aa8866
chore: tweaks to run-server.sh.in top account for oriole on macos
samrose Jan 8, 2025
7ec67a7
chore: remove x86_64-darwin support
samrose Jan 8, 2025
bd401ea
Isolate failing tests on pg17 and OrioleDB (#1402)
olirice Jan 9, 2025
3d34484
chore: getting pg tap tests and pg_regress tests to run for pg_15 and…
samrose Jan 10, 2025
4207e4f
chore: do not build or cache pg 16 for now
samrose Jan 10, 2025
787c9af
chore: wip running pgtap and pgreress tests + rm pg 16 for now
samrose Jan 10, 2025
52dd892
chore: fix tests to account for architecture differences3
samrose Jan 10, 2025
76b2178
chore: deactivate tests and builds for pg 16
samrose Jan 10, 2025
7a7c40d
chore: will pull pg 16 from vars in future pr
samrose Jan 10, 2025
bb1f017
chore: update to unit test in ansible build include pg_grapqhl and pg…
samrose Jan 11, 2025
013d96b
chore: also include pgrouting and postgis in orioledb test
samrose Jan 11, 2025
7879259
chore: tmp deactivate postgis on this test
samrose Jan 13, 2025
6226d61
chore: rm from list of exts in test too
samrose Jan 13, 2025
c8796e3
chore: was missing KEY_FILE var in script
samrose Jan 14, 2025
0a96d38
chore: deprecate 16 from versions
samrose Jan 14, 2025
97330e8
Merge branch 'develop' into sam/oriole17-flake-check
samrose Jan 14, 2025
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
2 changes: 0 additions & 2 deletions .github/workflows/nix-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ jobs:
arch: arm64
- runner: macos-latest
arch: arm64
- runner: macos-13
arch: amd64
runs-on: ${{ matrix.runner }}
timeout-minutes: 180
steps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ do $$
declare
extoid oid := (select oid from pg_extension where extname = 'pgmq');
r record;
cls pg_class%rowtype;
begin

set local search_path = '';

/*
Expand Down Expand Up @@ -136,15 +138,36 @@ alter extension pgmq add function pgmq.drop_queue;


update pg_extension set extowner = 'postgres'::regrole where extname = 'pgmq';

for r in (select * from pg_depend where refobjid = extoid) loop


if r.classid = 'pg_type'::regclass then
execute(format('alter type %s owner to postgres;', r.objid::regtype));

-- store the type's relkind
select * into cls from pg_class c where c.reltype = r.objid;

if r.objid::regtype::text like '%[]' then
-- do nothing (skipping array type)

elsif cls.relkind in ('r', 'p', 'f', 'm') then
-- table-like objects (regular table, partitioned, foreign, materialized view)
execute format('alter table pgmq.%I owner to postgres;', cls.relname);

else
execute(format('alter type %s owner to postgres;', r.objid::regtype));

end if;

elsif r.classid = 'pg_proc'::regclass then
execute(format('alter function %s(%s) owner to postgres;', r.objid::regproc, pg_get_function_identity_arguments(r.objid)));

elsif r.classid = 'pg_class'::regclass then
execute(format('alter table %s owner to postgres;', r.objid::regclass));

else
raise exception 'error on pgmq after-create script: unexpected object type %', r.classid;

end if;
end loop;
end $$;
29 changes: 2 additions & 27 deletions ansible/tasks/test-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
- name: Remove specified extensions from SQL file
ansible.builtin.command:
cmd: >
sed -i '/\\ir.*\(timescaledb\|postgis\|pgrouting\|plv8\|pg_jsonschema\|pg_graphql\).*\.sql/d' /tmp/migrations/tests/extensions/test.sql
sed -i '/\\ir.*\(timescaledb\|postgis\|pgrouting\|plv8\).*\.sql/d' /tmp/migrations/tests/extensions/test.sql
when: is_psql_oriole
become: yes

Expand All @@ -76,11 +76,9 @@
paths: /tmp/migrations/tests/extensions
patterns:
- '*timescaledb*.sql'
- '*plv8*.sql'
- '*postgis*.sql'
- '*pgrouting*.sql'
- '*plv8*.sql'
- '*pg_jsonschema*.sql'
- '*pg_graphql*.sql'
register: files_to_remove
when: is_psql_oriole

Expand All @@ -91,29 +89,6 @@
loop: "{{ files_to_remove.files }}"
when: is_psql_oriole
become: yes

- name: Remove specified extensions from SQL file
ansible.builtin.command:
cmd: >
sed -i "/'pg_graphql',/d" /tmp/unit-tests/unit-test-01.sql
when: is_psql_oriole
become: yes

- name: Remove graphql schema test
lineinfile:
path: /tmp/migrations/tests/database/exists.sql
regexp: "^SELECT has_schema\\('graphql'\\);$"
state: absent
become: yes
when: is_psql_oriole

- name: Remove graphql schema test
lineinfile:
path: /tmp/migrations/tests/database/exists.sql
regexp: "^SELECT has_schema\\('graphql_public'\\);$"
state: absent
become: yes
when: is_psql_oriole

- name: Run Unit tests (with filename unit-test-*) on Postgres Database
shell: /usr/bin/pg_prove -U postgres -h localhost -d postgres -v /tmp/unit-tests/unit-test-*.sql
Expand Down
6 changes: 2 additions & 4 deletions ansible/vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@ async_mode: true

postgres_major:
- "15"
- "16"
- "orioledb-17"

# Full version strings for each major version
postgres_release:
postgresorioledb-17: "17.0.1.017-orioledb"
postgres15: "15.8.1.027"
postgres16: "16.3.1.033"
postgresorioledb-17: "17.0.1.018-orioledb"
postgres15: "15.8.1.028"

# Non Postgres Extensions
pgbouncer_release: "1.19.0"
Expand Down
18 changes: 3 additions & 15 deletions docker/nix/build_nix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,33 +9,21 @@ fi
SYSTEM=$(nix-instantiate --eval -E builtins.currentSystem | tr -d '"')

nix build .#checks.$SYSTEM.psql_15 -L --no-link
nix build .#checks.$SYSTEM.psql_16 -L --no-link

nix build .#checks.$SYSTEM.psql_orioledb-17 -L --no-link
nix build .#psql_15/bin -o psql_15
nix build .#psql_16/bin -o psql_16

# Skip orioledb-17 on x86_64-darwin
if [ "$SYSTEM" != "x86_64-darwin" ]; then
nix build .#psql_orioledb-17/bin -o psql_orioledb_17
fi
nix build .#psql_orioledb-17/bin -o psql_orioledb_17

# Copy to S3
nix copy --to s3://nix-postgres-artifacts?secret-key=nix-secret-key ./psql_15
nix copy --to s3://nix-postgres-artifacts?secret-key=nix-secret-key ./psql_16
if [ "$SYSTEM" != "x86_64-darwin" ]; then
nix copy --to s3://nix-postgres-artifacts?secret-key=nix-secret-key ./psql_orioledb_17
fi
nix copy --to s3://nix-postgres-artifacts?secret-key=nix-secret-key ./psql_orioledb_17
if [ "$SYSTEM" = "aarch64-linux" ]; then
nix build .#postgresql_15_debug -o ./postgresql_15_debug
nix build .#postgresql_15_src -o ./postgresql_15_src
nix build .#postgresql_16_debug -o ./postgresql_16_debug
nix build .#postgresql_16_src -o ./postgresql_16_src
nix build .#postgresql_orioledb-17_debug -o ./postgresql_orioledb-17_debug
nix build .#postgresql_orioledb-17_src -o ./postgresql_orioledb-17_src
nix copy --to s3://nix-postgres-artifacts?secret-key=nix-secret-key ./postgresql_15_debug-debug
nix copy --to s3://nix-postgres-artifacts?secret-key=nix-secret-key ./postgresql_15_src
nix copy --to s3://nix-postgres-artifacts?secret-key=nix-secret-key ./postgresql_16_debug-debug
nix copy --to s3://nix-postgres-artifacts?secret-key=nix-secret-key ./postgresql_16_src
nix copy --to s3://nix-postgres-artifacts?secret-key=nix-secret-key ./postgresql_orioledb-17_debug-debug
nix copy --to s3://nix-postgres-artifacts?secret-key=nix-secret-key ./postgresql_orioledb-17_src
fi
Loading
Loading