Skip to content

Commit

Permalink
Merge "Keep CI up-to-date"
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul authored and openstack-gerrit committed May 19, 2023
2 parents 8fe8ea1 + 1694ddc commit e65935a
Show file tree
Hide file tree
Showing 21 changed files with 313 additions and 318 deletions.
10 changes: 5 additions & 5 deletions .zuul.d/install-jobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
timeout: 1800

- job:
name: rally-install-ubuntu-bionic
name: rally-install-ubuntu-focal
parent: rally-install-base
nodeset: ubuntu-bionic
nodeset: ubuntu-focal

- job:
name: rally-install-ubuntu-focal
name: rally-install-ubuntu-jammy
parent: rally-install-base
nodeset: ubuntu-focal
nodeset: ubuntu-jammy

- job:
name: rally-install-centos-8s
Expand All @@ -24,4 +24,4 @@
- job:
name: rally-install-centos-9s
parent: rally-install-base
nodeset: centos-8-stream
nodeset: centos-9-stream
29 changes: 15 additions & 14 deletions .zuul.d/python-jobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
post-run: tests/ci/playbooks/fetch-html-and-json-reports.yaml
description: |
Run test for rally project.
nodeset: ubuntu-bionic
nodeset: ubuntu-jammy

- job:
name: rally-tox-docs
Expand All @@ -28,16 +28,6 @@
vars:
tox_env: pep8

- job:
name: rally-tox-functional-py38
parent: rally-tox-base
description: |
Run test for rally project.
Uses tox with the ``functional`` environment.
vars:
tox_env: functional-py38

- job:
name: rally-tox-functional
parent: rally-tox-base
Expand Down Expand Up @@ -67,6 +57,7 @@
Uses tox with the ``py36`` environment.
vars:
tox_env: py36
nodeset: ubuntu-bionic

- job:
name: rally-tox-py37
Expand All @@ -77,6 +68,7 @@
Uses tox with the ``py37`` environment.
vars:
tox_env: py37
nodeset: ubuntu-bionic

- job:
name: rally-tox-py38
Expand All @@ -85,9 +77,9 @@
Run unit test for rally project.
Uses tox with the ``py38`` environment.
nodeset: ubuntu-focal
vars:
tox_env: py38
nodeset: ubuntu-focal

- job:
name: rally-tox-py39
Expand All @@ -96,9 +88,19 @@
Run unit test for rally project.
Uses tox with the ``py39`` environment.
nodeset: ubuntu-focal
vars:
tox_env: py39
nodeset: ubuntu-focal

- job:
name: rally-tox-py310
parent: rally-tox-base
description: |
Run unit test for rally project.
Uses tox with the ``py310`` environment.
vars:
tox_env: py310

- job:
name: rally-tox-samples
Expand All @@ -117,7 +119,6 @@
Run test for rally project.
Uses tox with the ``cover`` environment.
nodeset: ubuntu-bionic
vars:
coverage_output_src: '{{ zuul.project.src_dir }}/cover/'
zuul_executor_dest: '{{ zuul.executor.log_root }}/coverage/'
7 changes: 4 additions & 3 deletions .zuul.d/zuul.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
- rally-tox-py37
- rally-tox-py38
- rally-tox-py39
- rally-tox-py310
- rally-tox-samples
- rally-tox-functional
- rally-tox-functional-py38
- rally-tox-self
- rally-install-ubuntu-bionic
- rally-install-ubuntu-focal
- rally-install-ubuntu-jammy
- rally-install-centos-8s
- rally-install-centos-9s
- rally-docker-build
Expand All @@ -31,10 +31,11 @@
- rally-tox-py37
- rally-tox-py38
- rally-tox-py39
- rally-tox-py310
- rally-tox-functional
- rally-tox-self
- rally-install-ubuntu-bionic
- rally-install-ubuntu-focal
- rally-install-ubuntu-jammy
- rally-install-centos-8s
- rally-install-centos-9s
post:
Expand Down
14 changes: 11 additions & 3 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,19 @@ Fixed

`Launchpad-bug #1956956 <https://launchpad.net/bugs/1956956>`_

Changed
Added
~~~~~

* Pin SQLAlchemy to <2.0.0
* CI for running unit and functional tests using python 3.10
* CI jobs that check Rally installation compatibility with CentOS 9 Stream and
Ubuntu Jammy

Removed
~~~~~~~

Check ability to install Rally on Centos 8 Stream and Centos 9 Stream and
stop checking Centos 7 and Centos 8
* CI jobs with installation compatibility checks for CentOS 7, CentOS 8
(CentOS 8 Stream is checked instead), Ubuntu Bionic.

[3.3.0] - 2021-06-16
--------------------
Expand Down
6 changes: 3 additions & 3 deletions rally/cli/cliutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -616,11 +616,11 @@ def run(argv, categories):
rapi = api.API(config_args=argv[1:], skip_db_check=True)
except exceptions.RallyException as e:
print(e)
return(2)
return 2

if CONF.category.name == "bash-completion":
print(_generate_bash_completion_script())
return(0)
return 0

fn = CONF.category.action_fn
fn_args = [encodeutils.safe_decode(arg)
Expand Down Expand Up @@ -652,7 +652,7 @@ def run(argv, categories):
if arg[1].get("dest", "").endswith(missing):
print(" " + arg[0][0])
break
return(1)
return 1

try:
validate_deprecated_args(argv, fn)
Expand Down
2 changes: 1 addition & 1 deletion rally/cli/commands/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ def list(self, api, deployment=None, all_deployments=False, status=None,
print("Error: Invalid task status '%s'.\nAvailable statuses: %s"
% (status, ", ".join(consts.TaskStatus)),
file=sys.stderr)
return(1)
return 1

if not all_deployments:
filters["deployment"] = deployment
Expand Down
6 changes: 3 additions & 3 deletions rally/task/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,13 @@ def _consume_results(self):
{"raw": results_chunk})
self.workload_data_count += 1

elif self.is_done.isSet():
elif self.is_done.is_set():
break
else:
time.sleep(0.1)

def _consume_events(self):
while not self.is_done.isSet() or self.runner.event_queue:
while not self.is_done.is_set() or self.runner.event_queue:
if self.runner.event_queue:
event = self.runner.event_queue.popleft()
self.hook_executor.on_event(
Expand Down Expand Up @@ -201,7 +201,7 @@ def wait_and_abort(self):
runner.run method.
"""

while not self.is_done.isSet():
while not self.is_done.is_set():
if self.is_task_in_aborting_status(self.task["uuid"],
check_soft=False):
self.runner.abort()
Expand Down
2 changes: 1 addition & 1 deletion rally/task/hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def _timer_method(self):
stopwatch = rutils.Stopwatch(stop_event=self._timer_stop_event)
stopwatch.start()
seconds_since_start = 0
while not self._timer_stop_event.isSet():
while not self._timer_stop_event.is_set():
self.on_event(event_type="time", value=seconds_since_start)
seconds_since_start += 1
stopwatch.sleep(seconds_since_start)
Expand Down
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ classifier =
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10

[files]
packages =
Expand Down
81 changes: 23 additions & 58 deletions tests/ci/playbooks/rally-install-pre.yaml
Original file line number Diff line number Diff line change
@@ -1,62 +1,33 @@
- hosts: all
name: Prepare host to install Rally
tasks:
- name: Check OS distro (CentOS)
when: ansible_distribution == "CentOS"
set_fact:
# in case of centos we do not care about minor versions
os_distro: '{{ ansible_distribution }} {{ ansible_distribution_major_version }}'

- name: Check OS distro (Ubuntu)
when: ansible_distribution == "Ubuntu"
set_fact:
os_distro: '{{ ansible_distribution }} {{ ansible_distribution_version }}'

- name: Install required packages (Centos-7)
when: os_distro == "CentOS 7"
shell:
cmd: |
sudo yum remove -y python-crypto || true
sudo yum remove -y python36-PyYAML || true
sudo yum update
sudo yum install -y yum-utils
sudo yum groupinstall -y development
sudo yum install -y https://repo.ius.io/ius-release-el7.rpm https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum install -y python36u python36u-devel
- name: Uninstall required packages (Centos-8)
when: os_distro == "CentOS 8"
- name: Uninstall python3-pyyaml (CentOS 8 & 9)
become: true
shell: dnf remove -y python3-pyyaml
package:
state: absent
name: python3-pyyaml

- name: Install required packages (Ubuntu-Bionic)
when: os_distro == "Ubuntu 18.04"
shell:
chdir: '{{ zuul.project.src_dir }}'
cmd: |
# NOTE(pabelanger): We run apt-get update to ensure we dont have a stale
# package cache in the gate.
sudo apt update
sudo apt install --yes python3.6-dev
- name: Install python3.8-dev (Ubuntu 20.04)
become: true
package:
state: present
name: python3.8-dev
when: ansible_distribution == "Ubuntu" and ansible_distribution_version == "20.04"

- name: Install required packages (Ubuntu-Focal)
when: os_distro == "Ubuntu 20.04"
shell:
chdir: '{{ zuul.project.src_dir }}'
cmd: |
# NOTE(pabelanger): We run apt-get update to ensure we dont have a stale
# package cache in the gate.
sudo apt update
sudo apt install --yes python3.8-dev
- name: Install python3.10-dev (Ubuntu 22.04)
become: true
package:
state: present
name: python3.10-dev
when: ansible_distribution == "Ubuntu" and ansible_distribution_version == "22.04"

- name: Install pip3 if needed
when: os_distro == "CentOS 7" or os_distro == "Ubuntu 18.04" or os_distro == "Ubuntu 20.04"
become: true
shell:
executable: /bin/bash
chdir: '{{ zuul.project.src_dir }}'
cmd: |
set -e
python_version=`python3 --version`
python_version=`echo $python_version |awk '{print $2}'`
echo $python_version
Expand All @@ -66,19 +37,13 @@
pip_url=https://bootstrap.pypa.io/get-pip.py
fi
curl $pip_url -o /tmp/get-pip.py
sudo python3 /tmp/get-pip.py
- name: Update pip3 if needed
when: os_distro == "CentOS 8"
become: true
shell: pip3 install --upgrade pip
python3 /tmp/get-pip.py
- name: Install bindep
become: true
shell: pip3 install --upgrade bindep PyYAML
shell: pip3 install --upgrade bindep

- name: Prepare rally plugins stored at home dir
shell:
cmd: |
mkdir --parents ~/.rally/plugins
cp --recursive {{ zuul.project.src_dir }}/rally-jobs/plugins/* ~/.rally/plugins
shell: |
mkdir --parents ~/.rally/plugins
cp --recursive {{ zuul.project.src_dir }}/rally-jobs/plugins/* ~/.rally/plugins
4 changes: 4 additions & 0 deletions tests/ci/playbooks/roles/rally-tox/defaults/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
default_pip_url: "https://bootstrap.pypa.io/get-pip.py"

versioned_pip_url:
python3.6: "https://bootstrap.pypa.io/pip/3.6/get-pip.py"

0 comments on commit e65935a

Please sign in to comment.