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

Don't wait for hooks in kubectl cert-manager x install integration test #4342

Merged
merged 1 commit into from Aug 12, 2021

Conversation

inteon
Copy link
Member

@inteon inteon commented Aug 11, 2021

Integration tests are failing with a timeout error due to newly released Helm chart.
The integration test is performed against a fake kubernetes api-server, and the test only checks if the resources are created correctly.
The resources are not used to really deploy cert-manager in the tests, that is why we have to disable the post-install checks.
The newly-added post-install Helm hook in the v1.5 release was not yet disabled in the test; this causes a timeout error.

This PR disables the post-install Helm hook for the integration test.
Also included: use local chart instead of published chart in the integration test -> this should prevent this problem in the future

Release note:

NONE

/kind bug

…al chart for tests

Signed-off-by: Inteon <42113979+inteon@users.noreply.github.com>
@jetstack-bot jetstack-bot added kind/bug Categorizes issue or PR as related to a bug. dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 11, 2021
@jetstack-bot
Copy link
Collaborator

Hi @inteon. Thanks for your PR.

I'm waiting for a jetstack or cert-manager member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@jetstack-bot jetstack-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. area/testing Issues relating to testing labels Aug 11, 2021
@wallrj
Copy link
Member

wallrj commented Aug 12, 2021

/ok-to-test

@jetstack-bot jetstack-bot added ok-to-test release-note-none Denotes a PR that doesn't merit a release note. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Aug 12, 2021
Copy link
Member

@wallrj wallrj left a comment

Choose a reason for hiding this comment

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

Thanks @inteon

Just a couple of questions and a request for some further documentary comments.

// Helm supports 3 diffent combinations of the (Atomic, Wait) boolean couple:
// (False, False), (False, True) or (True, True)
// For simplicity, we want do not support Waiting without the Atomic option (False, True),
// this allows this cli to use a single --wait=(True|False) flag
Copy link
Member

Choose a reason for hiding this comment

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

I found this comment useful, but I also find the new, shorter comment, below, easier to read.
But what neither comment explains is why we don't also use Atomic=True, in the async install scenario (--wait=False).
That's my question....why don't we always set Atomic=True? Please answer that in a comment above the code, for future reference.


o.client.Wait = o.Wait // Wait for resources to be ready
o.client.Atomic = o.Wait // If part of the install fails (& we are waiting), all resource installs are reverted;
o.client.DisableHooks = !o.Wait // Disable hooks if wait is disabled
Copy link
Member

Choose a reason for hiding this comment

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

And maybe explain why we disable hooks if wait is disabled. Is it simply for the sake of getting the tests to pass? If so, that's fine, but make it clear in the comment.
What if we introduce a future hook which performs some post-install editing of the CRDs, for example? Then we'd want the hooks to be run regardless of the --wait flag.

Comment on lines +24 to +26
func GetTestPath(path ...string) string {
return filepath.Join(append([]string{os.Getenv("RUNFILES_DIR"), "com_github_jetstack_cert_manager"}, path...)...)
}
Copy link
Member

Choose a reason for hiding this comment

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

Document this function.

Copy link
Member

@wallrj wallrj left a comment

Choose a reason for hiding this comment

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

I'll merge this now to unblock everyone and we can address the comments in a future PR

/lgtm

@jetstack-bot jetstack-bot added the lgtm Indicates that a PR is ready to be merged. label Aug 12, 2021
@jetstack-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: inteon, wallrj

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

@jetstack-bot jetstack-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 12, 2021
@jetstack-bot jetstack-bot merged commit 6f37d33 into cert-manager:master Aug 12, 2021
@jetstack-bot jetstack-bot added this to the v1.5 milestone Aug 12, 2021
@inteon
Copy link
Member Author

inteon commented Aug 12, 2021

I made the requested changes. see #4347

@SgtCoDFish
Copy link
Member

SgtCoDFish commented Aug 13, 2021

/cherry-pick release-1.5

I'm assuming this won't work...

EDIT: oh yay it worked!

@jetstack-bot
Copy link
Collaborator

@SgtCoDFish: new pull request created: #4356

In response to this:

/cherry-pick release-1.5

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.

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. area/testing Issues relating to testing dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. ok-to-test release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants