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

API-1835: Migrate WellKnownReadyController to SSA #705

Merged

Conversation

bertinatto
Copy link
Member

@bertinatto bertinatto commented Oct 1, 2024

Compared e2e-operator job from #709 with the same job from this PR:

verb_usage_comparison_auth

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Oct 1, 2024
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Oct 1, 2024

@bertinatto: This pull request references API-1835 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 epic to target the "4.18.0" version, but no target version was set.

In response to this:

/hold
Depends on #698.

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/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 1, 2024
@bertinatto
Copy link
Member Author

/hold
for #698

@bertinatto
Copy link
Member Author

/retest-required

@bertinatto bertinatto force-pushed the try-apply-wellknown-controller branch 2 times, most recently from beab95d to 881a669 Compare October 4, 2024 18:59
@bertinatto
Copy link
Member Author

/hold for #698

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 4, 2024
@bertinatto
Copy link
Member Author

/retest

@bertinatto
Copy link
Member Author

/test all

@bertinatto
Copy link
Member Author

/test e2e-operator

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Oct 7, 2024

@bertinatto: This pull request references API-1835 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 epic to target the "4.18.0" version, but no target version was set.

In response to this:

Compared e2e-operator job from #709 with the same job from this PR:

verb_usage_comparison_auth

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.

progressing,
}
for _, condition := range conditions {
if condition != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

what happens to a condition that is nil ? I think it will be removed. Is this what we want :) ?

Copy link
Member Author

Choose a reason for hiding this comment

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

IIUC it won't be removed because the field is a listType=map. Based on this, we should only update the condition we are specifically interested in and leave the other existing conditions untouched.

This logic (only apply valid, non-nil conditions) was introduced to align with the current behavior. For example, imagine get into this branch:

https://github.com/openshift/cluster-authentication-operator/pull/705/files#diff-b6f4bf160fd7e801eadfbfac60b84bd00fcad21a0979c2d730549f10db015645R136-L125

Under the current behavior, only the available condition is set, the progressing condition is ignored.

I did try to set the progressing condition unconditionally, but that's not what CI expects.

Does that make sense?

Copy link
Contributor

Choose a reason for hiding this comment

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

with SSA and listType=map, the behavior goes liek this

  1. SSA for fieldmanager/one that sets condition/foo and condition/bar
  2. objectect has condition/foo and condition/bar
  3. SSA for fieldmanager/one, sets condition/bar
  4. object has condition/bar, condition/foo is removed

I suspect we wnt to always set available adn progressing.

Copy link
Member Author

Choose a reason for hiding this comment

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

hm, what if step 3 is:

  1. SSA for fieldmanager/two sets condition/baz

then step 4 would be:

  1. object has condition/bar, condition/foo and condition/baz?

is that correct?

Copy link
Contributor

Choose a reason for hiding this comment

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

is that correct?

Yes. The fieldmanager/2 doesn't manipulate the conditions provided by fieldmanager/1

Copy link
Contributor

Choose a reason for hiding this comment

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

@bertinatto are you willing to check the controls that have already been changed and make sure they don't have this issue?

@bertinatto bertinatto force-pushed the try-apply-wellknown-controller branch 2 times, most recently from 0d0821a to b8a27c0 Compare October 8, 2024 16:49
@bertinatto
Copy link
Member Author

/retest

WithStatus(operatorv1.ConditionFalse)
progressing := applyoperatorv1.OperatorCondition().
WithType(common.ControllerProgressingConditionName(controllerName)).
WithStatus(operatorv1.ConditionTrue)
Copy link
Contributor

Choose a reason for hiding this comment

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

This condition will be changed when the the code enters line 138. It might be changed from progressing=false to progressing=true, not ideal. Do we care ?

I'm just wondering if, in this case, it would be better to read the previously applied condition and use it.
Thoughts ?

@bertinatto
Copy link
Member Author

/retest

@bertinatto bertinatto force-pushed the try-apply-wellknown-controller branch from b8a27c0 to fd3b5d5 Compare October 9, 2024 14:10
@bertinatto
Copy link
Member Author

/retest

@deads2k
Copy link
Contributor

deads2k commented Oct 11, 2024

required followups, but not fatal

/lgtm
/approve

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Oct 11, 2024
Copy link
Contributor

openshift-ci bot commented Oct 11, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bertinatto, deads2k

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 Oct 11, 2024
@deads2k
Copy link
Contributor

deads2k commented Oct 11, 2024

/override ci/prow/e2e-operator

Copy link
Contributor

openshift-ci bot commented Oct 11, 2024

@deads2k: Overrode contexts on behalf of deads2k: ci/prow/e2e-operator

In response to this:

/override ci/prow/e2e-operator

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.

Copy link
Contributor

openshift-ci bot commented Oct 11, 2024

@bertinatto: 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 2d71f16 into openshift:master Oct 11, 2024
11 checks passed
@openshift-bot
Copy link
Contributor

[ART PR BUILD NOTIFIER]

Distgit: ose-cluster-authentication-operator
This PR has been included in build ose-cluster-authentication-operator-container-v4.18.0-202410112106.p0.g2d71f16.assembly.stream.el9.
All builds following this will include this PR.

bertinatto added a commit to bertinatto/cluster-authentication-operator that referenced this pull request Oct 12, 2024
This is a follow-up requirements from deads2k:
openshift#705 (comment)
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. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants