Commit Graph

15 Commits

Author SHA1 Message Date
Sergiy Markin 0f2ab241f9 Restored ubuntu_bionic image build
This PS restores image build for ubuntu_bionic and adds appropriate
gates to keep it tested by appropriate functional and integrational
tests.

Change-Id: Id31d97ced8732d823937fb1f218e7ad8760d735c
2023-06-07 21:02:28 +00:00
Sergiy Markin 03722e844c Uplift Airship clients
This PS uplofts latest version of Airship components clients.

Change-Id: I0a7e578fdfbf84b898b1b7db22b2631fdb39f321
2023-05-16 20:48:41 +00:00
Sergiy Markin 3352c3f59d Uplift shipyard
This PS uplifts fresh version of shipyard with airflow 1.10.5

Change-Id: I509b4e7ec15a7c5cfc41399ca74c41eb69c3aedc
2023-05-08 22:31:13 +00:00
Sergiy Markin c052d40277 Pegleg focal upgrade
This PS delivers focal version of Pegleg image and has the following updates:
- removed release-notes-jobs-python3 gate job because of incompartibility with Sphinx from current requirements
- added focal gate node and switched gates to use it
- added bindep.txt file into project root
- added bindep role into gate jobs
- added ubuntu_focal dockerfile for building focal pegleg image
- switched tox profiles to py38
- uplifted references to shipyard_client, promenade and deckhand projects
- resolved required dependencies conflicts by weakening constraints in Pipfile
- updated tox profile update-requirements for generate requirements.txt and test-requirements.txt
- generated new Pipfile.lock, requirements.txt and test-requirements.txt from Pipfile
- switched tox profiles to use requirements.txt and test-requirements.txt instead of pipenv because of upstream zuul nodes Pypi mirrorring issue
- updated reference to seaworthy site certificates in treasuremap repo
- fixed unit tests issues caused by pytest/mock updates and new openssl version
- fixed focal docker image publishing issue
- added multiprocessing into coverage tests running process
- made unit and coveraget tests more verbosive

Change-Id: I5c4c519dc725cfb8c7b4e14756347c9336028aff
2023-05-02 15:05:45 +00:00
Ian H. Pittwood 0e46d134c1 Implement Pipenv dependency management
Pipenv is a tool that brings better package dependency management to
python. It can automatically create and manage virtualenv as well as
managing package dependencies using Pipfile and Pipfile.lock. Adding
this dependency manager into Airship projects will decrease package
version conflicts between projects and help increase security through
hash validation of packages and vulnerability scans.

Changes:
- Imports requirements.txt type files into Pipfile
- Pipenv dependency management in tox
- Switches Safety package for "pipenv check", an implementation of
Safety
- Adds `-e` flag on VCS dependencies to resolve good versions on all
packages
- Unpins or loosens pins on "dev"-type packages

Pipenv Docs: https://docs.pipenv.org/en/latest/

Helpful Pipenv Guide: https://realpython.com/pipenv-guide/

Change-Id: I47e7e7b440d76103b4984499e6ffce4482a59353
2019-08-12 09:10:42 -05:00
Ian H. Pittwood 4480ab5574 Restructure usage of test fixtures
Pytest includes a fixture that can be used to generate temporary
directories. Previously Pegleg had implemented a hombrewed version of a
temporary directory fixture. This change removes the homebrewed version
and replaces it with the tmpdir fixture.

Implement tmpdir fixture in tests

Upgrade all testing packages to use the latest features

Removes unused imports and organizes import lists

Removes mock package requirement and uses unittest.mock, included in
python >3.3

Implements a slightly cleaner method to get proxy info

Change-Id: If66e1cfba858d5fb8948529deb8fb2d32345f630
2019-07-29 11:37:36 -05:00
Alexander Hughes 1c8d92ef6b Standardize Pegleg code with YAPF
This patch addresses inconsistent code style and enforces it with a
gate for future submissions.

Separate work will be done in the future to address several of the
PEP8 ignores for docstrings, and attempt to bring the tests directory
to PEP8 compliance.

This patch:
1. Updates .style.yapf to set the knobs desired for YAPF.
2. Updates tox.ini to allow one of the knobs to work.
3. Removes unused code from several __init__.py files.
4. Updates the YAPF version in test-requirements.txt to latest (this
   is needed for several knobs to work).
5. Stylistic changes to the python codebase in Pegleg.
6. Updates to tox.ini to run YAPF during PEP8 check.

Change-Id: Ieaa0fdef2b601d01c875d64b840986e54df73abf
2019-07-25 17:28:18 +00:00
Hughes, Alexander (ah8742) 11337a77c2 Requests Dependency Error
Previously the pins resolved tox tests, but were added to the wrong
requirements file.  The dependency error is still present in the
pegleg images. Moving pins to correct file to resolve.

Change-Id: I1796491cbf0e548fac50e01fbe03a379a5c82f9e
2019-06-13 16:51:49 +00:00
Hughes, Alexander (ah8742) a925c0ddd8 Resolve requests dependency error
Fix to follow intermittent error in Zuul gates:
RequestsDependencyWarning: urllib3 (1.24) or chardet (3.0.4) doesn't
match a supported version!

by pinning requests, urllib3 and chardet to working compatible versions.

Change-Id: I30be06f4b641351313986e61317a84c02a9768c7
2019-06-10 19:20:20 +00:00
Ian H. Pittwood 122e746df5 Adds Safety dependency vulnerability checks
This change adds dependency vulnerability checks into tox. These checks
are performed by the Safety package which checks requirements files
against a vulnerability database for any issues. If any vulnerabilities
are found, tox will fail its pep8 env.

Safety: https://pyup.io/safety/

Safety Repo: https://github.com/pyupio/safety

Safety Default Vulnerability DB: https://github.com/pyupio/safety-db

Change-Id: I70a10ecb01836373888bd87aa27953515accd4c4
2019-06-03 12:40:49 -05:00
Ian H. Pittwood f02139378d Pin dependency versions
Pins all Pegleg dependencies explicitly for consistency.

Change-Id: I9a8f27f90e7af06f6967501fb582384d86dd93b0
2019-05-29 14:06:38 -05:00
Felipe Monteiro b28788325f tests: Improve unit tests runtime performance
This patch set does 2 things:

1) Improves unit test runtime peformance via pytest-xdist [0]
2) Reduces finnicky nature of `is_connected` helpers which
   sometimes skip even when there is access to the internet;
   logic has been added to make these checks more accurate
   to avoid skipping tests

Note that while there are newer alternatives to pytest-xdist they
are only compatible with much newer versions of Python.

[0] https://pypi.org/project/pytest-xdist/

Change-Id: Ib04b48ebabca0551058e5e1065056f4e559fbfe6
2019-04-04 14:21:43 +00:00
Tin Lam aa241081c9 Fix exception handling and add tests
Per [0], fernet decrypt can never throw an InvalidSignature exception as that
is re-raised as InvalidToken. This patch set corrects the handling of the
exception, and added additional unit tests for coverage.

[0] https://cryptography.io/en/latest/fernet/#cryptography.fernet.Fernet.decrypt

Co-Authored-By: Drew Walters <drewwalters96@gmail.com>
Change-Id: Ic5ee7ef451a5657519c5397fc4b903b5adcb1d18
Signed-off-by: Tin Lam <tin@irrational.io>
2019-02-22 16:14:25 -06:00
Tin Lam 1a325a400b Add hacking extension
This patch set adds hacking rule to pegleg and fixes outstanding non-
docstring related violations.

Change-Id: I5bb5e78c211f24cf95669124bfcf9603bea8bf15
Signed-off-by: Tin Lam <tin@irrational.io>
2019-01-01 00:18:03 -06:00
Felipe Monteiro 893ea9f4bb Standardize Pegleg directory structure
This patch set standardizes the Pegleg directory
structure because of the following reasons:

1) src/bin/pegleg is not necessary and only makes
building (e.g. documentation building) and running
of tox targets unnecessarily difficult.
2) src/bin/pegleg is a Java-like standard that
bears no relevance to Python.

Change-Id: I37d39d3d6186b92f8fbfe234221c9e44da48cf10
2018-09-23 10:33:40 -04:00