CherryPicked: [v2.10] feat: add MTV operator upgrade/update migration testing#522
Open
manage-repositories-app[bot] wants to merge 1 commit into
Open
CherryPicked: [v2.10] feat: add MTV operator upgrade/update migration testing#522manage-repositories-app[bot] wants to merge 1 commit into
manage-repositories-app[bot] wants to merge 1 commit into
Conversation
* feat: add MTV operator upgrade/update migration testing Add upgrade test infrastructure: - test_upgrade_migration.py: incremental test class that creates migration resources, upgrades MTV operator, verifies post-upgrade state, and runs cold migration - utilities/upgrade.py: subprocess-based upgrade runner with fd 3 support for mtv-autodeploy logging, plus pod readiness and plan verification - Add @pytest.mark.upgrade to warm migration for post-upgrade warm test - Remove tier0 from cold migration (covered by upgrade test) - Add upgrade_script_path, mtv_upgrade_to_version, mtv_upgrade_to_source, mtv_upgrade_image_index config parameters - Add 'upgrade' marker to pytest.ini - Add MtvUpgradeError and ForkliftPodsNotRunningError exceptions * fix: complete Generator type hint and remove unused fixture parameter * fix: validate upgrade script path exists before execution * Address PR #487 review comments for upgrade tests Remove redundant code and simplify upgrade test implementation: - Remove redundant wait_for_forklift_pods_ready call from post-upgrade test (upgrade script already handles this) - Remove test_verify_pre_upgrade_version test method (redundant with existing session-level validation) - Replace verify_plan_ready_after_upgrade() with standard plan.wait_for_condition() pattern - Remove _duplicate_stdout_to_fd3() fd3 hack, simplify subprocess call - Remove unused functions and their imports from utilities/upgrade.py * fix: add timeout guard to MTV upgrade subprocess Bound the upgrade script execution with a 1-hour timeout to prevent indefinite hangs. Maps TimeoutExpired to MtvUpgradeError. * refactor: clone upgrade repo at test time via fixture Replace CI-provided local script path with a session-scoped fixture that shallow-clones the upgrade repo to tmp_path. Config now takes repo URL, ref, and relative script path instead of an absolute path. * refactor: use gitpython for upgrade repo clone Replace subprocess git clone with Repo.clone_from() and simplify clone directory setup by removing unnecessary subdirectory. * refactor: move upgrade resource creation to fixtures and remove config placeholders Move StorageMap, NetworkMap, and Plan creation from test methods into class-scoped fixtures in conftest.py. The empty-string config placeholders (upgrade_repo_url, upgrade_repo_ref, etc.) were runtime-only --tc parameters, not test data — remove them and use .get() with validation in the fixture instead. * refactor: rename upgrade fixtures to pre_upgrade_* for clarity * add credential redaction, git runtime dep, and upgrade docs Redact sensitive fields (password, token, thumbprint) in upgrade log output. Add git package to Dockerfile runtime stage for upgrade test branch operations. Document upgrade test usage in README.
|
Report bugs in Issues Welcome! 🎉This pull request will be automatically processed with the following features:
🔄 Automatic Actions
📋 Available CommandsPR Status Management
Review & Approval
Testing & Validation
Container Operations
Cherry-pick Operations
Label Management
✅ Merge RequirementsThis PR will be automatically approved when the following conditions are met:
📊 Review ProcessApprovers and ReviewersApprovers:
Reviewers:
Available Labels
AI Features
💡 Tips
For more information, please refer to the project documentation or contact the maintainers. |
Collaborator
|
/lgtm |
Contributor
|
Replaced by #526 to solve manually a conflict |
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.
Cherry-pick from
mainbranch, original PR: #487, PR owner: krcmarik