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

OCPBUGS-32682: Fix the retrieval of API objects with an empty name #1765

Conversation

Davoska
Copy link
Contributor

@Davoska Davoska commented May 14, 2024

The main goal of this pull request is to fix an occurring error that resulted in the error
message: error: resource name may not be empty

This was caused by not checking the value of the
machineconfiguration.openshift.io/currentConfig and
machineconfiguration.openshift.io/desiredConfig annotations of nodes.

In the event, the annotation was not set or was empty, the command would
try to get a MachineConfig with an empty name from the API server.

The commit also adds additional functionalities and testing for cases
when different MCD annotations are missing.

The general strategy is to declare the states of nodes only when they
are provably in the specific states.

This pull request references https://issues.redhat.com//browse/OCPBUGS-32682

@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels May 14, 2024
@openshift-ci-robot
Copy link

@Davoska: This pull request references Jira Issue OCPBUGS-32682, which is invalid:

  • expected the bug to target the "4.16.0" version, but no target version was set

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:

TBD

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.

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 14, 2024
Copy link
Contributor

openshift-ci bot commented May 14, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 14, 2024
@petr-muller
Copy link
Member

/test

@petr-muller
Copy link
Member

/test all

Copy link
Contributor

openshift-ci bot commented May 14, 2024

@petr-muller: The /test command needs one or more targets.
The following commands are available to trigger required jobs:

  • /test build-rpms-from-tar
  • /test e2e-agnostic-ovn-cmd
  • /test e2e-aws-ovn
  • /test e2e-aws-ovn-builds
  • /test e2e-aws-ovn-serial
  • /test e2e-aws-ovn-upgrade
  • /test images
  • /test rpm-build
  • /test unit
  • /test verify
  • /test verify-deps

The following commands are available to trigger optional jobs:

  • /test e2e-aws-certrotation
  • /test e2e-metal-ipi-ovn-ipv6
  • /test okd-scos-images
  • /test security

Use /test all to run the following jobs that were automatically triggered:

  • pull-ci-openshift-oc-master-build-rpms-from-tar
  • pull-ci-openshift-oc-master-e2e-agnostic-ovn-cmd
  • pull-ci-openshift-oc-master-e2e-aws-ovn
  • pull-ci-openshift-oc-master-e2e-aws-ovn-serial
  • pull-ci-openshift-oc-master-e2e-aws-ovn-upgrade
  • pull-ci-openshift-oc-master-e2e-metal-ipi-ovn-ipv6
  • pull-ci-openshift-oc-master-images
  • pull-ci-openshift-oc-master-rpm-build
  • pull-ci-openshift-oc-master-security
  • pull-ci-openshift-oc-master-unit
  • pull-ci-openshift-oc-master-verify
  • pull-ci-openshift-oc-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.

@petr-muller
Copy link
Member

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels May 14, 2024
@openshift-ci-robot
Copy link

@petr-muller: This pull request references Jira Issue OCPBUGS-32682, 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.16.0) matches configured target version for branch (4.16.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:

/jira 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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot requested a review from evakhoni May 14, 2024 13:09
@petr-muller
Copy link
Member

/label tide/merge-method-squash

This commit will fix an occuring error that resulted in the error
message: `error: resource name may not be empty`

This was caused by not checking the value of the
machineconfiguration.openshift.io/currentConfig and
machineconfiguration.openshift.io/desiredConfig annotations of nodes.

In the event, the annotation was not set or was empty, the command would
try to get a MachineConfig with an empty name from the API server.

The commit also adds additional functionalities and testing for cases
when different MCD annotations are missing.

The general strategy is to declare the states of nodes only when they
are provably in the specific states.
@openshift-ci openshift-ci bot added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label May 14, 2024
@Davoska Davoska force-pushed the OCPBUGS-32682-status-fails-with-error branch from 6926a96 to 5bc86a6 Compare May 14, 2024 13:13
@openshift-ci-robot
Copy link

@Davoska: This pull request references Jira Issue OCPBUGS-32682, which is valid.

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

Requesting review from QA contact:
/cc @evakhoni

In response to this:

The main goal of this pull request is to fix an occurring error that resulted in the error
message: error: resource name may not be empty

This was caused by not checking the value of the
machineconfiguration.openshift.io/currentConfig and
machineconfiguration.openshift.io/desiredConfig annotations of nodes.

In the event, the annotation was not set or was empty, the command would
try to get a MachineConfig with an empty name from the API server.

The commit also adds additional functionalities and testing for cases
when different MCD annotations are missing.

The general strategy is to declare the states of nodes only when they
are provably in the specific states.

This pull request references https://issues.redhat.com//browse/OCPBUGS-32682

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.

@Davoska Davoska marked this pull request as ready for review May 14, 2024 13:15
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 14, 2024
Copy link
Member

@petr-muller petr-muller left a comment

Choose a reason for hiding this comment

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

Reviewed in pairing session, LGTM

@openshift-ci openshift-ci bot requested review from ardaguclu and deads2k May 14, 2024 13:29
@petr-muller
Copy link
Member

/lgtm

I always forget 😓

@petr-muller
Copy link
Member

/label acknowledge-critical-fixes-only

@openshift-ci openshift-ci bot added the acknowledge-critical-fixes-only Indicates if the issuer of the label is OK with the policy. label May 14, 2024
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label May 14, 2024
Copy link
Contributor

openshift-ci bot commented May 14, 2024

[APPROVALNOTIFIER] This PR is APPROVED

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

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
Copy link

/retest-required

Remaining retests: 0 against base HEAD e63d210 and 2 for PR HEAD 3a05bf3 in total

Copy link
Contributor

openshift-ci bot commented May 14, 2024

@Davoska: all tests passed!

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@openshift-merge-bot openshift-merge-bot bot merged commit 1073b29 into openshift:master May 14, 2024
13 checks passed
@openshift-ci-robot
Copy link

@Davoska: Jira Issue OCPBUGS-32682: All pull requests linked via external trackers have merged:

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

In response to this:

The main goal of this pull request is to fix an occurring error that resulted in the error
message: error: resource name may not be empty

This was caused by not checking the value of the
machineconfiguration.openshift.io/currentConfig and
machineconfiguration.openshift.io/desiredConfig annotations of nodes.

In the event, the annotation was not set or was empty, the command would
try to get a MachineConfig with an empty name from the API server.

The commit also adds additional functionalities and testing for cases
when different MCD annotations are missing.

The general strategy is to declare the states of nodes only when they
are provably in the specific states.

This pull request references https://issues.redhat.com//browse/OCPBUGS-32682

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.

@openshift-bot
Copy link
Contributor

[ART PR BUILD NOTIFIER]

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
acknowledge-critical-fixes-only Indicates if the issuer of the label is OK with the policy. approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants