openshift / oc

The OpenShift Command Line, part of OKD
https://www.openshift.org
Apache License 2.0
185 stars 373 forks source link

OCPBUGS-33762: Hardcode resource groups/kinds for now #1773

Closed petr-muller closed 1 month ago

petr-muller commented 1 month ago

Previous code used GroupVersionKind method on actual resources to determine group/kind strings for them, but client-go unfortunately drops TypeMeta on resources processed by typed client (https://github.com/kubernetes/client-go/issues/1328, https://github.com/kubernetes/client-go/issues/541). Fortunately we know what types we build insights for, so we can use appropriate strings from client code for groups and hardcode kinds ourselves.

openshift-ci-robot commented 1 month ago

@petr-muller: This pull request references Jira Issue OCPBUGS-33762, which is invalid:

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

The bug has been updated to refer to the pull request using the external bug tracker.

In response to [this](https://github.com/openshift/oc/pull/1773): >Previous code used `GroupVersionKind` method on actual resources to determine group/kind strings for them, but client-go unfortunately drops `TypeMeta` on resources processed by typed client (https://github.com/kubernetes/client-go/issues/1328, https://github.com/kubernetes/client-go/issues/541). Fortunately we know what types we build insights for, so we can use appropriate strings from client code for groups and hardcode kinds ourselves. > Instructions for interacting with me using PR comments are available [here](https://prow.ci.openshift.org/command-help?repo=openshift%2Foc). If you have questions or suggestions related to my behavior, please file an issue against the [openshift-eng/jira-lifecycle-plugin](https://github.com/openshift-eng/jira-lifecycle-plugin/issues/new) repository.
petr-muller commented 1 month ago

/jira refresh

openshift-ci-robot commented 1 month ago

@petr-muller: This pull request references Jira Issue OCPBUGS-33762, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug * bug is open, matching expected state (open) * bug target version (4.17.0) matches configured target version for branch (4.17.0) * bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact: /cc @evakhoni

In response to [this](https://github.com/openshift/oc/pull/1773#issuecomment-2119017535): >/jira refresh Instructions for interacting with me using PR comments are available [here](https://prow.ci.openshift.org/command-help?repo=openshift%2Foc). If you have questions or suggestions related to my behavior, please file an issue against the [openshift-eng/jira-lifecycle-plugin](https://github.com/openshift-eng/jira-lifecycle-plugin/issues/new) repository.
petr-muller commented 1 month ago

/test e2e-aws-ovn-upgrade

Davoska commented 1 month ago

/lgtm

openshift-ci[bot] commented 1 month ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Davoska, petr-muller, wking

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: - ~~[pkg/cli/admin/upgrade/OWNERS](https://github.com/openshift/oc/blob/master/pkg/cli/admin/upgrade/OWNERS)~~ [Davoska,petr-muller,wking] 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 commented 1 month ago

/retest-required

Remaining retests: 0 against base HEAD 6e6bf1d848f1503b9be6369ab7a6fe814d0b980a and 2 for PR HEAD fad39d295dcd2bc0bab034f318e070ecbfae3a8f in total

openshift-ci[bot] commented 1 month ago

@petr-muller: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
openshift-ci-robot commented 1 month ago

@petr-muller: Jira Issue OCPBUGS-33762: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-33762 has been moved to the MODIFIED state.

In response to [this](https://github.com/openshift/oc/pull/1773): >Previous code used `GroupVersionKind` method on actual resources to determine group/kind strings for them, but client-go unfortunately drops `TypeMeta` on resources processed by typed client (https://github.com/kubernetes/client-go/issues/1328, https://github.com/kubernetes/client-go/issues/541). Fortunately we know what types we build insights for, so we can use appropriate strings from client code for groups and hardcode kinds ourselves. > Instructions for interacting with me using PR comments are available [here](https://prow.ci.openshift.org/command-help?repo=openshift%2Foc). If you have questions or suggestions related to my behavior, please file an issue against the [openshift-eng/jira-lifecycle-plugin](https://github.com/openshift-eng/jira-lifecycle-plugin/issues/new) repository.
openshift-bot commented 1 month ago

[ART PR BUILD NOTIFIER]

This PR has been included in build ose-tools-container-v4.17.0-202405212243.p0.g44e3cd9.assembly.stream.el9 for distgit ose-tools. All builds following this will include this PR.

petr-muller commented 1 month ago

/cherry-pick release-4.16

openshift-cherrypick-robot commented 1 month ago

@petr-muller: #1773 failed to apply on top of branch "release-4.16":

Applying: update status: minor code cleanups
Using index info to reconstruct a base tree...
A   pkg/cli/admin/upgrade/status/alerts.go
A   pkg/cli/admin/upgrade/status/alerts_test.go
Falling back to patching base and 3-way merge...
CONFLICT (modify/delete): pkg/cli/admin/upgrade/status/alerts_test.go deleted in HEAD and modified in update status: minor code cleanups. Version update status: minor code cleanups of pkg/cli/admin/upgrade/status/alerts_test.go left in tree.
CONFLICT (modify/delete): pkg/cli/admin/upgrade/status/alerts.go deleted in HEAD and modified in update status: minor code cleanups. Version update status: minor code cleanups of pkg/cli/admin/upgrade/status/alerts.go left in tree.
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 update status: minor code cleanups
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
In response to [this](https://github.com/openshift/oc/pull/1773#issuecomment-2124600305): >/cherry-pick release-4.16 Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
petr-muller commented 1 month ago

Hm, will needs alerts to land first :/

petr-muller commented 1 month ago

/cherry-pick release-4.16

openshift-cherrypick-robot commented 1 month ago

@petr-muller: new pull request created: #1796

In response to [this](https://github.com/openshift/oc/pull/1773#issuecomment-2148131640): >/cherry-pick release-4.16 Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.