remove test_sdists.sh (#9213)

The reason I want to do this is many of the targets of `test_sdists.sh` use Python 3.6 which [has reached its EOL](https://www.python.org/dev/peps/pep-0494/#lifespan). We could instead just stop running the test on these systems or install a newer version of Python 3 outside of OS packaging, but instead I decided to look into why we have these tests to begin with.

I introduced these tests many years ago in https://github.com/certbot/certbot/pull/4089 as a fix for https://github.com/certbot/certbot/issues/4044. Essentially the problem was the way packagers ran tests and the way we ran tests were slightly different. This difference could cause test failures when distros tried to run tests on our packages.

Since I did this, [we've switched to telling packagers to run tests using `pytest` like we do](https://github.com/certbot/certbot/blob/5e76669c5026732d1440e39e93b58220ef7bd354/certbot/docs/packaging.rst#notes-for-package-maintainers) and we've greatly reduced our reliance on OS packaging through things like `snap`.

Because of this, I think we should stop running this test, reducing our reliance on the heavy "test farm tests", and simplifying our CI pipeline. I think future problems here is quite unlikely and even if we have them, it should only affect tests on our non-primary distribution mechanisms which I think is a very minor concern.

When reviewing this PR, it's probably worth noting that I just replaced `targets.yaml` with the contents of `apache2_targets.yaml` since the Apache 2 tests are the only runs we're running with this change.
This commit is contained in:
Brad Warren
2022-02-23 15:10:48 -08:00
committed by GitHub
parent 5e76669c50
commit e2b7b62b98
6 changed files with 8 additions and 135 deletions
+2 -2
View File
@@ -22,7 +22,7 @@ Usage:
>aws ec2 create-key-pair --profile HappyHacker --key-name MyKeyPair \
--query 'KeyMaterial' --output text > MyKeyPair.pem
then:
>letstest targets/targets.yaml MyKeyPair.pem HappyHacker scripts/test_sdists.sh
>letstest targets/targets.yaml MyKeyPair.pem HappyHacker scripts/test_apache2.sh
see:
https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html
https://docs.aws.amazon.com/cli/latest/userguide/cli-ec2-keypairs.html
@@ -56,7 +56,7 @@ parser.add_argument('key_file',
parser.add_argument('aws_profile',
help='profile for AWS (i.e. as in ~/.aws/certificates)')
parser.add_argument('test_script',
default='test_sdists.sh',
default='test_apache2.sh',
help='path of bash script in to deploy and run')
parser.add_argument('--repo',
default='https://github.com/letsencrypt/letsencrypt.git',
-52
View File
@@ -1,52 +0,0 @@
#!/bin/sh -xe
cd letsencrypt
BOOTSTRAP_SCRIPT="letstest/scripts/bootstrap_os_packages.sh"
VENV_PATH=venv
# install OS packages
. $BOOTSTRAP_SCRIPT
# setup venv
python3 -m venv $VENV_PATH
$VENV_PATH/bin/python3 tools/pipstrap.py
. "$VENV_PATH/bin/activate"
# pytest is needed to run tests on our packages so we install a pinned version here.
tools/pip_install.py pytest
# setup constraints
TEMP_DIR=$(mktemp -d)
CONSTRAINTS="$TEMP_DIR/constraints.txt"
cp tools/requirements.txt "$CONSTRAINTS"
# We pin cryptography to 3.1.1 and pyopenssl to 19.1.0 specifically for CentOS 7 / RHEL 7
# because these systems ship only with OpenSSL 1.0.2, and this OpenSSL version support has been
# dropped on cryptography>=3.2 and pyopenssl>=20.0.0.
# Using this old version of OpenSSL would break the cryptography and pyopenssl wheels builds.
if [ -f /etc/redhat-release ] && [ "$(. /etc/os-release 2> /dev/null && echo "$VERSION_ID" | cut -d '.' -f1)" -eq 7 ]; then
sed -i 's|cryptography==.*|cryptography==3.1.1|g' "$CONSTRAINTS"
sed -i 's|pyopenssl==.*|pyopenssl==19.1.0|g' "$CONSTRAINTS"
fi
PLUGINS="certbot-apache certbot-nginx"
# build sdists
for pkg_dir in acme certbot $PLUGINS; do
cd $pkg_dir
python setup.py clean
rm -rf build dist
python setup.py sdist
mv dist/* $TEMP_DIR
cd -
done
VERSION=$(python letstest/scripts/version.py)
# test sdists
cd $TEMP_DIR
for pkg in acme certbot $PLUGINS; do
tar -xvf "$pkg-$VERSION.tar.gz"
cd "$pkg-$VERSION"
PIP_CONSTRAINT=../constraints.txt PIP_NO_BINARY=:all: pip install .
python -m pytest
cd -
done
-39
View File
@@ -1,39 +0,0 @@
# These images are located in us-east-1.
#
# All machines must currently use x86_64 since Pebble does not currently
# publish images for other architectures.
targets:
#-----------------------------------------------------------------------------
#Ubuntu
- ami: ami-0c2d5393cb5b518f6
name: ubuntu21.10
type: ubuntu
virt: hvm
user: ubuntu
- ami: ami-0758470213bdd23b1
name: ubuntu20.04
type: ubuntu
virt: hvm
user: ubuntu
- ami: ami-095192256fe1477ad
name: ubuntu18.04LTS
type: ubuntu
virt: hvm
user: ubuntu
#-----------------------------------------------------------------------------
# Debian
- ami: ami-01db78123b2b99496
name: debian10
type: ubuntu
virt: hvm
user: admin
#-----------------------------------------------------------------------------
# CentOS
# This AMI was found on
# https://web.archive.org/web/20211126215532/https://wiki.centos.org/Cloud/AWS.
- ami: ami-00e87074e52e6c9f9
name: centos7
type: centos
virt: hvm
user: centos
+4 -26
View File
@@ -1,4 +1,7 @@
# These images are located in us-east-1.
#
# All machines must currently use x86_64 since Pebble does not currently
# publish images for other architectures.
targets:
#-----------------------------------------------------------------------------
@@ -25,37 +28,12 @@ targets:
type: ubuntu
virt: hvm
user: admin
- ami: ami-0dcd54b7d2fff584f
name: debian10_arm64
type: ubuntu
virt: hvm
user: admin
machine_type: a1.medium
#-----------------------------------------------------------------------------
# RHEL
# These AMIs were found using the commands given at
# https://web.archive.org/web/20220129184532/https://access.redhat.com/solutions/15356.
- ami: ami-005b7876121b7244d
name: RHEL7
type: centos
virt: hvm
user: ec2-user
- ami: ami-0c322300a1dd5dc79
name: RHEL8
type: centos
virt: hvm
user: ec2-user
#-----------------------------------------------------------------------------
# CentOS
# These AMIs were found on
# This AMI was found on
# https://web.archive.org/web/20211126215532/https://wiki.centos.org/Cloud/AWS.
- ami: ami-00e87074e52e6c9f9
name: centos7
type: centos
virt: hvm
user: centos
- ami: ami-0ee70e88eed976a1b
name: centos_stream8
type: centos
virt: hvm
user: centos