-
-
Notifications
You must be signed in to change notification settings - Fork 10
feat: filter subscriptions by wal action #77
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
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
17bac1a
feat: filter subscriptions by wal action
edgurgel deb0005
chore: update upload-artifact GH action
edgurgel 660ddcf
chore: use ubuntu lts
edgurgel 7941afd
chore: try noble
edgurgel d3ba399
chore: try to use ubuntu's wal2json
edgurgel ad9fc0f
chore: oops:
edgurgel 17bed31
ubuntu latest
edgurgel 3e9e814
yolo
edgurgel 4632cbb
...
edgurgel b3916e1
chore: add test
edgurgel 7a6e5bd
chore: run tests using docker
edgurgel ac3f109
fix: fix test_action_filter test output
edgurgel bd25636
fixup! chore: run tests using docker
edgurgel eb9b89d
fix: rename test update action filter
edgurgel 7fa98b9
chore: add insert action filter
edgurgel b784953
chore: add delete action filter test
edgurgel 21be1ed
chore: remove unnecessary comment
edgurgel acd1660
chore: update README.md
edgurgel a0aad7d
chore: add any action filter test
edgurgel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| FROM supabase/postgres:17.6.1.054 | ||
|
|
||
| # Configure PostgreSQL for logical replication | ||
| RUN echo "wal_level = logical" >> /usr/share/postgresql/postgresql.conf.sample && \ | ||
| echo "max_replication_slots = 4" >> /usr/share/postgresql/postgresql.conf.sample && \ | ||
| echo "max_wal_senders = 4" >> /usr/share/postgresql/postgresql.conf.sample | ||
|
|
||
| # Set working directory for walrus | ||
| WORKDIR /walrus | ||
|
|
||
| # Copy the repository (will be mounted at runtime) | ||
| COPY . . | ||
|
|
||
| # Give postgres user ownership of /walrus | ||
| RUN chown -R postgres:postgres /walrus | ||
|
|
||
| # Create a test runner script that switches to postgres user | ||
| RUN echo '#!/bin/bash\n\ | ||
| set -e\n\ | ||
| echo "Initializing PostgreSQL data directory..."\n\ | ||
| su - postgres -c "initdb -D /var/lib/postgresql/data"\n\ | ||
| echo "Starting PostgreSQL..."\n\ | ||
| su - postgres -c "pg_ctl -D /var/lib/postgresql/data -l /var/lib/postgresql/logfile start"\n\ | ||
| echo "Waiting for PostgreSQL to be ready..."\n\ | ||
| until su - postgres -c "pg_isready" > /dev/null 2>&1; do\n\ | ||
| sleep 1\n\ | ||
| done\n\ | ||
| echo "PostgreSQL is ready!"\n\ | ||
| echo "Running tests..."\n\ | ||
| cd /walrus\n\ | ||
| set +e\n\ | ||
| su - postgres -c "cd /walrus && ./bin/installcheck"\n\ | ||
| TEST_EXIT=$?\n\ | ||
| set -e\n\ | ||
| echo "Tests completed with exit code: $TEST_EXIT"\n\ | ||
| echo ""\n\ | ||
| if [ $TEST_EXIT -ne 0 ]; then\n\ | ||
| echo "========================================"\n\ | ||
| echo "TEST FAILURES DETECTED"\n\ | ||
| echo "========================================"\n\ | ||
| echo ""\n\ | ||
| if [ -f /walrus/regression.out ]; then\n\ | ||
| echo "Contents of regression.out:"\n\ | ||
| echo "========================================"\n\ | ||
| cat /walrus/regression.out\n\ | ||
| echo "========================================"\n\ | ||
| fi\n\ | ||
| echo ""\n\ | ||
| if [ -f /walrus/regression.diffs ]; then\n\ | ||
| echo "Contents of regression.diffs:"\n\ | ||
| echo "========================================"\n\ | ||
| cat /walrus/regression.diffs\n\ | ||
| echo "========================================"\n\ | ||
| fi\n\ | ||
| fi\n\ | ||
| su - postgres -c "pg_ctl -D /var/lib/postgresql/data stop"\n\ | ||
| exit $TEST_EXIT\n\ | ||
| ' > /usr/local/bin/run-tests.sh && \ | ||
| chmod +x /usr/local/bin/run-tests.sh | ||
|
|
||
| CMD ["/usr/local/bin/run-tests.sh"] | ||
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| services: | ||
| walrus-test: | ||
| build: . | ||
| container_name: walrus-test | ||
| environment: | ||
| - POSTGRES_PASSWORD=postgres | ||
| - POSTGRES_USER=supabase_admin | ||
| - PG_USER=supabase_admin | ||
| - POSTGRES_DB=postgres | ||
| volumes: | ||
| - ./:/walrus | ||
| # Keep container running if you want to debug | ||
| # command: tail -f /dev/null |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| #!/bin/bash | ||
|
|
||
| set -e | ||
|
|
||
| echo "Building Docker image for Walrus tests..." | ||
| docker-compose build | ||
|
|
||
| echo "" | ||
| echo "Running Walrus tests in Docker..." | ||
| docker-compose run --rm walrus-test |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.