-
-
Notifications
You must be signed in to change notification settings - Fork 163
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
chore: move ansible migration tests to nix flake check #1493
Conversation
When running `flake check` there was an error: ``` error: undefined variable 'samrose' ``` Remove `maintainers = with maintainers; [ samrose ];` to solve this.
- name: Remove specified extension files from extensions directory | ||
ansible.builtin.find: | ||
paths: /tmp/migrations/tests/extensions | ||
patterns: | ||
- '*timescaledb*.sql' | ||
- '*plv8*.sql' | ||
- '*postgis*.sql' | ||
- '*pgrouting*.sql' | ||
register: files_to_remove | ||
when: is_psql_oriole | ||
|
||
- name: Delete matched extension files | ||
ansible.builtin.file: | ||
path: "{{ item.path }}" | ||
state: absent | ||
loop: "{{ files_to_remove.files }}" | ||
when: is_psql_oriole | ||
become: yes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These exceptions from orioledb are now done properly using SQL on each test by checking if the orioledb extension is loaded. (there's no file removal needed)
68b905c
to
8b03541
Compare
|
||
BEGIN; | ||
-- address standardizer creates a table in extensions schema, owned by supabase_admin | ||
create extension if not exists address_standardizer_data_us with schema extensions; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This create extension
was removed because it's already included on
Line 5 in 9eaaa41
create extension if not exists address_standardizer_data_us; |
but the logic that tests the postgres role is able to select us_lex
is still preserved on the following lines.
migration tests are now run on `nix flake check`: - tests for some extensions are adjusted to run conditionally on non-orioledb + preserves behavior from the ansible tests - ebssurrogate/files/unit-tests/unit-test-01.sql are deleted + these tests are already included nix/test/prime.sql cleanup ansible/tasks/test-image.yml: - remove pg_prove since it's no longer used - remove unit tests since the same logic is already included nix/tests/prime.sql - remove migration tests since it's now tested with nix flake check
8b03541
to
e51eb94
Compare
Problem
Currently the ansible migration tests are only done on CI, and this takes about 52 mins, which is terrible for development speed.
This is also needed for passing CI failures on #1489. Also related to #1492.
Solution
Migration tests are now run on
nix flake check
, which can be used locally and on CI.ebssurrogate/files/unit-tests/unit-test-01.sql
is deletednix/test/prime.sql
Also cleanup
ansible/tasks/test-image.yml
: