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

Support differentiation of OS distro in e2e tests #23466

Merged
merged 1 commit into from
Mar 26, 2016
Merged

Support differentiation of OS distro in e2e tests #23466

merged 1 commit into from
Mar 26, 2016

Conversation

andyzheng0831
Copy link

This change fixes issue #23221 by adding a flag "os-distro" in e2e testing framework. This flag inherits the value of env variable OS_DISTRIBUTION. The change also fixes the e2e test case of addon update for trusty by revising the testing code and kube-addons job in trusty master support.

I verified it by running 'go run hack/e2e.go --v --test --test_args="--ginkgo.focus=should\spropagate\sadd-on\sfile\schanges"'. Now this test case can pass on trusty.

@ixdy @roberthbailey @dchen1107 please review this change.

cc/ @wonderfly @fabioy FYI

@k8s-github-robot
Copy link

Labelling this PR as size/S

@k8s-github-robot k8s-github-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Mar 25, 2016
@k8s-bot
Copy link

k8s-bot commented Mar 25, 2016

GCE e2e build/test passed for commit 745c0170ba7f140834546442b6efd79654d8163d.

@k8s-bot
Copy link

k8s-bot commented Mar 25, 2016

GCE e2e build/test failed for commit d89c3340198ae428991e2336b494a7df193add2f.

Please reference the list of currently known flakes when examining this failure. If you request a re-test, you must reference the issue describing the flake.

@andyzheng0831
Copy link
Author

@k8s-bot test this issue: #23321

@k8s-bot
Copy link

k8s-bot commented Mar 25, 2016

GCE e2e build/test passed for commit d89c3340198ae428991e2336b494a7df193add2f.

@andyzheng0831
Copy link
Author

@ixdy we need to get this merged and cherry picked in 1.2 branch. Otherwise, the test case kube-addons update will keep failing in our 1.2 Jenkins. Please add a "cherrypick-candidate" label and mark it as 1.2 milestone. Thanks

@roberthbailey
Copy link
Contributor

I added the label & milestone.

@@ -102,6 +102,7 @@ export PATH=$(dirname "${e2e_test}"):"${PATH}"
--repo-root="${KUBE_ROOT}" \
--node-instance-group="${NODE_INSTANCE_GROUP:-}" \
--prefix="${KUBE_GCE_INSTANCE_PREFIX:-e2e}" \
--os-distro="${OS_DISTRIBUTION:-debian}" \
Copy link
Member

Choose a reason for hiding this comment

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

I'd prefer keeping defaults out of this file, leaving them only in e2e.go. instead do something like

${OS_DISTRIBUTION:+"--os-distro=${OS_DISTRIBUTION}"} \

so that we only include this flag when $OS_DISTRIBUTION is set.

Copy link
Member

Choose a reason for hiding this comment

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

also, is the canonical environment variable OS_DISTRIBUTION or KUBE_OS_DISTRIBUTION? I see both littered throughout, though I suspect KUBE_OS_DISTRIBUTION is what we want.

Copy link
Author

Choose a reason for hiding this comment

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

Will revise it.

@roberthbailey @ixdy, does jenkins running GKE tests use the env variable OS_DISTRIBUTION by default? If not, @wonderfly may need to add a line to export it in our own GKE jenkins jobs.

Copy link
Contributor

Choose a reason for hiding this comment

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

does jenkins running GKE tests use the env variable OS_DISTRIBUTION by default?

OS_DISTRIBUTION has a default value of debian. Only Trusty e2e jobs reset it AFAIK, through KUBE_OS_DISTRIBUTION.

https://github.com/kubernetes/kubernetes/blob/master/cluster/gce/config-test.sh#L38

Copy link
Member

Choose a reason for hiding this comment

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

this script doesn't source cluster/gce/config-test.sh though, so OS_DISTRIBUTION isn't going to be set.

Copy link
Author

Choose a reason for hiding this comment

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

If so, I think we need to use KUBE_OS_DISTRIBUTION and export it in our trusty-based jenkins jobs.

@ixdy
Copy link
Member

ixdy commented Mar 25, 2016

cc @kubernetes/sig-testing (do we have any CoreOS folks in this team?)

@ixdy
Copy link
Member

ixdy commented Mar 25, 2016

I think this may also cause issues for AWS, which uses a few different OS distros.

@andyzheng0831
Copy link
Author

I am not sure how important to make all e2e tests green on CoreOS or AWS. I guess the corresponding maintainer will make a call. CC them this change is a good idea. As for our "trusty" distro type, we have release cycles so we are trying to make everything green on it.

@andyzheng0831
Copy link
Author

@ixdy please check the newly updated version

@k8s-bot
Copy link

k8s-bot commented Mar 25, 2016

GCE e2e build/test failed for commit 57c807123b621bfd94dec67cc723e5ebe30fd72f.

Please reference the list of currently known flakes when examining this failure. If you request a re-test, you must reference the issue describing the flake.

@k8s-bot
Copy link

k8s-bot commented Mar 25, 2016

GCE e2e build/test passed for commit 364ac85.

@ixdy ixdy added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 25, 2016
@andyzheng0831
Copy link
Author

@wonderfly, after this PR is merged and cherry picked in 1.2 branch, please double check if our testing suite needs to explicitly export KUBE_OS_DISTRIBUTION=trusty.

@wonderfly
Copy link
Contributor

@wonderfly, after this PR is merged and cherry picked in 1.2 branch, please double check if our testing suite needs to explicitly export KUBE_OS_DISTRIBUTION=trusty.

Noted.

@k8s-github-robot
Copy link

@k8s-bot test this [submit-queue is verifying that this PR is safe to merge]

@k8s-bot
Copy link

k8s-bot commented Mar 26, 2016

GCE e2e build/test passed for commit 364ac85.

@k8s-github-robot
Copy link

@k8s-bot test this [submit-queue is verifying that this PR is safe to merge]

@k8s-bot
Copy link

k8s-bot commented Mar 26, 2016

GCE e2e build/test passed for commit 364ac85.

@k8s-github-robot
Copy link

Automatic merge from submit-queue

@k8s-github-robot k8s-github-robot merged commit 23fc790 into kubernetes:master Mar 26, 2016
@bgrant0607 bgrant0607 added the cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. label Mar 26, 2016
@bgrant0607
Copy link
Member

@andyzheng0831 This cherrypick is approved, but you need to create the cherrypick PR in order for it to get into the patch release.
https://github.com/kubernetes/kubernetes/blob/master/docs/devel/cherry-picks.md#individual-cherrypicks-post-xx0

@andyzheng0831
Copy link
Author

@bgrant0607 Thanks for the info, I will make it.

@spiffxp
Copy link
Member

spiffxp commented Mar 28, 2016

I'm struggling to understand why we're changing a timeout / polling value based on OS? What is it about the default value of TEST_ADDON_CHECK_INTERVAL_SEC=600 that isn't working here? Should the default maybe be changed instead?

@andyzheng0831
Copy link
Author

Please refer to the original test code
https://github.com/kubernetes/kubernetes/blob/master/test/e2e/addon_update.go#L215.
This is not a new logic added in my fix.

On Mon, Mar 28, 2016 at 11:36 AM, Aaron Crickenberger <
notifications@github.com> wrote:

I'm struggling to understand why we're changing a timeout / polling value
based on OS? What is it about the default value of
TEST_ADDON_CHECK_INTERVAL_SEC=600 that isn't working here? Should the
default maybe be changed instead?


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#23466 (comment)

@spiffxp
Copy link
Member

spiffxp commented Mar 28, 2016

got it, completely misread, thanks

bgrant0607 added a commit that referenced this pull request Mar 30, 2016
…-#23466-upstream-release-1.2

Automated cherry pick of #23466
@bgrant0607 bgrant0607 added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Mar 30, 2016
@k8s-cherrypick-bot
Copy link

Commit found in the "release-1.2" branch appears to be this PR. Removing the "cherrypick-candidate" label. If this is an error find help to get your PR picked.

@andyzheng0831 andyzheng0831 deleted the fix branch April 4, 2016 19:02
shyamjvs pushed a commit to shyamjvs/kubernetes that referenced this pull request Dec 1, 2016
…ry-pick-of-#23466-upstream-release-1.2

Automated cherry pick of kubernetes#23466
shouhong pushed a commit to shouhong/kubernetes that referenced this pull request Feb 14, 2017
…ry-pick-of-#23466-upstream-release-1.2

Automated cherry pick of kubernetes#23466
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.