Repository navigation
Conversation
No CI workflow runs the Python unit tests of gpMgmt. unittest-check runs only the C unit tests, and the Python tests need mock, which only the Behave workflow installs (from gpMgmt/requirements-dev.txt). Let a Behave matrix entry list unittest_modules instead of behave_features. The job then runs these modules with "python3 -m unittest", with the same PYTHONPATH as "make -C gpMgmt/bin unitdevel", and reads the unittest summary for the results. The Behave entries do not change. Add the ic-unit-segment-reconfigurer entry, which runs test_unit_segment_reconfigurer. Assisted-by: Claude Code
reconfigure() tries to connect again until the mirrors are promoted. When the connection fails, the except block closes conn. But when the first connection fails, conn has no value yet: UnboundLocalError: local variable 'conn' referenced before assignment The error goes out of the retry loop, so gprecoverseg and gpstart stop and do not wait for the promotion. In later tries, conn is the closed connection of the previous try. Set conn to None before each try, and close it only if it is set. Now test_unit_segment_reconfigurer passes 3 of 3, instead of 1. Greenplum fixed this as part of the change to psycopg2 (b5920e061b4). That change does not apply to Cloudberry, which still uses PyGreSQL. Backpatch-through: REL_2_STABLE Assisted-by: Claude Code
Member
Author
|
Note: This separate PR addresses the failing test and is easy to review; once fixed, I’ll consolidate the similar tests into one. |
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.
No CI workflow runs the Python unit tests of gpMgmt. unittest-check runs only the C unit tests, and the Python tests need mock, which only the Behave workflow installs (from gpMgmt/requirements-dev.txt).
Let a Behave matrix entry list unittest_modules instead of behave_features. The job then runs these modules with "python3 -m unittest", with the same PYTHONPATH as "make -C gpMgmt/bin unitdevel", and reads the unittest summary for the results. The Behave entries do not change.
Add the ic-unit-segment-reconfigurer entry, which runs test_unit_segment_reconfigurer.
Assisted-by: Claude Code
Fixes #ISSUE_Number
What does this PR do?
Type of Change
Breaking Changes
Test Plan
make installcheckmake -C src/test installcheck-cbdb-parallelImpact
Performance:
User-facing changes:
Dependencies:
Checklist
Additional Context
CI Skip Instructions