Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 2308144: Correct ConfigMap creation logic and update unit tests #231

Merged

Conversation

vbnrh
Copy link
Member

@vbnrh vbnrh commented Aug 27, 2024

  • Updated the createOrUpdateConfigMap function to handle nested data structures correctly, ensuring that YAML content is properly extracted and parsed.
  • Adjusted the logic to filter for YAML keys in the ManagedClusterView data and marshal the parsed data into JSON for storage in the ConfigMap.
  • Ensured that the Controller field in the OwnerReferences is set to false where necessary to prevent conflicts.
  • Modified unit tests to reflect the changes in the data structure and logic, ensuring accurate validation of the ConfigMap content and OwnerReferences.
  • Fixed a bug where the Scope check in the hasODFInfoInScope function was incorrectly using Kind instead of Resource.

- Updated the `createOrUpdateConfigMap` function to handle nested data structures correctly, ensuring that YAML content is properly extracted and parsed.
- Adjusted the logic to filter for YAML keys in the ManagedClusterView data and marshal the parsed data into JSON for storage in the ConfigMap.
- Ensured that the `Controller` field in the OwnerReferences is set to `false` where necessary to prevent conflicts.
- Modified unit tests to reflect the changes in the data structure and logic, ensuring accurate validation of the ConfigMap content and OwnerReferences.
- Fixed a bug where the `Scope` check in the `hasODFInfoInScope` function was incorrectly using `Kind` instead of `Resource`.

Signed-off-by: vbadrina <[email protected]>
Copy link
Contributor

openshift-ci bot commented Aug 27, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: umangachapagain, vbnrh

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [umangachapagain,vbnrh]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@vbnrh vbnrh changed the title Bug : Correct ConfigMap creation logic and update unit tests Bug 2308144: Correct ConfigMap creation logic and update unit tests Aug 27, 2024
Copy link
Contributor

openshift-ci bot commented Aug 27, 2024

@vbnrh: This pull request references Bugzilla bug 2308144, which is valid.

No validations were run on this bug

Requesting review from QA contact:
/cc @keesturam

In response to this:

Bug 2308144: Correct ConfigMap creation logic and update unit tests

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.

Copy link
Contributor

openshift-ci bot commented Aug 27, 2024

@openshift-ci[bot]: GitHub didn't allow me to request PR reviews from the following users: keesturam.

Note that only red-hat-storage members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

@vbnrh: This pull request references Bugzilla bug 2308144, which is valid.

No validations were run on this bug

Requesting review from QA contact:
/cc @keesturam

In response to this:

Bug 2308144: Correct ConfigMap creation logic and update unit tests

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.

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.

@vbnrh
Copy link
Member Author

vbnrh commented Aug 30, 2024

/test integration-test
/test unit-test

@openshift-merge-bot openshift-merge-bot bot merged commit 771f93d into red-hat-storage:main Aug 30, 2024
11 checks passed
@vbnrh
Copy link
Member Author

vbnrh commented Sep 3, 2024

/cherry-pick release-4.17

@openshift-cherrypick-robot

@vbnrh: new pull request created: #233

In response to this:

/cherry-pick release-4.17

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants