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

Preparation for Release 29 #191

Merged
merged 22 commits into from
Dec 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
baaeb2b
Fix interpolation issue
StykMartin Oct 19, 2023
a33ddf7
Re-enable docs build on Fedora targets
StykMartin Nov 17, 2023
7164abf
Include EPEL-7
StykMartin Nov 17, 2023
abfe51c
Use nosetests if python3 is not available
StykMartin Nov 17, 2023
870f52a
Require python3-six during build
StykMartin Dec 20, 2023
0f70cb9
Update CA certificates before pulling beaker repository
StykMartin Dec 21, 2023
4895f05
Require nodejs-less version lower than 2.0
StykMartin Dec 22, 2023
bfa2031
Add support for custom boot loaders
p3ck Sep 7, 2022
02b462b
Run integration tests as part of review checks
StykMartin Dec 23, 2023
eeefb32
Run integration tests for labcontroller
StykMartin Dec 23, 2023
ef196f3
Document usage of git236
StykMartin Dec 23, 2023
fe2cd5c
Report test cases
StykMartin Dec 23, 2023
a311394
Enable integration tests for server
StykMartin Dec 23, 2023
fd7d1b4
Remove %onerror section from RHEL 7.0 kickstart
StykMartin Dec 23, 2023
7666297
Fix minion version definition for RHEL 7.6 ALT
StykMartin Dec 23, 2023
93a2368
Remove %onerror section from RHVH defaults
StykMartin Dec 23, 2023
b138997
Configure MariaDB to accept larger SQL statements
StykMartin Dec 23, 2023
3e7e074
Use raw SQL to validate installation attributes
StykMartin Dec 23, 2023
c6e4ef5
To indicate an unrecognized scheme, use empty string instead of None
StykMartin Dec 24, 2023
6d819db
Reference git hash in the version during integration testing
StykMartin Dec 24, 2023
6d8081e
Store Beaker 29 database dump
StykMartin Dec 24, 2023
286c384
Prepare Beaker 29 RC1
StykMartin Dec 24, 2023
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
84 changes: 83 additions & 1 deletion .github/workflows/review-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- uses: actions/checkout@v1
- name: Install utils
run: |
yum install -y git wget
yum install -y git wget ca-certificates
- name: Fetch Beaker repository
run: |
wget https://beaker-project.org/yum/beaker-server-RedHatEnterpriseLinux.repo -P /etc/yum.repos.d/
Expand All @@ -43,3 +43,85 @@ jobs:
name: beaker-docs
path: /home/runner/work/html

integration-tests:
runs-on: ubuntu-latest
env:
MYSQL_USER: beaker
MYSQL_PASSWORD: beaker
MYSQL_ROOT_PASSWORD: toor
strategy:
fail-fast: false
matrix:
test-target: ["bkr.inttest.client", "bkr.inttest.labcontroller", "bkr.inttest.server"]
container:
image: centos:7
services:
database:
image: mariadb:latest
env:
MYSQL_USER: ${{ env.MYSQL_USER }}
MYSQL_PASSWORD: ${{ env.MYSQL_PASSWORD }}
MYSQL_ROOT_PASSWORD: ${{ env.MYSQL_ROOT_PASSWORD }}
ports:
- 3306
steps:
# We have to install git 2.18+ to perform checkout via git
# This is possible only via IUS repositories
- name: Install git to allow checkout
run: |
yum install https://repo.ius.io/ius-release-el7.rpm epel-release -y
yum install git236-core -y

# Do not upgrade to @v4 as node 20 is incompatible with CentOS 7
- name: Checkout
uses: actions/checkout@v3

# Remove custom git from the IUS repository - git will be reinstalled later as it is needed by beaker itself.
- name: Remove git236 and YUM repositories
run: yum remove git236-core ius-release epel-release -y

- name: Add Beaker Server YUM repository
run: |
curl -o /etc/yum.repos.d/beaker-server.repo https://beaker-project.org/yum/beaker-server-RedHatEnterpriseLinux.repo

- name: Install Beaker dependencies
run: |
yum install epel-release mariadb beaker-integration-tests -y
yum-builddep beaker.spec -y
yum remove beaker-common \
beaker-client \
beaker-lab-controller \
beaker-server \
beaker-integration-tests -y

- name: Checkout submodules
run: |
git submodule update --init --recursive

- name: Configure database for testing
run: |
cat <<EOT > init.sql
CREATE DATABASE beaker_test;
CREATE DATABASE beaker_migration_test;
GRANT ALL PRIVILEGES ON beaker_test.* TO 'beaker'@'%';
GRANT ALL PRIVILEGES ON beaker_migration_test.* TO 'beaker'@'%';
SET GLOBAL max_allowed_packet=1073741824;
SET GLOBAL character_set_server=utf8;
EOT

mysql -uroot -p${{ env.MYSQL_ROOT_PASSWORD }} -h database < init.sql
sed -i 's/@localhost/@database/g' IntegrationTests/server-test.cfg

- name: Update version
run: |
# Update the version in common/__init__.py, as this file is used in the application and tests to determine the version
current_version=$(grep -oE "__version__ = '[^']+'" Common/bkr/common/__init__.py | cut -d "'" -f 2)
new_version="$current_version.git.$(git rev-parse --short HEAD)"
sed -i "s/__version__ = '$current_version'/__version__ = '$new_version'/" Common/bkr/common/__init__.py

- name: Run integration tests for ${{ matrix.test-target }}
run: |
pushd IntegrationTests
# Disable Selenium tests until we have plan for selenium driver + firefox
rm -rf src/bkr/inttest/server/selenium
./run-tests.sh -v ${{ matrix.test-target }}
14 changes: 11 additions & 3 deletions .packit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@ jobs:
post-upstream-clone:
# disable broken unit tests
- sed -i '/make check/d' beaker.spec
# disable broken documentation
- sed -i '/^make$/i sed -i s/documentation//g Makefile' beaker.spec
- sed -i '/_mandir/d' beaker.spec

- job: copr_build
trigger: pull_request
metadata:
targets:
- epel-7-x86_64
actions:
post-upstream-clone:
# Use gevent from base repositories during packit builds
# gevent112 is our custom build with some backports to improve socket management
- sed -i 's/python2-gevent112/python-gevent/g' beaker.spec
15 changes: 6 additions & 9 deletions Client/run-tests.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
#/bin/bash
#!/bin/bash

set -x

# Use Python 2 version if BKR_PY3 is not defined
if [[ -z ${BKR_PY3} ]]; then
pytest_command="py.test-2";
elif [[ ${BKR_PY3} == 1 ]]; then
pytest_command="pytest-3";
# Use nosetests with python2 interpreter
if [[ -z ${BKR_PY3} ]] || [[ ${BKR_PY3} != 1 ]]; then
command="nosetests ${*:--v --traverse-namespace bkr.client.tests}";
else
pytest_command="py.test-2";
command="pytest-3";
fi

env PYTHONPATH=../Client/src:../Common${PYTHONPATH:+:$PYTHONPATH} \
$pytest_command
env PYTHONPATH=../Client/src:../Common${PYTHONPATH:+:$PYTHONPATH} $command
2 changes: 1 addition & 1 deletion Client/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def bash_completion_dir():

setup(
name='beaker-client',
version='28.3',
version='29.0rc1',
description='Command-line client for interacting with Beaker',
author='Red Hat, Inc.',
author_email='[email protected]',
Expand Down
2 changes: 1 addition & 1 deletion Common/bkr/common/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# code in bkr.__init__), the version details are retrieved from here in
# order to correctly handle module shadowing on sys.path

__version__ = '28.3'
__version__ = '29.0rc1'
9 changes: 9 additions & 0 deletions Common/bkr/common/schema/beaker-job.rng
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,15 @@ the Free Software Foundation; either version 2 of the License, or
</a:documentation>
<attribute name="url"/>
</element>
<optional>
<element name="image">
<a:documentation xml:lang="en">
Location of the installer netboot image. May be specified as
an absolute URL or as a path relative to the installation tree URL.
</a:documentation>
<attribute name="url"/>
</element>
</optional>
<element name="arch">
<a:documentation xml:lang="en">
CPU architecture that the distro is built for.
Expand Down
13 changes: 5 additions & 8 deletions Common/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,11 @@

set -x

# Use Python 2 version if BKR_PY3 is not defined
if [[ -z ${BKR_PY3} ]]; then
pytest_command="py.test-2";
elif [[ ${BKR_PY3} == 1 ]]; then
pytest_command="pytest-3";
# Use nosetests with python2 interpreter
if [[ -z ${BKR_PY3} ]] || [[ ${BKR_PY3} != 1 ]]; then
command="nosetests ${*:--v bkr}";
else
pytest_command="py.test-2";
command="pytest-3";
fi

env PYTHONPATH=../Client/src:../Common${PYTHONPATH:+:$PYTHONPATH} \
$pytest_command
env PYTHONPATH=../Client/src:../Common${PYTHONPATH:+:$PYTHONPATH} $command
2 changes: 1 addition & 1 deletion Common/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

setup(
name='beaker-common',
version='28.3',
version='29.0rc1',
description='Common components for Beaker packages',
author='Red Hat, Inc.',
author_email='[email protected]',
Expand Down
2 changes: 1 addition & 1 deletion IntegrationTests/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def get_compose_layout():

setup(
name='beaker-integration-tests',
version='28.3',
version='29.0rc1',
description='Integration tests for Beaker',
author='Red Hat, Inc.',
author_email='[email protected]',
Expand Down
Loading