Enhancements to GaussDB CI and Logical Replication Testing#17
Merged
liubao68 merged 4 commits intoHuaweiCloudDeveloper:masterfrom Aug 27, 2025
Merged
Enhancements to GaussDB CI and Logical Replication Testing#17liubao68 merged 4 commits intoHuaweiCloudDeveloper:masterfrom
liubao68 merged 4 commits intoHuaweiCloudDeveloper:masterfrom
Conversation
added 4 commits
August 17, 2025 20:57
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.
Description
This pull request introduces several improvements to the GaussDB project, focusing on enhancing the CI pipeline and adding comprehensive testing for logical replication and decoding. The changes include splitting the GitHub Actions workflow into dedicated pipelines for
gaussdb,gaussdb_pool, andisort-gaussdb, adding robust pytest-based tests for logical replication, improving the reliability of replication-slot tests, and ensuring proper resource management in thetest_detailsfunction using a context manager. These updates aim to improve build consistency, test reliability, and maintainability.Changes
release.ymlinto three separate workflows:release-gaussdb.yml,release-gaussdb-pool.yml, andrelease-isort-gaussdb.yml.release-gaussdb-pool.yml(formerlyrelease.yml) to trigger onpool-v*.*.*tags and build onlygaussdb_pool.release-gaussdb.ymlto buildgaussdbonv*.*.*tags.release-isort-gaussdb.ymlto buildisort-gaussdbonisort-v*.*.*tags.tests/test_logical_decoding.pywith pytest-based tests for logical replication slot creation, data insertion, updates, deletion, and slot removal.setup_env).tests/test_column.pyto use a context manager for cursor handling intest_detailsand ensure transaction rollback.Details
release.ymlwas renamed torelease-gaussdb-pool.ymland updated to focus ongaussdb_poolbuilds, triggered bypool-v*.*.*tags. It now only processes thegaussdb_pool/dist/directory.release-gaussdb.ymlandrelease-isort-gaussdb.yml) were added to handle builds forgaussdb(onv*.*.*tags) andisort-gaussdb(onisort-v*.*.*tags), respectively.setuptools,wheel,build), builds the respective package, collects artifacts inall_dist/, and uploads to GitHub Releases and PyPI using thePYPI_API_TOKEN.release-gaussdb-pool.yml(4 additions, 15 deletions), 56 additions each inrelease-gaussdb.ymlandrelease-isort-gaussdb.yml.tests/test_logical_decoding.pywith 148 lines of new code.pg_create_logical_replication_slot.pg_logical_slot_get_changes.setup_env) ensures a clean environment by creating/dropping a schema (my_schema) and table (test01) withREPLICA IDENTITY FULL.test_logical_decoding.pyare made robust by:_cleanup_slot_and_schemato ensure no leftover slots or schemas interfere with tests.test_details:tests/test_column.py(8 additions, 3 deletions) to wrap the cursor in awithstatement for automatic resource cleanup.conn.rollback()within atry-exceptblock to handle transaction cleanup gracefully.Testing
v1.0.0,pool-v1.0.0,isort-v1.0.0) to verify each workflow builds the correct package and uploads to GitHub Releases and PyPI.ls -loutput to confirmdist/directory contents.pytest tests/test_logical_decoding.pyto confirm all tests pass, verifying slot creation, data changes (insert, update, delete), and slot removal.setup_envfixture isolates tests by cleaning up schemas and tables.test_details:pytest tests/test_column.pyto validate cursor cleanup and transaction rollback.try-exceptblock handles exceptions.