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

NO-JIRA: add simple test for server side apply to demonstrate field clearing #28491

Merged
merged 1 commit into from Mar 23, 2024

Conversation

deads2k
Copy link
Contributor

@deads2k deads2k commented Jan 3, 2024

/assign @stevekuznetsov

fields clear when not set.

g.Fail("missing SecondType condition")
}
if containsCondition(currInstance.Status.Conditions, "FirstType") {
g.Fail("has FirstType condition unexectedly")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

notice this line doesn't execute because the condition is not present.

Copy link
Contributor

Choose a reason for hiding this comment

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

ErrUnexpectedTypo

Suggested change
g.Fail("has FirstType condition unexectedly")
g.Fail("has FirstType condition unexpectedly")

@openshift-ci openshift-ci bot requested review from bparees and jmguzik January 3, 2024 23:31
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 3, 2024
g.It("should clear fields when they are no longer being applied", func() {
ctx := context.Background()

// TODO use another API. I might have a version in my cache somewhere using a pod.
Copy link
Contributor

Choose a reason for hiding this comment

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

Use a type where the conditions have listType and listMapKey annotations.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Use a type where the conditions have listType and listMapKey annotations.

Updated to have tests with

  1. clusteroperator
  2. featuregate
  3. pods

behavior is consistent. This could be cleaned up in to a decent e2e test if it's valuable.

@openshift-trt-bot
Copy link

Job Failure Risk Analysis for sha: 9894c3e

Job Name Failure Risk
pull-ci-openshift-origin-master-e2e-aws-ovn-single-node-upgrade IncompleteTests
Tests for this run (424) are below the historical average (2017): IncompleteTests (not enough tests ran to make a reasonable risk analysis; this could be due to infra, installation, or upgrade problems)

g.Fail("missing SecondType condition")
}
if containsCondition(currInstance.Status.Conditions, "FirstType") {
g.Fail("has FirstType condition unexectedly")
Copy link
Contributor

Choose a reason for hiding this comment

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

ErrUnexpectedTypo

Suggested change
g.Fail("has FirstType condition unexectedly")
g.Fail("has FirstType condition unexpectedly")

g.It("should clear fields when they are no longer being applied in pods", func() {
ctx := context.Background()

// TODO use another API. I might have a version in my cache somewhere using a pod.
Copy link
Contributor

Choose a reason for hiding this comment

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

Still relevant?

g.Fail("missing SecondType condition")
}
if containsMetaCondition(currInstance.Status.Conditions, "FirstType") {
g.Fail("has FirstType condition unexectedly")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
g.Fail("has FirstType condition unexectedly")
g.Fail("has FirstType condition unexpectedly")

g.Fail("missing SecondType condition")
}
if containsPodCondition(currInstance.Status.Conditions, "FirstType") {
g.Fail("has FirstType condition unexectedly")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
g.Fail("has FirstType condition unexectedly")
g.Fail("has FirstType condition unexpectedly")

@deads2k deads2k force-pushed the proof-ssa branch 2 times, most recently from bc9df51 to 874047a Compare March 18, 2024 14:03
@JoelSpeed
Copy link
Contributor

/lgtm

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

openshift-ci bot commented Mar 18, 2024

[APPROVALNOTIFIER] This PR is APPROVED

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

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

Copy link
Contributor

openshift-ci bot commented Mar 18, 2024

@deads2k: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-aws-ovn-single-node-upgrade 1eb5134 link false /test e2e-aws-ovn-single-node-upgrade
ci/prow/e2e-agnostic-ovn-cmd 1eb5134 link false /test e2e-agnostic-ovn-cmd
ci/prow/e2e-metal-ipi-sdn 1eb5134 link false /test e2e-metal-ipi-sdn
ci/prow/e2e-gcp-ovn-rt-upgrade 1eb5134 link false /test e2e-gcp-ovn-rt-upgrade
ci/prow/e2e-aws-ovn-single-node-serial 1eb5134 link false /test e2e-aws-ovn-single-node-serial
ci/prow/e2e-aws-ovn-upgrade 1eb5134 link false /test e2e-aws-ovn-upgrade

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

@openshift-trt-bot
Copy link

Job Failure Risk Analysis for sha: 1eb5134

Job Name Failure Risk
pull-ci-openshift-origin-master-e2e-aws-ovn-upgrade High
[sig-apps] job-upgrade
This test has passed 100.00% of 24 runs on jobs ['periodic-ci-openshift-release-master-ci-4.16-e2e-aws-ovn-upgrade'] in the last 14 days.

@deads2k deads2k changed the title add simple test for server side apply to demonstrate field clearing NO-JIRA: add simple test for server side apply to demonstrate field clearing Mar 18, 2024
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Mar 18, 2024
@openshift-ci-robot
Copy link

@deads2k: This pull request explicitly references no jira issue.

In response to this:

/assign @stevekuznetsov

fields clear when not set.

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.

@deads2k deads2k added acknowledge-critical-fixes-only Indicates if the issuer of the label is OK with the policy. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. and removed jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. acknowledge-critical-fixes-only Indicates if the issuer of the label is OK with the policy. labels Mar 18, 2024
@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD 734b389 and 2 for PR HEAD 1eb5134 in total

@openshift-merge-bot openshift-merge-bot bot merged commit 49de0ae into openshift:master Mar 23, 2024
16 of 23 checks passed
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.

None yet

5 participants