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

CNF-15570: Add inventory collector/persistence (part 2) #384

Conversation

alegacy
Copy link
Collaborator

@alegacy alegacy commented Dec 7, 2024

This is a continuation of PR #379. At @mlguerrero12 's request I have split it so that the first 3 commits are in the other PR, and the last 4 commits are in this PR. Since the first PR isn't yet merged those commits appear here as well so just ignore those and review the last 4 only.

These are relevant here:

  • CNF-15570: Add notification support
  • CNF-15570: Add support for persisting deployment managers
  • CNF-15570: Add inventory data collector
  • CNF-15570: Add changes needed for upcoming collector

@alegacy alegacy changed the title Feature/add inventory collect (part 2) CNF-15570: Add inventory collector/persistence (part 2) Dec 7, 2024
@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Dec 7, 2024

@alegacy: This pull request references CNF-15570 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 story to target the "4.19.0" version, but no target version was set.

In response to this:

This is a continuation of PR #379. At @mlguerrero12 's request I have split it so that the first 3 commits are in the other PR, and the last 4 commits are in this PR. Since the first PR isn't yet merged those commits appear here as well so just ignore those and review the last 4 only.

These are relevant here:

  • CNF-15570: Add notification support
  • CNF-15570: Add support for persisting deployment managers
  • CNF-15570: Add inventory data collector
  • CNF-15570: Add changes needed for upcoming collector

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.

@alegacy alegacy force-pushed the feature/add-inventory-collect-part-2 branch 2 times, most recently from 095fc49 to da0690d Compare December 9, 2024 14:30
@alegacy alegacy requested a review from mlguerrero12 December 9, 2024 14:30
@alegacy
Copy link
Collaborator Author

alegacy commented Dec 10, 2024

/label tide/merge-method-rebase

@openshift-ci openshift-ci bot added the tide/merge-method-rebase Denotes a PR that should be rebased by tide when it merges. label Dec 10, 2024
This updates models and repository functions in preparation for the
upcoming resource collector implementation.

Signed-off-by: Allain Legacy <[email protected]>
@alegacy alegacy force-pushed the feature/add-inventory-collect-part-2 branch from da0690d to 00ac495 Compare December 10, 2024 21:13
This adds the first pass at implementing the data collector for the
inventory data.  This initial implementation synchronizes the
resource pool, resource type, and resource objects from the ACM and
creates corresponding data change event records to track when any of
these objects are created or updated.  A future commit will address the
delete use case as well as the other objects (e.g., deployment manager).

Signed-off-by: Allain Legacy <[email protected]>
@alegacy alegacy force-pushed the feature/add-inventory-collect-part-2 branch 2 times, most recently from 62077ad to 1e246ad Compare December 13, 2024 14:26
Copy link
Contributor

@mlguerrero12 mlguerrero12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

Just a minor comment

internal/service/resources/collector/collector.go Outdated Show resolved Hide resolved
Copy link

openshift-ci bot commented Dec 13, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mlguerrero12

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:

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 13, 2024
This adds support for persisting deployment managers to the list of
objects persisted to the database.

Signed-off-by: Allain Legacy <[email protected]>
This addresses an issue in the collector persistence utilities with
using transactions to execute create/update of an object combined with
persisting of the data change event.

Signed-off-by: Allain Legacy <[email protected]>
@alegacy alegacy force-pushed the feature/add-inventory-collect-part-2 branch from 1e246ad to 75a50e5 Compare December 13, 2024 15:46
@mlguerrero12
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 13, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit fc03dd6 into openshift-kni:main Dec 13, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. tide/merge-method-rebase Denotes a PR that should be rebased by tide when it merges.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants