MGMT-20025: Replace encode from yaml to json on Nutanix types
This PR fixes a bug unmarshalling the install-config generated by the assisted-service due to an error in Nutanix type encoding.
List all the issues related to this PR
- [ ] New Feature
- [ ] Enhancement
- [X] Bug fix
- [X] Tests
- [ ] Documentation
- [ ] CI/CD
What environments does this code impact?
- [X] Automation (CI, tools, etc)
- [x] Cloud
- [x] Operator Managed Deployments
- [ ] None
How was this code tested?
- [ ] assisted-test-infra environment
- [ ] dev-scripts environment
- [x] Reviewer's test appreciated
- [x] Waiting for CI to do a full test run
- [x] Manual (tested on Nutanix platform with CAPI)
- [ ] No tests needed
Checklist
- [x] Title and description added to both, commit and PR.
- [ ] Relevant issues have been associated (see CONTRIBUTING guide)
- [x] This change does not require a documentation update (docstring,
docs, README, etc) - [x] Does this change include unit-tests (note that code changes require unit-tests)
Reviewers Checklist
- Are the title and description (in both PR and commit) meaningful and clear?
- Is there a bug required (and linked) for this change?
- Should this PR be backported?
@mlorenzofr: This pull request references MGMT-20025 which is a valid jira issue.
Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.19.0" version, but no target version was set.
In response to this:
List all the issues related to this PR
- [ ] New Feature
- [ ] Enhancement
- [X] Bug fix
- [X] Tests
- [ ] Documentation
- [ ] CI/CD
What environments does this code impact?
- [X] Automation (CI, tools, etc)
- [x] Cloud
- [x] Operator Managed Deployments
- [ ] None
How was this code tested?
- [ ] assisted-test-infra environment
- [ ] dev-scripts environment
- [x] Reviewer's test appreciated
- [x] Waiting for CI to do a full test run
- [x] Manual (tested on Nutanix platform with CAPI)
- [ ] No tests needed
Checklist
- [x] Title and description added to both, commit and PR.
- [ ] Relevant issues have been associated (see CONTRIBUTING guide)
- [x] This change does not require a documentation update (docstring,
docs, README, etc)- [x] Does this change include unit-tests (note that code changes require unit-tests)
Reviewers Checklist
- Are the title and description (in both PR and commit) meaningful and clear?
- Is there a bug required (and linked) for this change?
- Should this PR be backported?
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.
/assign @rccrdpccl
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 74.39%. Comparing base (
dc818a8) to head (05b2a7e). Report is 36 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #7353 +/- ##
==========================================
+ Coverage 67.25% 74.39% +7.13%
==========================================
Files 334 380 +46
Lines 42697 69197 +26500
==========================================
+ Hits 28718 51482 +22764
- Misses 11373 15011 +3638
- Partials 2606 2704 +98
| Files with missing lines | Coverage Δ | |
|---|---|---|
| internal/installcfg/installcfg.go | 100.00% <ø> (ø) |
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
@mlorenzofr: This pull request references MGMT-20025 which is a valid jira issue.
Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.19.0" version, but no target version was set.
In response to this:
This PR fixes a bug unmarshalling the install-config generated by the assisted-service due to an error in Nutanix type encoding.
List all the issues related to this PR
- [ ] New Feature
- [ ] Enhancement
- [X] Bug fix
- [X] Tests
- [ ] Documentation
- [ ] CI/CD
What environments does this code impact?
- [X] Automation (CI, tools, etc)
- [x] Cloud
- [x] Operator Managed Deployments
- [ ] None
How was this code tested?
- [ ] assisted-test-infra environment
- [ ] dev-scripts environment
- [x] Reviewer's test appreciated
- [x] Waiting for CI to do a full test run
- [x] Manual (tested on Nutanix platform with CAPI)
- [ ] No tests needed
Checklist
- [x] Title and description added to both, commit and PR.
- [ ] Relevant issues have been associated (see CONTRIBUTING guide)
- [x] This change does not require a documentation update (docstring,
docs, README, etc)- [x] Does this change include unit-tests (note that code changes require unit-tests)
Reviewers Checklist
- Are the title and description (in both PR and commit) meaningful and clear?
- Is there a bug required (and linked) for this change?
- Should this PR be backported?
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.
@eliorerz please review @mlorenzofr you need to run nutanix e2e test
/test ?
@rccrdpccl: The following commands are available to trigger required jobs:
/test e2e-agent-compact-ipv4
/test edge-assisted-operator-catalog-publish-verify
/test edge-ci-index
/test edge-e2e-ai-operator-disconnected-capi
/test edge-e2e-ai-operator-ztp
/test edge-e2e-ai-operator-ztp-3masters
/test edge-e2e-ai-operator-ztp-capi
/test edge-e2e-ai-operator-ztp-disconnected
/test edge-e2e-metal-assisted-4-14
/test edge-e2e-metal-assisted-4-15
/test edge-e2e-metal-assisted-4-16
/test edge-e2e-metal-assisted-4-17
/test edge-e2e-metal-assisted-4-18
/test edge-e2e-metal-assisted-5-control-planes-4-18
/test edge-e2e-metal-assisted-cnv-4-17
/test edge-e2e-metal-assisted-external-4-18
/test edge-e2e-metal-assisted-lvm-4-18
/test edge-e2e-metal-assisted-mtv-4-17
/test edge-e2e-metal-assisted-none-4-18
/test edge-e2e-metal-assisted-odf-4-17
/test edge-e2e-metal-assisted-osc-4-18
/test edge-e2e-nutanix-assisted-2workers-4-18
/test edge-e2e-nutanix-assisted-4-18
/test edge-e2e-vsphere-assisted-4-18
/test edge-images
/test edge-lint
/test edge-operator-publish-verify
/test edge-subsystem-aws
/test edge-subsystem-kubeapi-aws
/test edge-unit-test
/test edge-verify-generated-code
/test images
/test mce-images
The following commands are available to trigger optional jobs:
/test e2e-agent-4control-ipv4
/test e2e-agent-5control-ipv4
/test e2e-agent-ha-dualstack
/test e2e-agent-sno-ipv6
/test edge-e2e-ai-operator-ztp-4masters
/test edge-e2e-ai-operator-ztp-5masters
/test edge-e2e-ai-operator-ztp-compact-day2-masters
/test edge-e2e-ai-operator-ztp-compact-day2-workers
/test edge-e2e-ai-operator-ztp-hypershift-zero-nodes
/test edge-e2e-ai-operator-ztp-multiarch-3masters-ocp
/test edge-e2e-ai-operator-ztp-multiarch-sno-ocp
/test edge-e2e-ai-operator-ztp-node-labels
/test edge-e2e-ai-operator-ztp-remove-node
/test edge-e2e-ai-operator-ztp-sno-day2-masters
/test edge-e2e-ai-operator-ztp-sno-day2-workers
/test edge-e2e-ai-operator-ztp-sno-day2-workers-ignitionoverride
/test edge-e2e-ai-operator-ztp-sno-day2-workers-late-binding
/test edge-e2e-metal-assisted-4-control-planes-4-18
/test edge-e2e-metal-assisted-4-masters-none-4-18
/test edge-e2e-metal-assisted-bond-4-14
/test edge-e2e-metal-assisted-bond-4-18
/test edge-e2e-metal-assisted-day2-4-18
/test edge-e2e-metal-assisted-day2-arm-workers-4-18
/test edge-e2e-metal-assisted-day2-sno-4-18
/test edge-e2e-metal-assisted-ipv4v6-4-18
/test edge-e2e-metal-assisted-ipv6-4-18
/test edge-e2e-metal-assisted-k8s-nmstate-4-17
/test edge-e2e-metal-assisted-kube-api-late-binding-sno-4-18
/test edge-e2e-metal-assisted-kube-api-late-unbinding-sno-4-18
/test edge-e2e-metal-assisted-kube-api-net-suite-4-18
/test edge-e2e-metal-assisted-kube-api-umlb-4-18
/test edge-e2e-metal-assisted-onprem-4-18
/test edge-e2e-metal-assisted-osc-sno-4-18
/test edge-e2e-metal-assisted-sno-4-18
/test edge-e2e-metal-assisted-static-ip-suite-4-14
/test edge-e2e-metal-assisted-static-ip-suite-4-18
/test edge-e2e-metal-assisted-tang-4-18
/test edge-e2e-metal-assisted-tpmv2-4-18
/test edge-e2e-metal-assisted-umlb-4-18
/test edge-e2e-metal-assisted-upgrade-agent-4-18
/test edge-e2e-oci-assisted-4-18
/test edge-e2e-oci-assisted-bm-iscsi-4-18
/test edge-e2e-vsphere-assisted-umlb-4-18
/test edge-e2e-vsphere-assisted-umn-4-18
/test okd-scos-e2e-aws-ovn
/test okd-scos-images
/test push-pr-image
Use /test all to run the following jobs that were automatically triggered:
pull-ci-openshift-assisted-service-master-e2e-agent-compact-ipv4
pull-ci-openshift-assisted-service-master-edge-ci-index
pull-ci-openshift-assisted-service-master-edge-e2e-ai-operator-ztp
pull-ci-openshift-assisted-service-master-edge-e2e-metal-assisted-4-18
pull-ci-openshift-assisted-service-master-edge-images
pull-ci-openshift-assisted-service-master-edge-lint
pull-ci-openshift-assisted-service-master-edge-subsystem-aws
pull-ci-openshift-assisted-service-master-edge-subsystem-kubeapi-aws
pull-ci-openshift-assisted-service-master-edge-unit-test
pull-ci-openshift-assisted-service-master-edge-verify-generated-code
pull-ci-openshift-assisted-service-master-images
pull-ci-openshift-assisted-service-master-mce-images
pull-ci-openshift-assisted-service-master-okd-scos-e2e-aws-ovn
In response to this:
/test ?
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.
/test edge-e2e-nutanix-assisted-4-18
/retest
nice :heart_eyes:
/hold Currently, our CI for Nutanix is broken. If this PR is not urgent, I think it is best to hold off on merging it until our CI is fixed.
Currently, our CI for Nutanix is broken. If this PR is not urgent, I think it is best to hold off on merging it until our CI is fixed.
@eliorerz I guess it's not urgent because it has been broken since forever, but we are breaking most nutanix installations as we currently produce an invalid install config
/test edge-e2e-nutanix-assisted-4-18
/test edge-e2e-nutanix-assisted-4-18
@eliorerz @rccrdpccl all tests passed (including nutanix), do you think we can unhold and merge it?
@mlorenzofr sure, LGTM - feel free to unhold whenever suits you best
@eliorerz I think this changes only improves the current situation: this works by chance, as the golang structs happen to have the same name as the desired json schema, and json is case insensitive. However this breaks if the struct's fields name differ from the json schema (as DeprecatedAPIVIP).
We should understand why we ended up in this else condition, but maybe we could investigate that issue separately. WDYT, should we merge this?
/test edge-e2e-vsphere-assisted-4-19
/test edge-e2e-metal-assisted-external-4-19 /test edge-e2e-nutanix-assisted-4-19
/test ?
@mlorenzofr: The following commands are available to trigger required jobs:
/test e2e-agent-compact-ipv4
/test edge-assisted-operator-catalog-publish-verify
/test edge-ci-index
/test edge-e2e-ai-operator-disconnected-capi
/test edge-e2e-ai-operator-ztp
/test edge-e2e-ai-operator-ztp-3masters
/test edge-e2e-ai-operator-ztp-capi
/test edge-e2e-ai-operator-ztp-disconnected
/test edge-e2e-metal-assisted-4-14
/test edge-e2e-metal-assisted-4-15
/test edge-e2e-metal-assisted-4-16
/test edge-e2e-metal-assisted-4-17
/test edge-e2e-metal-assisted-4-19
/test edge-e2e-metal-assisted-5-control-planes-4-19
/test edge-e2e-metal-assisted-ai-amd-4-18
/test edge-e2e-metal-assisted-ai-nvidia-4-18
/test edge-e2e-metal-assisted-external-4-19
/test edge-e2e-metal-assisted-lvm-4-19
/test edge-e2e-metal-assisted-none-4-19
/test edge-e2e-metal-assisted-osc-4-19
/test edge-e2e-metal-assisted-virtualization-4-18
/test edge-e2e-nutanix-assisted-2workers-4-19
/test edge-e2e-nutanix-assisted-4-19
/test edge-e2e-vsphere-assisted-4-19
/test edge-images
/test edge-lint
/test edge-operator-publish-verify
/test edge-subsystem-aws
/test edge-subsystem-kubeapi-aws
/test edge-unit-test
/test edge-verify-generated-code
/test images
/test mce-images
/test verify-deps
The following commands are available to trigger optional jobs:
/test e2e-agent-4control-ipv4
/test e2e-agent-5control-ipv4
/test e2e-agent-ha-dualstack
/test e2e-agent-sno-ipv6
/test edge-e2e-ai-operator-ztp-4masters
/test edge-e2e-ai-operator-ztp-5masters
/test edge-e2e-ai-operator-ztp-compact-day2-masters
/test edge-e2e-ai-operator-ztp-compact-day2-workers
/test edge-e2e-ai-operator-ztp-multiarch-3masters-ocp
/test edge-e2e-ai-operator-ztp-multiarch-sno-ocp
/test edge-e2e-ai-operator-ztp-node-labels
/test edge-e2e-ai-operator-ztp-remove-node
/test edge-e2e-ai-operator-ztp-sno-day2-masters
/test edge-e2e-ai-operator-ztp-sno-day2-workers
/test edge-e2e-ai-operator-ztp-sno-day2-workers-ignitionoverride
/test edge-e2e-ai-operator-ztp-sno-day2-workers-late-binding
/test edge-e2e-metal-assisted-4-control-planes-4-19
/test edge-e2e-metal-assisted-4-masters-none-4-19
/test edge-e2e-metal-assisted-bond-4-14
/test edge-e2e-metal-assisted-bond-4-19
/test edge-e2e-metal-assisted-day2-4-19
/test edge-e2e-metal-assisted-day2-arm-workers-4-19
/test edge-e2e-metal-assisted-day2-sno-4-19
/test edge-e2e-metal-assisted-ipv4v6-4-19
/test edge-e2e-metal-assisted-ipv6-4-19
/test edge-e2e-metal-assisted-kube-api-late-binding-sno-4-19
/test edge-e2e-metal-assisted-kube-api-late-unbinding-sno-4-19
/test edge-e2e-metal-assisted-kube-api-net-suite-4-19
/test edge-e2e-metal-assisted-kube-api-umlb-4-19
/test edge-e2e-metal-assisted-onprem-4-19
/test edge-e2e-metal-assisted-osc-sno-4-19
/test edge-e2e-metal-assisted-sno-4-19
/test edge-e2e-metal-assisted-static-ip-suite-4-14
/test edge-e2e-metal-assisted-static-ip-suite-4-19
/test edge-e2e-metal-assisted-tang-4-19
/test edge-e2e-metal-assisted-tpmv2-4-19
/test edge-e2e-metal-assisted-umlb-4-19
/test edge-e2e-metal-assisted-upgrade-agent-4-19
/test edge-e2e-oci-assisted-4-19
/test edge-e2e-oci-assisted-bm-iscsi-4-19
/test edge-e2e-vsphere-assisted-umlb-4-19
/test edge-e2e-vsphere-assisted-umn-4-19
/test okd-scos-e2e-aws-ovn
/test okd-scos-images
/test push-pr-image
Use /test all to run the following jobs that were automatically triggered:
pull-ci-openshift-assisted-service-master-e2e-agent-compact-ipv4
pull-ci-openshift-assisted-service-master-edge-ci-index
pull-ci-openshift-assisted-service-master-edge-e2e-ai-operator-ztp
pull-ci-openshift-assisted-service-master-edge-e2e-metal-assisted-4-19
pull-ci-openshift-assisted-service-master-edge-e2e-metal-assisted-external-4-19
pull-ci-openshift-assisted-service-master-edge-e2e-metal-assisted-none-4-19
pull-ci-openshift-assisted-service-master-edge-e2e-nutanix-assisted-4-19
pull-ci-openshift-assisted-service-master-edge-e2e-vsphere-assisted-4-19
pull-ci-openshift-assisted-service-master-edge-images
pull-ci-openshift-assisted-service-master-edge-lint
pull-ci-openshift-assisted-service-master-edge-subsystem-aws
pull-ci-openshift-assisted-service-master-edge-subsystem-kubeapi-aws
pull-ci-openshift-assisted-service-master-edge-unit-test
pull-ci-openshift-assisted-service-master-edge-verify-generated-code
pull-ci-openshift-assisted-service-master-images
pull-ci-openshift-assisted-service-master-mce-images
pull-ci-openshift-assisted-service-master-okd-scos-e2e-aws-ovn
pull-ci-openshift-assisted-service-master-verify-deps
In response to this:
/test ?
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.
/test verify-deps
/lgtm /approve
Walkthrough
The changes introduce and enhance test coverage for Nutanix platform configuration handling. Tests were added to validate JSON unmarshalling and field-level assertions for Nutanix-specific install config fields. Struct field tags for Nutanix types were switched from YAML to JSON. Full YAML output comparisons in tests were replaced with granular field assertions.
Changes
| Files | Change Summary |
|---|---|
| internal/installcfg/builder/builder_test.go | Added tests for Nutanix platform config validation/unmarshalling and helper assertion functions for Nutanix fields. |
| internal/installcfg/installcfg.go | Changed Nutanix-related struct field tags from yaml to json for serialization. |
| internal/provider/registry/registry_test.go | Replaced full YAML output comparisons with detailed field-by-field assertions for Nutanix platform config. |
Poem
In the warren where configs grow, Nutanix fields now clearly show. From YAML tags to JSON’s grace, And tests that check each tiny place. With every hop, a field asserted— The builder’s trust, well-concerted! 🐇✨
[!NOTE]
⚡️ AI Code Reviews for VS Code, Cursor, Windsurf
CodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback. Learn more here.
[!NOTE]
⚡️ Faster reviews with caching
CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure
Review - Disable Cacheat either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off theData Retentionsetting under your Organization Settings. Enjoy the performance boost—your workflow just got faster.
📜 Recent review details
Configuration used: CodeRabbit UI Review profile: CHILL Plan: Pro Cache: Disabled due to data retention organization setting Knowledge Base: Disabled due to data retention organization setting
📥 Commits
Reviewing files that changed from the base of the PR and between 86a016c53f530cc75311edec9d8199c31b6ca925 and 5fbf17cc103ffa10cf41edfa9af8c877a1707aaf.
📒 Files selected for processing (3)
internal/installcfg/builder/builder_test.go(2 hunks)internal/installcfg/installcfg.go(1 hunks)internal/provider/registry/registry_test.go(2 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
internal/provider/registry/registry_test.go (3)
vendor/github.com/onsi/gomega/gomega_dsl.go (1)
Expect(220-223)internal/installcfg/installcfg.go (1)
Platform(9-15)internal/common/test_configuration.go (1)
Address(569-572)
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: Red Hat Konflux / assisted-service-rhel9-acm-ds-main-on-pull-request
- GitHub Check: Red Hat Konflux / assisted-service-saas-main-on-pull-request
- GitHub Check: Red Hat Konflux / assisted-service-rhel8-acm-ds-main-on-pull-request
🔇 Additional comments (12)
internal/installcfg/installcfg.go (4)
113-122: Structure annotation tag change from YAML to JSONThe field tags in
NutanixInstallConfigPlatformstruct have been changed from YAML to JSON, which aligns with the PR objective to fix the unmarshalling issue with Nutanix types.
124-130: Field tag format change from YAML to JSONThe field tags in
NutanixPrismCentralstruct have been changed from YAML to JSON, consistent with the unmarshalling fix being implemented across all Nutanix types.
132-137: Serialization format update from YAML to JSONThe field tags in
NutanixEndpointstruct have been updated from YAML to JSON format, maintaining consistency with the rest of the Nutanix-related struct changes.
139-145: Field tag conversion from YAML to JSONThe field tags in
NutanixPrismElementstruct have been changed from YAML to JSON format, completing the consistent conversion across all Nutanix-related structs.internal/provider/registry/registry_test.go (2)
361-371: Replaced YAML assertions with granular field assertionsThe test for Nutanix platform with OpenShift version 4.12 now uses individual field assertions instead of full YAML string comparisons. This approach provides more precise test failures and better readability when tests fail.
387-399: Enhanced test coverage for OpenShift 4.11The test for OpenShift version 4.11 now includes additional assertions for deprecated fields (
DeprecatedAPIVIPandDeprecatedIngressVIP), ensuring backward compatibility is maintained while properly testing the newly standardized fields.internal/installcfg/builder/builder_test.go (6)
264-264: Added Nutanix install config test dataAdded a JSON string constant for testing Nutanix platform configuration overrides, which will be used in the subsequent tests to verify correct JSON unmarshalling.
266-272: Added test for Nutanix override decodingThis test verifies that Nutanix platform configuration is correctly decoded when applying config overrides directly, ensuring the JSON tag changes work properly.
274-283: Added test for end-to-end Nutanix configuration unmarshallingThis test validates the complete flow from install config generation to JSON unmarshalling for Nutanix platform configuration, ensuring the serialization changes work in the full context.
285-294: Added test for Nutanix credentials unmarshallingThis test specifically focuses on the correct unmarshalling of sensitive Nutanix credential fields (username and password), which is important for security and functionality.
971-980: Added Nutanix platform assertion helper functionThis helper function encapsulates the verification logic for Nutanix platform fields, improving code reuse and readability across the test cases.
982-986: Added Nutanix credentials assertion helper functionThis helper function focuses specifically on verifying the correct unmarshalling of Nutanix credential fields, providing a clear separation of concerns in the test assertions.
✨ Finishing Touches
- [ ] 📝 Generate Docstrings
🪧 Tips
Chat
There are 3 ways to chat with CodeRabbit:
- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
I pushed a fix in commit <commit_id>, please review it.Explain this complex logic.Open a follow-up GitHub issue for this discussion.
- Files and specific lines of code (under the "Files changed" tab): Tag
@coderabbitaiin a new review comment at the desired location with your query. Examples:@coderabbitai explain this code block.@coderabbitai modularize this function.
- PR comments: Tag
@coderabbitaiin a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.@coderabbitai read src/utils.ts and explain its main purpose.@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.@coderabbitai help me debug CodeRabbit configuration file.
Support
Need help? Create a ticket on our support page for assistance with any issues or questions.
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.
CodeRabbit Commands (Invoked using PR comments)
@coderabbitai pauseto pause the reviews on a PR.@coderabbitai resumeto resume the paused reviews.@coderabbitai reviewto trigger an incremental review. This is useful when automatic reviews are disabled for the repository.@coderabbitai full reviewto do a full review from scratch and review all the files again.@coderabbitai summaryto regenerate the summary of the PR.@coderabbitai generate docstringsto generate docstrings for this PR.@coderabbitai generate sequence diagramto generate a sequence diagram of the changes in this PR.@coderabbitai resolveresolve all the CodeRabbit review comments.@coderabbitai configurationto show the current CodeRabbit configuration for the repository.@coderabbitai helpto get help.
Other keywords and placeholders
- Add
@coderabbitai ignoreanywhere in the PR description to prevent this PR from being reviewed. - Add
@coderabbitai summaryto generate the high-level summary at a specific location in the PR description. - Add
@coderabbitaianywhere in the PR title to generate the title automatically.
CodeRabbit Configuration File (.coderabbit.yaml)
- You can programmatically configure CodeRabbit by adding a
.coderabbit.yamlfile to the root of your repository. - Please see the configuration documentation for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation:
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
Documentation and Community
- Visit our Documentation for detailed information on how to use CodeRabbit.
- Join our Discord Community to get help, request features, and share feedback.
- Follow us on X/Twitter for updates and announcements.
@mlorenzofr: This pull request references MGMT-20025 which is a valid jira issue.
Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.20.0" version, but no target version was set.
In response to this:
This PR fixes a bug unmarshalling the install-config generated by the assisted-service due to an error in Nutanix type encoding.
List all the issues related to this PR
- [ ] New Feature
- [ ] Enhancement
- [X] Bug fix
- [X] Tests
- [ ] Documentation
- [ ] CI/CD
What environments does this code impact?
- [X] Automation (CI, tools, etc)
- [x] Cloud
- [x] Operator Managed Deployments
- [ ] None
How was this code tested?
- [ ] assisted-test-infra environment
- [ ] dev-scripts environment
- [x] Reviewer's test appreciated
- [x] Waiting for CI to do a full test run
- [x] Manual (tested on Nutanix platform with CAPI)
- [ ] No tests needed
Checklist
- [x] Title and description added to both, commit and PR.
- [ ] Relevant issues have been associated (see CONTRIBUTING guide)
- [x] This change does not require a documentation update (docstring,
docs, README, etc)- [x] Does this change include unit-tests (note that code changes require unit-tests)
Reviewers Checklist
- Are the title and description (in both PR and commit) meaningful and clear?
- Is there a bug required (and linked) for this change?
- Should this PR be backported?
Summary by CodeRabbit
Tests
Enhanced test coverage for Nutanix platform configuration, including validation of field decoding and credential unmarshalling.
Updated tests to use granular field-by-field assertions instead of full YAML output comparisons.
Refactor
Changed struct field tags for Nutanix-related configuration types from YAML to JSON format to improve serialization consistency.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.
/test edge-e2e-nutanix-assisted-4-19 /test okd-scos-e2e-aws-ovn /test edge-subsystem-kubeapi-aws
/test edge-e2e-nutanix-assisted-4-19 /test okd-scos-e2e-aws-ovn /test edge-e2e-ai-operator-ztp
/retest
HTTP response body: {"code":"400","href":"","id":400,"kind":"Error","reason":"api-vip <10.0.200.10> is already in use in cidr 10.0.200.0/22"}
/test edge-e2e-nutanix-assisted-4-19 /test edge-e2e-ai-operator-ztp
/test edge-e2e-nutanix-assisted-4-19