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

Reinstate webhook tests #1072

Merged

Conversation

rajivnathan
Copy link
Contributor

It's the follow up to #1070 to re-enable the webhook tests

Copy link

sonarcloud bot commented Nov 26, 2024

@@ -2296,11 +2295,6 @@ func (a *MemberAwaitility) verifySecret(t *testing.T) []byte {
}

func (a *MemberAwaitility) verifyMutatingWebhookConfig(t *testing.T, ca []byte) {
if val := os.Getenv("skip-webhook-checks-on-setup"); val == "true" {
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess we can keep these checks for the future use and just remove the t.Setenv("skip-webhook-checks-on-setup", "true") above?

// set env var to skip the mutating webhook check on migration setup temporarily since the old deployment
// will deploy the webhooks with the old configuration but the tests will be expecting the new configuration
// This should be removed after PR https://github.com/codeready-toolchain/toolchain-e2e/pull/809 is merged
t.Setenv("skip-webhook-checks-on-setup", "true")
Copy link
Contributor

Choose a reason for hiding this comment

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

in addition to Alexey's comment maybe we could keep this commented so that we can just uncomment when needed. WDYT? Of course adjusting a bit the description above.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm sorry, but why did we actually need this configuration option at the first place?
There was a split of the init wait logic to two functions:

  • WaitForOperators (used in setup_migration_test test suite)
  • WaitForDeployments (used in all other cases)

where the first one only waits until the operators are deployed, so we don't need to deal with these chicken-egg problems.

As I see it, the original PR should have worked without having this configuration hack & environment set.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The webhook test was failing so I thought it was due to the migration thing. I forgot that we made the change to the wait logic. I guess there was something actually wrong with the webhook tests then.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah, I checked the failure in the other PR and it wasn't related to setup migration test suite.
Anyway, let's drop this and keep an eye on any flakiness/failures related to migration.

@rajivnathan
Copy link
Contributor Author

/retest

Copy link

openshift-ci bot commented Nov 26, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alexeykazakov, MatousJobanek, rajivnathan

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:
  • OWNERS [MatousJobanek,alexeykazakov,rajivnathan]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@rajivnathan rajivnathan merged commit f22abed into codeready-toolchain:master Nov 26, 2024
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants