Follow up to Zuul Job Update for Metadata.

Upon investigation, not every app has the same
set of checks.  Some have flake8 but not pylint or
vise versa.  Therefore, some effort will be made
to attempt to create consitency accross apps while
also adding metadata.

Add flake8 check. Fix flake8 tox.ini and py file
issues.

This change set four checks; flake8, pylint, metadata,
and py39.

Test Plan
PASS - Zuul Jobs Pass as expected

Story: 2010929
Task: 49230

Change-Id: I6647bc80f8349bbbdc30c7d99760d16c50e2c41f
Signed-off-by: Reed, Joshua <Joshua.Reed@windriver.com>
This commit is contained in:
Reed, Joshua 2023-12-13 09:06:29 -07:00
parent bad6dacfe2
commit 14a8a97993
4 changed files with 21 additions and 5 deletions

View File

@ -5,12 +5,14 @@
- openstack-tox-linters
- k8sapp-dell-storage-tox-py39
- k8sapp-dell-storage-tox-pylint
- k8sapp-dell-storage-tox-flake8
- k8sapp-dell-storage-tox-metadata
gate:
jobs:
- openstack-tox-linters
- k8sapp-dell-storage-tox-py39
- k8sapp-dell-storage-tox-pylint
- k8sapp-dell-storage-tox-flake8
- k8sapp-dell-storage-tox-metadata
- job:
@ -68,3 +70,19 @@
tox_envlist: pylint
tox_extra_args: -c python3-k8sapp-dell-storage/k8sapp_dell_storage/tox.ini
tox_constraints_file: '{{ ansible_user_dir }}/src/opendev.org/starlingx/root/build-tools/requirements/debian/upper-constraints.txt'
- job:
name: k8sapp-dell-storage-tox-flake8
parent: tox
description: |
Run flake8 test for k8sapp_dell_storage
nodeset: debian-bullseye
required-projects:
- starlingx/config
- starlingx/root
files:
- python3-k8sapp-dell-storage/*
vars:
tox_envlist: flake8
tox_extra_args: -c python3-k8sapp-dell-storage/k8sapp_dell_storage/tox.ini
tox_constraints_file: '{{ ansible_user_dir }}/src/opendev.org/starlingx/root/build-tools/requirements/debian/upper-constraints.txt'

View File

@ -86,5 +86,5 @@ class DellStorageAppLifecycleOperator(lifecycle_base.AppLifecycleOperator):
"name": i.name,
"user_overrides": i.user_overrides,
"system_overrides": i.system_overrides
} for i in overrides if i.system_overrides['enabled'] is True ]
} for i in overrides if i.system_overrides['enabled'] is True]
return charts

View File

@ -96,9 +96,7 @@ max-line-length=120
[testenv:flake8]
deps = -r{toxinidir}/test-requirements.txt
commands =
flake8 {posargs} . \
scripts/manage-partitions \
scripts/query_pci_id
flake8 {posargs} ./k8sapp_dell_storage
[testenv:py39]
commands =

View File

@ -31,7 +31,7 @@ description = Dummy environment to allow pylint to be run in subdir tox
[testenv:metadata]
basepython = python3
description = Dummy environment to allow pylint to be run in subdir tox
description = Dummy environment to allow sysinv-app to be run in subdir tox
[testenv:bandit]
basepython = python3