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

Implement $ option to randomly choose yamls. #1157

Merged
merged 2 commits into from Mar 29, 2018
Merged

Implement $ option to randomly choose yamls. #1157

merged 2 commits into from Mar 29, 2018

Conversation

wusui
Copy link
Contributor

@wusui wusui commented Mar 20, 2018

This implements tracker #23208

Signed-off-by: Warren Usui wusui@redhat.com

This implements tracker #23208

Signed-off-by: Warren Usui <wusui@redhat.com>
@wusui
Copy link
Contributor Author

wusui commented Mar 20, 2018

The previous change randomly picked distro yamls but ran for each distro anyway. The problem was that the build_matrix changes were not sufficient to prevent this. This new code implements a PickRandom class in matrix.py which effectively models the Concat code, but instead on Concatenating all the yamls together, it randomly picks one instead. This seems to have fixed things when running the following test:

./virtualenv/bin/teuthology-suite -vv --ceph-repo https://github.com/ceph/ceph.git --suite-repo https://github.com/ceph/ceph.git --dry-run -c $CEPH_BRANCH -m ovh -s smoke -k distro -p 10000 -e $CEPH_QA_MAIL -t wusui-23208 --suite-branch wip-23208A

wip-2308A is a smoke test suite with $ entries in distro directories. grepping for os_type in the above output shows 27 runs (instead of the 50+ previously) and both ubuntu and Centos are checked.

Yuri -- can you test this please?

Copy link
Contributor

@yuriw yuriw left a comment

Choose a reason for hiding this comment

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

👍 yamls look better, maybe we compare old vs new to see how they are formed?

@yuriw
Copy link
Contributor

yuriw commented Mar 20, 2018

@wusui @zmc we probably need to update docs for this change. Where is it?

@wusui
Copy link
Contributor Author

wusui commented Mar 20, 2018 via email

@yuriw
Copy link
Contributor

yuriw commented Mar 20, 2018

@yuriw yuriw requested a review from zmc March 22, 2018 16:03
@yuriw
Copy link
Contributor

yuriw commented Mar 22, 2018

@wusui @zmc
I tried running smoke with "--distro ubuntu --distro-version 16.04" => http://pulpito.ceph.com/yuriw-2018-03-21_23:38:37-smoke-luminous-distro-basic-ovh/ and expected to see all jobs on ubuntu. We need to clarify correct behavior.

Existing behaviors - it seems as distro dir is included to the jobs yaml's, then command line args won't overwrite it (opposite what I expected, but as is)

Copy link
Member

@zmc zmc left a comment

Choose a reason for hiding this comment

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

This looks good! Could you add some tests to these files where appropriate please?

teuthology/suite/test/test_build_matrix.py
teuthology/suite/test/test_matrix.py

Signed-off-by: Warren Usui <wusui@redhat.com>
@wusui
Copy link
Contributor Author

wusui commented Mar 23, 2018

I have added suite tests for this change and pushed to wip-23208

@zmc
Copy link
Member

zmc commented Mar 23, 2018

@wusui I don't see your changes

@smithfarm
Copy link
Contributor

Changes should be pushed to wusui-23208 branch (not wip-23208) for them to appear in this PR

@zmc
Copy link
Member

zmc commented Mar 29, 2018

test this please
Edit: I want to see the output, and the last job has been deleted

Copy link
Member

@zmc zmc left a comment

Choose a reason for hiding this comment

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

Thanks @wusui!

@zmc zmc merged commit 3619cf3 into master Mar 29, 2018
@zmc zmc deleted the wusui-23208 branch March 29, 2018 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants