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

[release-4.7] Bug 1942068: Gahter datahubs.installers.datahub.sap.com resources from SAP clusters #383

Merged

Conversation

natiiix
Copy link
Contributor

@natiiix natiiix commented Mar 25, 2021

This PR is a backport of #376, which is another SAP enhancement. Much like the others, this one will also have to be backported to 4.6.z for us to see any useful results in a reasonable amount of time.

The presence of the Datahubs resource(s) is used for the identification of SAP (SDI) clusters. As such, it has been decided that it should be collected from all of them in order for the team processing the IO archives to be able to tell SAP clusters apart from the remaining clusters. It is possible that all of the data gathered exclusively from SAP clusters could be missing, in which case it would be impossible to determine if a cluster has an SDI installation or not. This enhancement fixes that issue by gathering a resource that should, universally, be present on all SAP clusters. By gathering this resource, we also safely know which namespace was SDI (attempted to be) installed into.

We came up with a hopefully reasonably clear and unambiguous directory structure for custom resources (see "Sample archive" section below).

Categories

  • Bugfix
  • Enhancement
  • Backporting
  • Others (CI, Infrastructure, Documentation)

Sample archive

  • docs/insights-archive-sample/customresources/installers.datahub.sap.com/datahubs/sdi/default.json

Documentation

  • docs/gathered-data.md - "SAPDatahubs" section

Unit Tests

  • pkg/gather/clusterconfig/sap_datahubs_test.go - TestSAPDatahubs

Privacy

Yes. There are no sensitive data in the newly collected information.

Changelog

No.

References

Jira Task: https://issues.redhat.com/browse/CCXDEV-4317
Bugzilla Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1942068
Base PR: #376

@openshift-ci-robot openshift-ci-robot added the bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. label Mar 25, 2021
@openshift-ci-robot
Copy link
Contributor

@natiiix: This pull request references Bugzilla bug 1942068, which is invalid:

  • expected dependent Bugzilla bug 1940432 to be in one of the following states: VERIFIED, RELEASE_PENDING, CLOSED (ERRATA), CLOSED (CURRENTRELEASE), but it is ON_QA instead

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

[release-4.7] Bug 1942068: Gahter datahubs.installers.datahub.sap.com resources from SAP clusters

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/test-infra repository.

@openshift-ci-robot openshift-ci-robot added the bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. label Mar 25, 2021
@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 25, 2021
@natiiix
Copy link
Contributor Author

natiiix commented Mar 25, 2021

/test e2e

@tremes
Copy link
Contributor

tremes commented Mar 26, 2021

/bugzilla refresh

@openshift-ci-robot
Copy link
Contributor

@tremes: This pull request references Bugzilla bug 1942068, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

6 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.7.z) matches configured target release for branch (4.7.z)
  • bug is in the state NEW, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)
  • dependent bug Bugzilla bug 1940432 is in the state VERIFIED, which is one of the valid states (VERIFIED, RELEASE_PENDING, CLOSED (ERRATA), CLOSED (CURRENTRELEASE))
  • dependent Bugzilla bug 1940432 targets the "4.8.0" release, which is one of the valid target releases: 4.8.0
  • bug has dependents

Requesting review from QA contact:
/cc @psimovec

In response to this:

/bugzilla refresh

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/test-infra repository.

@openshift-ci-robot openshift-ci-robot added bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. and removed bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. labels Mar 26, 2021
}

func gatherSAPDatahubs(ctx context.Context, dynamicClient dynamic.Interface) ([]record.Record, []error) {
datahubsResource := schema.GroupVersionResource{Group: "installers.datahub.sap.com", Version: "v1alpha1", Resource: "datahubs"}
Copy link
Contributor

Choose a reason for hiding this comment

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

We already have a variable for this GVR in 4.7. Can you please update it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess it was just now added with the changes that I rebased on top of because it wasn't there when I created the PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

Your guess is correct AFAIK :)

namespace: example-namespace2
`

datahubsResource := schema.GroupVersionResource{Group: "installers.datahub.sap.com", Version: "v1alpha1", Resource: "datahubs"}
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here pls.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is exactly the same code as in master. The idea here was that if someone introduces a type into the constant, then the tests would happily pass if they also use the constant. However, if each of them has their own hardcoded GVR variable, then they will start failing.

@tremes
Copy link
Contributor

tremes commented Mar 26, 2021

Pretty straightforward & clear. I ran it locally as usual, but no SAP on my cluster. Thanks
/lgtm

@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: natiiix, tremes

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-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 26, 2021
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@jwforres jwforres added the cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. label Mar 26, 2021
@openshift-merge-robot openshift-merge-robot merged commit 23a2989 into openshift:release-4.7 Mar 26, 2021
@openshift-ci-robot
Copy link
Contributor

@natiiix: All pull requests linked via external trackers have merged:

Bugzilla bug 1942068 has been moved to the MODIFIED state.

In response to this:

[release-4.7] Bug 1942068: Gahter datahubs.installers.datahub.sap.com resources from SAP clusters

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/test-infra repository.

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. bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants