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

feat(k8s): introduce several retry functions to deal w/ flaky apis #1219

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mhulscher
Copy link

Description

To deal with flaky kube-apiservers we wrote several retry functions. Related issue: aws/containers-roadmap#1810 (comment)

I am unsure whether these functions will be considered, but it was little effort to make a PR.

TODOs

Read the Gruntwork contribution guidelines.

  • Update the docs.
  • Run the relevant tests successfully, including pre-commit checks.
  • Include release notes. If this PR is backward incompatible, include a migration guide.

Release Notes (draft)

Added k8s functions: RunKubectlWithRetry, RunKubectlWithRetryE, RunKubectlAndGetOutputWithRetry, RunKubectlAndGetOutputWithRetryE, KubectlApplyFromStringWithRetry, KubectlApplyFromStringWithRetryE

Migration Guide

N/A

@mhulscher
Copy link
Author

If these additions are acceptable, I can consider writing tests. However, I am unable to run any existing test. For example I tried running this (go test -timeout 30m -run TestRunKubectlAndGetOutputReturnsOutput) in either the root of the project or the modules/k8s directory, and I am told that there are no tests to run. I am not a developer so this is entirely my fault, so I could use some pointers here :)

@denis256
Copy link
Member

Hi,
to run Kubernetes-specific tests should be used tag kubernetes, go test --tags=kubernetes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants