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

Fix retrying in Helm e2e helper func #3789

Merged

Conversation

mboersma
Copy link
Contributor

@mboersma mboersma commented Aug 1, 2023

What type of PR is this?

/kind failing-test

What this PR does / why we need it:

Fixes a logic error in the refactoring of the InstallHelmChart helper function so it retries as intended if the command returns an error.

Which issue(s) this PR fixes:

Fixes #3787

Special notes for your reviewer:

I created a demo Ginkgo test suite to reproduce this and isolate the problem, then ported the now-obvious fix back to CAPZ. I did a before-and-after test locally with ./scripts/ci-e2e.sh and verified that we aren't currently retrying but that this change fixes that.

I guess the good news is that even without retry, the new implementation has only rarely failed. 😄

  • cherry-pick candidate

TODOs:

  • squashed commits
  • includes documentation
  • adds unit tests

Release note:

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Aug 1, 2023
@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Aug 1, 2023
@mboersma
Copy link
Contributor Author

mboersma commented Aug 1, 2023

/cc @Jont828

@CecileRobertMichon
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 1, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 4ba49f49587de8d3948ab4807c0bd18c35eccbcf

Copy link
Contributor

@nojnhuh nojnhuh left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

cmd := exec.Command(helm, args...)
Logf("Helm command: %s", cmd.String())
output, err := cmd.CombinedOutput()
Logf("Helm install output: %s", string(output))
Expect(err).NotTo(HaveOccurred())
Copy link
Contributor

Choose a reason for hiding this comment

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

FWIW, I think g.Expect(...) would have also fixed this issue.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nojnhuh

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 1, 2023
@codecov
Copy link

codecov bot commented Aug 1, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (05c4341) 54.38% compared to head (245f216) 54.38%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3789   +/-   ##
=======================================
  Coverage   54.38%   54.38%           
=======================================
  Files         187      187           
  Lines       19015    19015           
=======================================
  Hits        10342    10342           
  Misses       8115     8115           
  Partials      558      558           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mboersma
Copy link
Contributor Author

mboersma commented Aug 1, 2023

/cherry-pick release-1.10
/cherry-pick release-1.9

@k8s-infra-cherrypick-robot

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

In response to this:

/cherry-pick release-1.10
/cherry-pick release-1.9

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.

@k8s-ci-robot k8s-ci-robot merged commit 7e8c80b into kubernetes-sigs:main Aug 1, 2023
11 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.11 milestone Aug 1, 2023
@k8s-infra-cherrypick-robot

@mboersma: new pull request created: #3790

In response to this:

/cherry-pick release-1.10
/cherry-pick release-1.9

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.

@k8s-infra-cherrypick-robot

@mboersma: new pull request created: #3791

In response to this:

/cherry-pick release-1.10
/cherry-pick release-1.9

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.

@mboersma mboersma deleted the helm-are-you-even-retrying branch August 1, 2023 17:51
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Helm chart e2e helper not retrying
5 participants