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

Normalize tests invocation #12367

Merged
merged 1 commit into from
Jul 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 38 additions & 38 deletions bots/image-refresh
Original file line number Diff line number Diff line change
Expand Up @@ -28,79 +28,79 @@ from task import github, REDHAT_STORE

TRIGGERS = {
"centos-7": [
"cockpit/centos-7@cockpit-project/starter-kit",
"centos-7@cockpit-project/starter-kit",
],
"continuous-atomic": [
"cockpit/continuous-atomic@cockpit-project/cockpit-ostree",
"continuous-atomic@cockpit-project/cockpit-ostree",
],
"debian-testing": [
"verify/debian-testing"
"debian-testing"
],
"debian-stable": [
"verify/debian-stable"
"debian-stable"
],
"fedora-29": [
"verify/fedora-atomic",
"cockpit/fedora-29@cockpit-project/cockpit-podman",
"fedora-atomic",
"fedora-29@cockpit-project/cockpit-podman",
],
"fedora-30": [
"verify/fedora-30",
"selenium/chrome",
"selenium/firefox",
"selenium/edge",
"avocado/fedora",
"container/bastion",
"cockpit/fedora-30@cockpit-project/starter-kit",
"cockpit/fedora-30@cockpit-project/cockpit-podman",
"cockpit/fedora-30@weldr/lorax",
"cockpit/fedora-30/live-iso@weldr/lorax",
"cockpit/fedora-30/qcow2@weldr/lorax",
"cockpit/fedora-30/chrome@weldr/cockpit-composer",
"cockpit/fedora-30/firefox@weldr/cockpit-composer",
"cockpit/fedora-30/edge@weldr/cockpit-composer",
"fedora-30",
"fedora-30/selenium-chrome",
"fedora-30/selenium-firefox",
"fedora-30/selenium-edge",
"fedora-30/avocado",
"fedora-30/container-bastion",
"fedora-30@cockpit-project/starter-kit",
"fedora-30@cockpit-project/cockpit-podman",
"fedora-30@weldr/lorax",
"fedora-30/live-iso@weldr/lorax",
"fedora-30/qcow2@weldr/lorax",
"fedora-30/chrome@weldr/cockpit-composer",
"fedora-30/firefox@weldr/cockpit-composer",
"fedora-30/edge@weldr/cockpit-composer",
],
"fedora-atomic": [
"verify/fedora-atomic",
"cockpit/fedora-atomic@cockpit-project/cockpit-ostree",
"fedora-atomic",
"fedora-atomic@cockpit-project/cockpit-ostree",
],
"fedora-testing": [
"verify/fedora-testing"
"fedora-testing"
],
"fedora-i386": [
"verify/fedora-i386"
"fedora-i386"
],
"ubuntu-1804": [
"verify/ubuntu-1804"
"ubuntu-1804"
],
"ubuntu-stable": [
"verify/ubuntu-stable"
"ubuntu-stable"
],
"openshift": [
# FIXME: need to test a rhel-7.x branch here, once we can
],
"ipa": [
"verify/fedora-30",
"verify/ubuntu-1804",
"verify/debian-stable"
"fedora-30",
"ubuntu-1804",
"debian-stable"
],
"selenium": [
"selenium/chrome",
"selenium/firefox",
"fedora-30/selenium-chrome",
"fedora-30/selenium-firefox",
],
"rhel-7-7": [
"cockpit/rhel-7-7/firefox@weldr/cockpit-composer",
"rhel-7-7/firefox@weldr/cockpit-composer",
],
"rhel-8-0": [
"verify/rhel-8-0",
"verify/rhel-8-0-distropkg",
"rhel-8-0",
"rhel-8-0-distropkg",
],
"rhel-8-1": [
"verify/rhel-8-1",
"cockpit/rhel-8-1/chrome@weldr/cockpit-composer",
"cockpit/rhel-8-1@cockpit-project/cockpit-podman",
"rhel-8-1",
"rhel-8-1/chrome@weldr/cockpit-composer",
"rhel-8-1@cockpit-project/cockpit-podman",
],
"rhel-atomic": [
"cockpit/rhel-atomic@cockpit-project/cockpit-ostree",
"rhel-atomic@cockpit-project/cockpit-ostree",
]
}

Expand Down
19 changes: 5 additions & 14 deletions bots/task/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import subprocess
import re

from . import cache
from . import cache, testmap

__all__ = (
'GitHub',
Expand All @@ -55,16 +55,6 @@
# it will publish a test task to the queue (used to trigger specific contexts)
NOT_TESTED_DIRECT = "Not yet tested (direct trigger)"

OUR_CONTEXTS = [
"verify/",
"avocado/",
"container/",
"selenium/",

# generic prefix for external repos
"cockpit/",
]

ISSUE_TITLE_IMAGE_REFRESH = "Image refresh for {0}"

BASE = os.path.normpath(os.path.join(os.path.dirname(__file__), "..", ".."))
Expand All @@ -73,9 +63,10 @@
TEAM_CONTRIBUTORS = "Contributors"

def known_context(context):
for prefix in OUR_CONTEXTS:
if context.startswith(prefix):
return True
for project in testmap.projects():
for branch_tests in testmap.tests_for_project(project).values():
if context in branch_tests:
return True
Copy link
Member Author

Choose a reason for hiding this comment

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

One problem with this - this will mark fedora-30/verify as unknown context although it is equivalent to fedora-30 which would be a known context. Is this a problem and should this just split context at \ and then split also all contexts from the map and check it exists?

Copy link
Member

Choose a reason for hiding this comment

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

It's a bit unfortunate, but I don't think it will be a real-life problem. In principle we have this problem today already with non-cockpit problems. I think it's fine to start with the convention that the "verify" scenario isn't spelled out.

return False

class Logger(object):
Expand Down
107 changes: 54 additions & 53 deletions bots/task/testmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,97 +17,98 @@

REPO_BRANCH_CONTEXT = {
'cockpit-project/cockpit': {
'master': ['avocado/fedora', 'container/bastion',
'selenium/firefox', 'selenium/chrome', 'selenium/edge',
'verify/debian-stable', 'verify/debian-testing',
'verify/ubuntu-1804', 'verify/ubuntu-stable',
'verify/fedora-30', 'verify/fedora-atomic',
'verify/rhel-8-0-distropkg', 'verify/rhel-8-1',
'master': ['fedora-30/avocado', 'fedora-30/container-bastion',
'fedora-30/selenium-firefox', 'fedora-30/selenium-chrome', 'fedora-30/selenium-edge',
'debian-stable', 'debian-testing',
'ubuntu-1804', 'ubuntu-stable',
'fedora-30', 'fedora-atomic',
'rhel-8-0-distropkg', 'rhel-8-1',
],
'rhel-7.6': ['avocado/fedora', 'container/kubernetes', 'container/bastion',
'selenium/firefox', 'selenium/chrome', 'verify/rhel-7-6',
'rhel-7.6': ['fedora-30/avocado', 'fedora-30/container-kubernetes', 'fedora-30/container-bastion',
'fedora-30/selenium-firefox', 'fedora-30/selenium-chrome', 'rhel-7-6',
],
'rhel-7.7': ['avocado/fedora', 'container/kubernetes', 'container/bastion',
'selenium/firefox', 'selenium/chrome', 'verify/rhel-7-7',
'rhel-7.7': ['fedora-30/avocado-fedora', 'fedora-30/container-kubernetes',
Copy link
Member Author

Choose a reason for hiding this comment

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

containers, avocado and selenium are always F30 no matter which branch, right?

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 rather not make this assumption. We regularly update the image for these, and then also (have to) update the stable branches to keep up. But the point of this is to be more flexible, and always specify the OS. What's the background of your question?

'fedora-30/container-bastion', 'fedora-30/selenium-firefox', 'fedora-30/selenium-chrome', 'rhel-7-7',
],
'rhel-8.0': ['avocado/fedora', 'container/bastion', 'selenium/firefox', 'selenium/chrome',
'verify/rhel-8-0',
'rhel-8.0': ['fedora-30/avocado-fedora', 'fedora-30/container-bastion',
'fedora-30/selenium-firefox', 'fedora-30/selenium-chrome',
'rhel-8-0',
],
'rhel-8-appstream': ['avocado/fedora', 'container/bastion', 'selenium/firefox',
'selenium/chrome', 'verify/rhel-8-0-distropkg', 'verify/rhel-8-1',
'rhel-8-appstream': ['fedora-30/avocado-fedora', 'fedora-30/container-bastion',
'fedora-30/selenium-firefox', 'fedora-30/selenium-chrome', 'rhel-8-0-distropkg', 'rhel-8-1',
],
'rhel-8.1': ['verify/rhel-8-1',
'rhel-8.1': ['rhel-8-1',
],
# These can be triggered manually with bots/tests-trigger
'_manual': ['verify/fedora-i386', 'verify/fedora-testing',
'_manual': ['fedora-i386', 'fedora-testing',
],
},
'cockpit-project/starter-kit': {
'master': [
'cockpit/centos-7',
'cockpit/fedora-30',
'centos-7',
'fedora-30',
],
},
'cockpit-project/cockpit-ostree': {
'master': [
'cockpit/fedora-atomic',
'cockpit/continuous-atomic',
'cockpit/rhel-atomic',
'fedora-atomic',
'continuous-atomic',
'rhel-atomic',
],
},
'cockpit-project/cockpit-podman': {
'master': [
'cockpit/fedora-29',
'cockpit/fedora-30',
'cockpit/rhel-8-1',
'fedora-29',
'fedora-30',
'rhel-8-1',
],
},
'weldr/lorax': {
'master': [
'cockpit/fedora-30',
'cockpit/fedora-30/live-iso',
'cockpit/fedora-30/qcow2',
'cockpit/fedora-30/aws',
'cockpit/fedora-30/openstack',
'cockpit/fedora-30/vmware',
'fedora-30',
'fedora-30/live-iso',
'fedora-30/qcow2',
'fedora-30/aws',
'fedora-30/openstack',
'fedora-30/vmware',
],
'_manual': [
'cockpit/fedora-30/azure',
'fedora-30/azure',

'cockpit/rhel-8-1',
'cockpit/rhel-8-1/live-iso',
'cockpit/rhel-8-1/qcow2',
'cockpit/rhel-8-1/aws',
'cockpit/rhel-8-1/azure',
'cockpit/rhel-8-1/openstack',
'cockpit/rhel-8-1/vmware',
'rhel-8-1',
'rhel-8-1/live-iso',
'rhel-8-1/qcow2',
'rhel-8-1/aws',
'rhel-8-1/azure',
'rhel-8-1/openstack',
'rhel-8-1/vmware',
],
'rhel7-extras': [
'cockpit/rhel-7-7',
'cockpit/rhel-7-7/live-iso',
'cockpit/rhel-7-7/qcow2',
'cockpit/rhel-7-7/aws',
'cockpit/rhel-7-7/azure',
'cockpit/rhel-7-7/openstack',
'cockpit/rhel-7-7/vmware',
'rhel-7-7',
'rhel-7-7/live-iso',
'rhel-7-7/qcow2',
'rhel-7-7/aws',
'rhel-7-7/azure',
'rhel-7-7/openstack',
'rhel-7-7/vmware',
],
},
'weldr/cockpit-composer': {
'master': [
'cockpit/fedora-30/chrome',
'cockpit/fedora-30/firefox',
'cockpit/fedora-30/edge',
'cockpit/rhel-7-7/firefox',
'cockpit/rhel-8-1/chrome',
'fedora-30/chrome',
'fedora-30/firefox',
'fedora-30/edge',
'rhel-7-7/firefox',
'rhel-8-1/chrome',
],
'rhel-8.0': ['cockpit/rhel-8-0/chrome', 'cockpit/rhel-8-0/firefox', 'cockpit/rhel-8-0/edge'
'rhel-8.0': ['rhel-8-0/chrome', 'rhel-8-0/firefox', 'rhel-8-0/edge'
],
'rhel-8.1': ['cockpit/rhel-8-1/chrome', 'cockpit/rhel-8-1/firefox', 'cockpit/rhel-8-1/edge'
'rhel-8.1': ['rhel-8-1/chrome', 'rhel-8-1/firefox', 'rhel-8-1/edge'
],
},
'mvollmer/subscription-manager': {
'_manual': [
'cockpit/rhel-8-0',
'rhel-8-0',
],
}
}
Expand Down
Loading