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

[WIP] OCPBUGS-43692: Fix LB Type Defaulting with ProviderParameters Set #1160

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gcs278
Copy link
Contributor

@gcs278 gcs278 commented Oct 22, 2024

In the case that alreadyAdmitted was true and the IngressController's spec had providerParameters set, setDefaultProviderParameters incorrectly forced the LB type to Classic.

This fix relocates the alreadyAdmitted check to the logic responsible for mutating the LB type, rather than applying it to the logic that determines the defaultLBType value.

@openshift-ci-robot openshift-ci-robot added jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. 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 Oct 22, 2024
@openshift-ci-robot
Copy link
Contributor

@gcs278: This pull request references Jira Issue OCPBUGS-43692, which is invalid:

  • expected the bug to target the "4.18.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:

Most of the logic in setDefaultProviderParameters didn't execute if alreadyAdmitted is true. However, in the case alreadyAdmitted was true and the IngressController's spec had providerParameters set, setDefaultProviderParameters incorrectly forced the LB type to Classic.

There is no clear advantage to running
setDefaultProviderParameters when alreadyAdmitted is true. This fix removes alreadyAdmitted as a parameter from
setDefaultProviderParameters and instead prevents it from being invoked entirely when alreadyAdmitted is true.

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.

Copy link
Contributor

openshift-ci bot commented Oct 22, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from gcs278. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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 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 Oct 22, 2024
@openshift-ci-robot
Copy link
Contributor

@gcs278: This pull request references Jira Issue OCPBUGS-43692, 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.18.0) matches configured target version for branch (4.18.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @lihongan

In response to this:

Most of the logic in setDefaultProviderParameters didn't execute if alreadyAdmitted is true. However, in the case alreadyAdmitted was true and the IngressController's spec had providerParameters set, setDefaultProviderParameters incorrectly forced the LB type to Classic.

There is no clear advantage to running setDefaultProviderParameters when alreadyAdmitted is true. This fix removes alreadyAdmitted as a parameter from setDefaultProviderParameters and instead prevents it from being invoked entirely when alreadyAdmitted is true.

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 lihongan October 22, 2024 20:00
@gcs278 gcs278 changed the title OCPBUGS-43692: Fix LB Type Defaulting with ProviderParameters Set [WIP] OCPBUGS-43692: Fix LB Type Defaulting with ProviderParameters Set Oct 22, 2024
@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 Oct 22, 2024
@gcs278
Copy link
Contributor Author

gcs278 commented Oct 22, 2024

Found nil pointer exception, so back to the drawing board on how to approach this.

In the case that `alreadyAdmitted` was true and the IngressController's
spec had `providerParameters` set, `setDefaultProviderParameters`
incorrectly forced the LB type to `Classic`.

This fix relocates the `alreadyAdmitted` check to the logic responsible
for mutating the LB type, rather than applying it to the logic that
determines the `defaultLBType` value.
@gcs278 gcs278 force-pushed the OCPBUGS-43692-lb-type-defaulting-providerParms branch from 8935f7a to 304b7b6 Compare October 22, 2024 20:49
@openshift-ci-robot
Copy link
Contributor

@gcs278: This pull request references Jira Issue OCPBUGS-43692, which is valid.

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

Requesting review from QA contact:
/cc @lihongan

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

In response to this:

In the case that alreadyAdmitted was true and the IngressController's spec had providerParameters set, setDefaultProviderParameters incorrectly forced the LB type to Classic.

This fix relocates the alreadyAdmitted check to the logic responsible for mutating the LB type, rather than applying it to the logic that determines the defaultLBType value.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants