chore: move ansible migration tests to nix flake check #1493
Merged
steve-chavez merged 2 commits intodevelopfrom Mar 25, 2025
Merged
chore: move ansible migration tests to nix flake check #1493steve-chavez merged 2 commits intodevelopfrom
steve-chavez merged 2 commits intodevelopfrom
Conversation
When running `flake check` there was an error: ``` error: undefined variable 'samrose' ``` Remove `maintainers = with maintainers; [ samrose ];` to solve this.
steve-chavez
commented
Mar 24, 2025
Comment on lines
-91
to
-108
| - 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 |
Member
Author
There was a problem hiding this comment.
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
steve-chavez
commented
Mar 25, 2025
|
|
||
| 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; |
Member
Author
There was a problem hiding this comment.
This create extension was removed because it's already included on
Line 5 in 9eaaa41
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
samrose
approved these changes
Mar 25, 2025
samrose
approved these changes
Mar 25, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.sqlis deletednix/test/prime.sqlAlso cleanup
ansible/tasks/test-image.yml: