Repository navigation
feat(copyoffload): add storage_secret_extra for array-specific Secret keys - #535
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (7)
WalkthroughAdds support for extra Kubernetes Secret ChangesStorage Secret Extra Configuration
Sequence DiagramsequenceDiagram
participant User
participant GenerateWizard as mtv-api-tests generate
participant GatherFunc as gather_storage_secret_extra()
participant Fixture as copyoffload_storage_secret fixture
participant MergeFunc as merge_storage_secret_extra()
participant Secret as Kubernetes Secret
User->>GenerateWizard: run generate
GenerateWizard->>GatherFunc: prompt for extra fields
GatherFunc->>User: request key/value pairs
User->>GatherFunc: provide extras or skip
GatherFunc->>GenerateWizard: return storage_secret_extra dict
GenerateWizard->>Fixture: build copyoffload config
Fixture->>MergeFunc: merge_storage_secret_extra(secret_data, config)
MergeFunc->>MergeFunc: parse env & resolve precedence
MergeFunc->>Fixture: return updated secret_data
Fixture->>Secret: create Secret with merged fields
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Review Summary by QodoAdd storage_secret_extra for array-specific Secret keys in copy-offload
WalkthroughsDescription• Add storage_secret_extra config option for array-specific Kubernetes Secret keys • Support COPYOFFLOAD_STORAGE_SECRET_EXTRA environment variable override (JSON object) • Extend mtv-api-tests generate wizard with interactive prompts for extra keys • Merge extra secret entries after base and vendor-specific fields in storage secret fixture • Document usage in copy-offload guide, README, and .providers.json.example Diagramflowchart LR
A["providers.json<br/>storage_secret_extra"] -->|merge| C["Storage Secret<br/>stringData"]
B["COPYOFFLOAD_STORAGE_SECRET_EXTRA<br/>env var"] -->|override| C
D["Base + Vendor<br/>fields"] -->|base| C
E["generate wizard<br/>prompts"] -->|populate| A
File Changes1. cli/mtv_api_tests/common.py
|
Code Review by Qodo
1. get_storage_secret_extra() docstring lacks Raises
|
|
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. |
|
Code review by qodo was updated up to the latest commit c0e7462 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@utilities/copyoffload_migration.py`:
- Around line 142-143: The type-check for storage_secret_extra currently raises
ValueError when config_extra is not a dict; change this to raise TypeError
instead. Locate the conditional that checks "if not isinstance(config_extra,
dict)" (in the function handling storage_secret_extra/config_extra) and replace
the raised exception from ValueError(...) to TypeError(...) while keeping the
existing error message text so callers receive a TypeError for incorrect types.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 204b675a-3d80-4036-ae8d-7135afae95b2
📒 Files selected for processing (7)
.providers.json.exampleREADME.mdcli/mtv_api_tests/common.pycli/mtv_api_tests/generate.pyguides/copyoffload/how-to-run-copyoffload-tests.mdtests/copyoffload/conftest.pyutilities/copyoffload_migration.py
c0e7462 to
76de4da
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@cli/mtv_api_tests/common.py`:
- Around line 778-779: The masking branch for storage_secret_extra uses a dict
comprehension; replace it with dict.fromkeys to be more idiomatic: in the block
where key == "storage_secret_extra" and isinstance(value, dict) (which currently
assigns masked[key] = {secret_key: "***" for secret_key in value}), set
masked[key] = dict.fromkeys(value, "***") so keys remain the same and all values
are "***".
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 697e5969-ec62-4fd6-8880-31193ee2a5cb
📒 Files selected for processing (7)
.providers.json.exampleREADME.mdcli/mtv_api_tests/common.pycli/mtv_api_tests/generate.pyguides/copyoffload/how-to-run-copyoffload-tests.mdtests/copyoffload/conftest.pyutilities/copyoffload_migration.py
|
/lgtm |
… keys Allow extra Forklift stringData keys via providers JSON and COPYOFFLOAD_STORAGE_SECRET_EXTRA env override. Includes generate wizard prompts and copy-offload guide documentation. Co-authored-by: Cursor <cursoragent@cursor.com>
Add missing docstring sections, use TypeError for type validation, mask wizard secret extra values in prompts and config summary. Co-authored-by: Cursor <cursoragent@cursor.com>
f48b1b3 to
bce8be1
Compare
|
Clean rebase detected — no code changes compared to previous head ( |
|
/lgtm |
|
/verified |
|
/lgtm |
|
New container for ghcr.io/redhatqe/mtv-api-tests:latest published |
|
/cherry-pick v2.11 v2.10 |
|
Cherry-pick conflicts were resolved by AI Cherry-picked PR feat(copyoffload): add storage_secret_extra for array-specific Secret keys into v2.10: #539 Manual verification is required — please review the changes and test before merging. |
|
Cherry-pick conflicts were resolved by AI Cherry-picked PR feat(copyoffload): add storage_secret_extra for array-specific Secret keys into v2.11: #540 Manual verification is required — please review the changes and test before merging. |
Summary
storage_secret_extrain.providers.jsoncopyoffloadblock for Forklift SecretstringDatakeys not covered by built-in vendor fields (e.g. PowerMaxPOWERMAX_PORT_GROUP_NAME,STORAGE_SKIP_SSL_VERIFICATION).COPYOFFLOAD_STORAGE_SECRET_EXTRAenv var (JSON object) to override matching keys at runtime.mtv-api-tests generatewizard with an optional prompt for extra keys..providers.json.example.If
storage_secret_extrais missing, empty, ornull, behavior is unchanged.Test plan
TestCopyoffloadThinMigrationonocp-edge97(ONTAP) — 6/6 passed (multiple runs)storage_secret_extra(QE_TEST_EXTRA_KEY,ANOTHER_NON_VENDOR_KEY) plusSTORAGE_*andONTAP_SVMpre-commit run --all-filespassed on changed filesSummary by CodeRabbit
New Features
Documentation
Bug Fixes