Skip to content

Conversation

@copejon
Copy link
Contributor

@copejon copejon commented Jan 23, 2026

No description provided.

@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 Jan 23, 2026
@openshift-ci-robot
Copy link

@copejon: This pull request references Jira Issue OCPBUGS-71236, which is invalid:

  • expected the bug to target either version "4.22." or "openshift-4.22.", but it targets "4.21.z" instead

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.

Details

In response to this:

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 review from ggiguash and pacevedom January 23, 2026 22:57
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 23, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: copejon

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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 Jan 23, 2026
@copejon
Copy link
Contributor Author

copejon commented Jan 26, 2026

TODO: I need to update rf featuregate tests

@copejon copejon force-pushed the ocpbugs-71236-validation branch from f83244c to 96c9356 Compare January 26, 2026 23:06
@agullon
Copy link
Contributor

agullon commented Jan 27, 2026

it looks good to me

Makefile Outdated

# Set variables for test-unit target
GO_TEST_FLAGS=$(GO_BUILD_FLAGS)
GO_TEST_ARGS=$(GO_LD_FLAGS)
Copy link
Member

Choose a reason for hiding this comment

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

I can't find it being used anywhere either in our code or deps/ or vendor/. Why do we need it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is to enable unit testing featuregate prerun functions that handle version skew validation for upgrade/downgrades.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm glad you pointed this out. Relying on the buildflag version values wasn't entirely in line with how the unit tests were checking the validation functions. The cleaner solution was to mock the function that validation used to get the compiled version values and override it in tests to manipulate the version values as needed.

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 28, 2026
@copejon
Copy link
Contributor Author

copejon commented Jan 28, 2026

/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 Jan 28, 2026
@openshift-ci-robot
Copy link

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

Requesting review from QA contact:
/cc @jogeo

Details

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 jogeo January 28, 2026 20:39
removed: RF tests related to version detection. these are covered sufficiently by unit tests
@copejon copejon force-pushed the ocpbugs-71236-validation branch from 4d4f5b6 to a27e240 Compare January 28, 2026 22:10
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 28, 2026
Added getExecutableVersion function variable to allow mocking the executable version in tests (the version is normally set via ldflags at compile time, making it impossible to test upgrade/downgrade scenarios without mocking)

Updated TestFeatureGateLockManagement_FirstRun, TestFeatureGateLockManagement_ConfigChange, and TestFeatureGateLockManagement_VersionChange to mock the version instead of relying on ldflags
Removed GO_TEST_ARGS from Makefile since ldflags are no longer required for unit tests
@copejon
Copy link
Contributor Author

copejon commented Jan 29, 2026

/cherrypick release-4.21

@openshift-cherrypick-robot

@copejon: once the present PR merges, I will cherry-pick it on top of release-4.21 in a new PR and assign it to you.

Details

In response to this:

/cherrypick release-4.21

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.

Comment on lines 832 to 842
{
name: "feature-gates-custom-no-upgrade-with-feature-set-empty",
config: func() *Config {
c := mkDefaultConfig()
c.ApiServer.FeatureGates.FeatureSet = ""
c.ApiServer.FeatureGates.CustomNoUpgrade.Enabled = []string{"feature1"}
c.ApiServer.FeatureGates.CustomNoUpgrade.Disabled = []string{"feature2"}
return c
}(),
expectErr: true,
},
Copy link
Contributor

Choose a reason for hiding this comment

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

because you are removing this test, I understand the following configuration is a valid one, right? If so, I'd prefer to change the expectErr: to false

apiServer:
  featureGates:
    featureSet: ""
    customNoUpgrade:
      enabled:
      - "CPUManagerPolicyBetaOptions"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right, the case is not validated. I'll re-add and set expectErr to false.

c.ApiServer.FeatureGates.CustomNoUpgrade.Disabled = []string{"feature2"}
return c
}(),
expectErr: true,
Copy link
Contributor

Choose a reason for hiding this comment

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

Wouldn't be better to change the expectErr instead of removing the whole test?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will revert and flip expectErr

@copejon
Copy link
Contributor Author

copejon commented Jan 29, 2026

/verified by copejon,ci

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Jan 29, 2026
@openshift-ci-robot
Copy link

@copejon: This PR has been marked as verified by copejon,ci.

Details

In response to this:

/verified by copejon,ci

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

openshift-ci bot commented Jan 29, 2026

@copejon: all tests passed!

Full PR test history. Your PR dashboard.

Details

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.

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-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. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants