SuccessConsole Output

[common-stage_2-merge_v10.0] Running shell script
+ runuser jenkins -c devops-stages/stage-test.sh
✔ OK black in 10.573 seconds
ERROR: invocation failed (exit code 1), logfile: /tmp/.tox/flake8/log/flake8-0.log
================================== log start ===================================
flake8 create: /tmp/.tox/flake8
flake8 installdeps: flake8==6.0.0, flake8-import-order
flake8 develop-inst: /home/jenkins/workspace/common-stage_2-merge_v10.0
flake8 installed: flake8==6.0.0,flake8-import-order==0.18.2,mccabe==0.7.0,-e git+https://osm.etsi.org/gerrit/osm/common.git@7ddcf697a6a19d03211cf78bc653cc3974594b1e#egg=osm_common,pycodestyle==2.10.0,pyflakes==3.0.1
flake8 run-test-pre: PYTHONHASHSEED='2012433605'
flake8 run-test: commands[0] | flake8 osm_common/ setup.py
osm_common/dbbase.py:19:1: I100 Import statements are in the wrong order. 'import logging' should be before 'import yaml' and in a different group.
import logging
^
osm_common/dbbase.py:19:1: I201 Missing newline between import groups. 'import logging' is identified as Stdlib and 'import yaml' is identified as Third Party.
import logging
^
osm_common/dbbase.py:22:1: I100 Import statements are in the wrong order. 'from copy import deepcopy' should be before 'from http import HTTPStatus'
from copy import deepcopy
^
osm_common/dbbase.py:23:1: I201 Missing newline between import groups. 'from Crypto.Cipher import AES' is identified as Third Party and 'from copy import deepcopy' is identified as Stdlib.
from Crypto.Cipher import AES
^
osm_common/dbbase.py:24:1: I100 Import statements are in the wrong order. 'from base64 import b64decode, b64encode' should be before 'from Crypto.Cipher import AES' and in a different group.
from base64 import b64decode, b64encode
^
osm_common/dbbase.py:24:1: I201 Missing newline between import groups. 'from base64 import b64decode, b64encode' is identified as Stdlib and 'from Crypto.Cipher import AES' is identified as Third Party.
from base64 import b64decode, b64encode
^
osm_common/dbbase.py:25:1: I201 Missing newline between import groups. 'from osm_common.common_utils import FakeLock' is identified as Third Party and 'from base64 import b64decode, b64encode' is identified as Stdlib.
from osm_common.common_utils import FakeLock
^
osm_common/dbbase.py:26:1: I100 Import statements are in the wrong order. 'from threading import Lock' should be before 'from osm_common.common_utils import FakeLock' and in a different group.
from threading import Lock
^
osm_common/dbbase.py:26:1: I201 Missing newline between import groups. 'from threading import Lock' is identified as Stdlib and 'from osm_common.common_utils import FakeLock' is identified as Third Party.
from threading import Lock
^
osm_common/dbmemory.py:19:1: I101 Imported names are in the wrong order. Should be DbBase, DbException
from osm_common.dbbase import DbException, DbBase
^
osm_common/dbmemory.py:19:1: I201 Missing newline between import groups. 'from osm_common.dbbase import DbException, DbBase' is identified as Third Party and 'import logging' is identified as Stdlib.
from osm_common.dbbase import DbException, DbBase
^
osm_common/dbmemory.py:21:1: I100 Import statements are in the wrong order. 'from http import HTTPStatus' should be before 'from osm_common.dbmongo import deep_update' and in a different group.
from http import HTTPStatus
^
osm_common/dbmemory.py:21:1: I201 Missing newline between import groups. 'from http import HTTPStatus' is identified as Stdlib and 'from osm_common.dbmongo import deep_update' is identified as Third Party.
from http import HTTPStatus
^
osm_common/dbmemory.py:23:1: I100 Import statements are in the wrong order. 'from copy import deepcopy' should be before 'from uuid import uuid4'
from copy import deepcopy
^
osm_common/dbmongo.py:20:1: I201 Missing newline between import groups. 'from pymongo import MongoClient, errors' is identified as Third Party and 'import logging' is identified as Stdlib.
from pymongo import MongoClient, errors
^
osm_common/dbmongo.py:21:1: I101 Imported names are in the wrong order. Should be DbBase, DbException
from osm_common.dbbase import DbException, DbBase
^
osm_common/dbmongo.py:21:1: I100 Import statements are in the wrong order. 'from osm_common.dbbase import DbException, DbBase' should be before 'from pymongo import MongoClient, errors' and in a different group.
from osm_common.dbbase import DbException, DbBase
^
osm_common/dbmongo.py:21:1: I201 Missing newline between import groups. 'from osm_common.dbbase import DbException, DbBase' is identified as Third Party and 'from pymongo import MongoClient, errors' is identified as Third Party.
from osm_common.dbbase import DbException, DbBase
^
osm_common/dbmongo.py:22:1: I100 Import statements are in the wrong order. 'from http import HTTPStatus' should be before 'from osm_common.dbbase import DbException, DbBase' and in a different group.
from http import HTTPStatus
^
osm_common/dbmongo.py:22:1: I201 Missing newline between import groups. 'from http import HTTPStatus' is identified as Stdlib and 'from osm_common.dbbase import DbException, DbBase' is identified as Third Party.
from http import HTTPStatus
^
osm_common/dbmongo.py:23:1: I101 Imported names are in the wrong order. Should be sleep, time
from time import time, sleep
^
osm_common/dbmongo.py:24:1: I100 Import statements are in the wrong order. 'from copy import deepcopy' should be before 'from time import time, sleep'
from copy import deepcopy
^
osm_common/dbmongo.py:25:1: I100 Import statements are in the wrong order. 'from base64 import b64decode' should be before 'from copy import deepcopy'
from base64 import b64decode
^
osm_common/fsbase.py:21:1: I201 Missing newline between import groups. 'from osm_common.common_utils import FakeLock' is identified as Third Party and 'from http import HTTPStatus' is identified as Stdlib.
from osm_common.common_utils import FakeLock
^
osm_common/fsbase.py:22:1: I100 Import statements are in the wrong order. 'from threading import Lock' should be before 'from osm_common.common_utils import FakeLock' and in a different group.
from threading import Lock
^
osm_common/fsbase.py:22:1: I201 Missing newline between import groups. 'from threading import Lock' is identified as Stdlib and 'from osm_common.common_utils import FakeLock' is identified as Third Party.
from threading import Lock
^
osm_common/fslocal.py:19:1: I100 Import statements are in the wrong order. 'import logging' should be before 'import os'
import logging
^
osm_common/fslocal.py:22:1: I202 Additional newline in a group of imports. 'from http import HTTPStatus' is identified as Stdlib and 'import logging' is identified as Stdlib.
from http import HTTPStatus
^
osm_common/fslocal.py:24:1: I201 Missing newline between import groups. 'from osm_common.fsbase import FsBase, FsException' is identified as Third Party and 'from shutil import rmtree' is identified as Stdlib.
from osm_common.fsbase import FsBase, FsException
^
osm_common/fsmongo.py:22:1: I100 Import statements are in the wrong order. 'import logging' should be before 'from io import BytesIO, StringIO'
import logging
^
osm_common/fsmongo.py:24:1: I100 Import statements are in the wrong order. 'import datetime' should be before 'import os'
import datetime
^
osm_common/fsmongo.py:27:1: I201 Missing newline between import groups. 'from osm_common.fsbase import FsBase, FsException' is identified as Third Party and 'from gridfs import GridFSBucket, errors' is identified as Third Party.
from osm_common.fsbase import FsBase, FsException
^
osm_common/fsmongo.py:28:1: I201 Missing newline between import groups. 'from pymongo import MongoClient' is identified as Third Party and 'from osm_common.fsbase import FsBase, FsException' is identified as Third Party.
from pymongo import MongoClient
^
osm_common/msgbase.py:20:1: I201 Missing newline between import groups. 'from osm_common.common_utils import FakeLock' is identified as Third Party and 'from http import HTTPStatus' is identified as Stdlib.
from osm_common.common_utils import FakeLock
^
osm_common/msgbase.py:21:1: I100 Import statements are in the wrong order. 'from threading import Lock' should be before 'from osm_common.common_utils import FakeLock' and in a different group.
from threading import Lock
^
osm_common/msgbase.py:21:1: I201 Missing newline between import groups. 'from threading import Lock' is identified as Stdlib and 'from osm_common.common_utils import FakeLock' is identified as Third Party.
from threading import Lock
^
osm_common/msgkafka.py:17:1: I100 Import statements are in the wrong order. 'import asyncio' should be before 'import logging'
import asyncio
^
osm_common/msgkafka.py:18:1: I201 Missing newline between import groups. 'import yaml' is identified as Third Party and 'import asyncio' is identified as Stdlib.
import yaml
^
osm_common/msgkafka.py:19:1: I100 Import statements are in the wrong order. 'from aiokafka import AIOKafkaConsumer' should be before 'import yaml' and in a different group.
from aiokafka import AIOKafkaConsumer
^
osm_common/msgkafka.py:19:1: I201 Missing newline between import groups. 'from aiokafka import AIOKafkaConsumer' is identified as Third Party and 'import yaml' is identified as Third Party.
from aiokafka import AIOKafkaConsumer
^
osm_common/msgkafka.py:22:1: I201 Missing newline between import groups. 'from osm_common.msgbase import MsgBase, MsgException' is identified as Third Party and 'from aiokafka.errors import KafkaError' is identified as Third Party.
from osm_common.msgbase import MsgBase, MsgException
^
osm_common/msglocal.py:20:1: I201 Missing newline between import groups. 'import yaml' is identified as Third Party and 'import os' is identified as Stdlib.
import yaml
^
osm_common/msglocal.py:21:1: I100 Import statements are in the wrong order. 'import asyncio' should be before 'import yaml' and in a different group.
import asyncio
^
osm_common/msglocal.py:21:1: I201 Missing newline between import groups. 'import asyncio' is identified as Stdlib and 'import yaml' is identified as Third Party.
import asyncio
^
osm_common/msglocal.py:22:1: I201 Missing newline between import groups. 'from osm_common.msgbase import MsgBase, MsgException' is identified as Third Party and 'import asyncio' is identified as Stdlib.
from osm_common.msgbase import MsgBase, MsgException
^
osm_common/msglocal.py:23:1: I100 Import statements are in the wrong order. 'from time import sleep' should be before 'from osm_common.msgbase import MsgBase, MsgException' and in a different group.
from time import sleep
^
osm_common/msglocal.py:23:1: I201 Missing newline between import groups. 'from time import sleep' is identified as Stdlib and 'from osm_common.msgbase import MsgBase, MsgException' is identified as Third Party.
from time import sleep
^
osm_common/msglocal.py:24:1: I100 Import statements are in the wrong order. 'from http import HTTPStatus' should be before 'from time import sleep'
from http import HTTPStatus
^
osm_common/sol004_package.py:59:1: I100 Import statements are in the wrong order. 'import os' should be before 'import yaml' and in a different group.
import os
^
osm_common/sol004_package.py:59:1: I201 Missing newline between import groups. 'import os' is identified as Stdlib and 'import yaml' is identified as Third Party.
import os
^
osm_common/sol004_package.py:60:1: I100 Import statements are in the wrong order. 'import hashlib' should be before 'import os'
import hashlib
^
osm_common/tests/packages/invalid_package_vnf/Scripts/charms/simple/src/charm.py:20:1: I100 Import statements are in the wrong order. 'import subprocess' should be before 'import sys'
import subprocess
^
osm_common/tests/packages/native_charm_with_metadata_dir_vnf/Scripts/charms/simple/src/charm.py:20:1: I100 Import statements are in the wrong order. 'import subprocess' should be before 'import sys'
import subprocess
^
osm_common/tests/packages/native_charm_without_metadata_dir_vnf/Scripts/charms/simple/src/charm.py:20:1: I100 Import statements are in the wrong order. 'import subprocess' should be before 'import sys'
import subprocess
^
osm_common/tests/test_dbbase.py:21:1: I201 Missing newline between import groups. 'import pytest' is identified as Third Party and 'import http' is identified as Stdlib.
import pytest
^
osm_common/tests/test_dbbase.py:22:1: I100 Import statements are in the wrong order. 'import unittest' should be before 'import pytest' and in a different group.
import unittest
^
osm_common/tests/test_dbbase.py:22:1: I201 Missing newline between import groups. 'import unittest' is identified as Stdlib and 'import pytest' is identified as Third Party.
import unittest
^
osm_common/tests/test_dbbase.py:23:1: I201 Missing newline between import groups. 'from osm_common.dbbase import DbBase, DbException, deep_update' is identified as Third Party and 'import unittest' is identified as Stdlib.
from osm_common.dbbase import DbBase, DbException, deep_update
^
osm_common/tests/test_dbbase.py:24:1: I100 Import statements are in the wrong order. 'from os import urandom' should be before 'from osm_common.dbbase import DbBase, DbException, deep_update' and in a different group.
from os import urandom
^
osm_common/tests/test_dbbase.py:24:1: I201 Missing newline between import groups. 'from os import urandom' is identified as Stdlib and 'from osm_common.dbbase import DbBase, DbException, deep_update' is identified as Third Party.
from os import urandom
^
osm_common/tests/test_dbbase.py:25:1: I100 Import statements are in the wrong order. 'from http import HTTPStatus' should be before 'from os import urandom'
from http import HTTPStatus
^
osm_common/tests/test_dbmemory.py:22:1: I201 Missing newline between import groups. 'import pytest' is identified as Third Party and 'import logging' is identified as Stdlib.
import pytest
^
osm_common/tests/test_dbmemory.py:23:1: I100 Import statements are in the wrong order. 'import unittest' should be before 'import pytest' and in a different group.
import unittest
^
osm_common/tests/test_dbmemory.py:23:1: I201 Missing newline between import groups. 'import unittest' is identified as Stdlib and 'import pytest' is identified as Third Party.
import unittest
^
osm_common/tests/test_dbmemory.py:26:1: I100 Import statements are in the wrong order. 'from unittest.mock import MagicMock' should be before 'from unittest.mock import Mock'
from unittest.mock import MagicMock
^
osm_common/tests/test_dbmemory.py:26:1: I202 Additional newline in a group of imports. 'from unittest.mock import MagicMock' is identified as Stdlib and 'from unittest.mock import Mock' is identified as Stdlib.
from unittest.mock import MagicMock
^
osm_common/tests/test_dbmemory.py:27:1: I201 Missing newline between import groups. 'from osm_common.dbbase import DbException' is identified as Third Party and 'from unittest.mock import MagicMock' is identified as Stdlib.
from osm_common.dbbase import DbException
^
osm_common/tests/test_dbmemory.py:29:1: I100 Import statements are in the wrong order. 'from copy import deepcopy' should be before 'from osm_common.dbmemory import DbMemory' and in a different group.
from copy import deepcopy
^
osm_common/tests/test_dbmemory.py:29:1: I201 Missing newline between import groups. 'from copy import deepcopy' is identified as Stdlib and 'from osm_common.dbmemory import DbMemory' is identified as Third Party.
from copy import deepcopy
^
osm_common/tests/test_fsbase.py:21:1: I201 Missing newline between import groups. 'import pytest' is identified as Third Party and 'import http' is identified as Stdlib.
import pytest
^
osm_common/tests/test_fsbase.py:23:1: I100 Import statements are in the wrong order. 'from osm_common.fsbase import FsBase, FsException' should be before 'import pytest' and in a different group.
from osm_common.fsbase import FsBase, FsException
^
osm_common/tests/test_fslocal.py:22:1: I100 Import statements are in the wrong order. 'import http' should be before 'import logging'
import http
^
osm_common/tests/test_fslocal.py:24:1: I201 Missing newline between import groups. 'import pytest' is identified as Third Party and 'import os' is identified as Stdlib.
import pytest
^
osm_common/tests/test_fslocal.py:25:1: I100 Import statements are in the wrong order. 'import tarfile' should be before 'import pytest' and in a different group.
import tarfile
^
osm_common/tests/test_fslocal.py:25:1: I201 Missing newline between import groups. 'import tarfile' is identified as Stdlib and 'import pytest' is identified as Third Party.
import tarfile
^
osm_common/tests/test_fslocal.py:28:1: I100 Import statements are in the wrong order. 'import shutil' should be before 'import uuid'
import shutil
^
osm_common/tests/test_fsmongo.py:20:1: I201 Missing newline between import groups. 'import pytest' is identified as Third Party and 'import logging' is identified as Stdlib.
import pytest
^
osm_common/tests/test_fsmongo.py:21:1: I100 Import statements are in the wrong order. 'import tempfile' should be before 'import pytest' and in a different group.
import tempfile
^
osm_common/tests/test_fsmongo.py:21:1: I201 Missing newline between import groups. 'import tempfile' is identified as Stdlib and 'import pytest' is identified as Third Party.
import tempfile
^
osm_common/tests/test_fsmongo.py:22:1: I100 Import statements are in the wrong order. 'import tarfile' should be before 'import tempfile'
import tarfile
^
osm_common/tests/test_fsmongo.py:23:1: I100 Import statements are in the wrong order. 'import os' should be before 'import tarfile'
import os
^
osm_common/tests/test_fsmongo.py:27:1: I100 Import statements are in the wrong order. 'from gridfs import GridFSBucket' should be before 'from pymongo import MongoClient' and in a different group.
from gridfs import GridFSBucket
^
osm_common/tests/test_fsmongo.py:27:1: I201 Missing newline between import groups. 'from gridfs import GridFSBucket' is identified as Third Party and 'from pymongo import MongoClient' is identified as Third Party.
from gridfs import GridFSBucket
^
osm_common/tests/test_fsmongo.py:29:1: I100 Import statements are in the wrong order. 'from io import BytesIO' should be before 'from gridfs import GridFSBucket' and in a different group.
from io import BytesIO
^
osm_common/tests/test_fsmongo.py:31:1: I202 Additional newline in a group of imports. 'from unittest.mock import Mock' is identified as Stdlib and 'from io import BytesIO' is identified as Stdlib.
from unittest.mock import Mock
^
osm_common/tests/test_fsmongo.py:35:1: I100 Import statements are in the wrong order. 'from pathlib import Path' should be before 'from osm_common.fsmongo import FsMongo' and in a different group.
from pathlib import Path
^
osm_common/tests/test_fsmongo.py:35:1: I201 Missing newline between import groups. 'from pathlib import Path' is identified as Stdlib and 'from osm_common.fsmongo import FsMongo' is identified as Third Party.
from pathlib import Path
^
osm_common/tests/test_msgbase.py:21:1: I201 Missing newline between import groups. 'import pytest' is identified as Third Party and 'import http' is identified as Stdlib.
import pytest
^
osm_common/tests/test_msgbase.py:23:1: I100 Import statements are in the wrong order. 'from osm_common.msgbase import MsgBase, MsgException' should be before 'import pytest' and in a different group.
from osm_common.msgbase import MsgBase, MsgException
^
osm_common/tests/test_msglocal.py:22:1: I201 Missing newline between import groups. 'import pytest' is identified as Third Party and 'import logging' is identified as Stdlib.
import pytest
^
osm_common/tests/test_msglocal.py:23:1: I100 Import statements are in the wrong order. 'import tempfile' should be before 'import pytest' and in a different group.
import tempfile
^
osm_common/tests/test_msglocal.py:23:1: I201 Missing newline between import groups. 'import tempfile' is identified as Stdlib and 'import pytest' is identified as Third Party.
import tempfile
^
osm_common/tests/test_msglocal.py:24:1: I100 Import statements are in the wrong order. 'import shutil' should be before 'import tempfile'
import shutil
^
osm_common/tests/test_msglocal.py:26:1: I100 Import statements are in the wrong order. 'import os' should be before 'import uuid'
import os
^
osm_common/tests/test_msglocal.py:27:1: I201 Missing newline between import groups. 'import yaml' is identified as Third Party and 'import os' is identified as Stdlib.
import yaml
^
osm_common/tests/test_msglocal.py:28:1: I100 Import statements are in the wrong order. 'import time' should be before 'import yaml' and in a different group.
import time
^
osm_common/tests/test_msglocal.py:28:1: I201 Missing newline between import groups. 'import time' is identified as Stdlib and 'import yaml' is identified as Third Party.
import time
^
osm_common/tests/test_msglocal.py:29:1: I100 Import statements are in the wrong order. 'import threading' should be before 'import time'
import threading
^
osm_common/tests/test_msglocal.py:31:1: I202 Additional newline in a group of imports. 'from unittest.mock import MagicMock' is identified as Stdlib and 'import threading' is identified as Stdlib.
from unittest.mock import MagicMock
^
osm_common/tests/test_msglocal.py:32:1: I201 Missing newline between import groups. 'from osm_common.msgbase import MsgException' is identified as Third Party and 'from unittest.mock import MagicMock' is identified as Stdlib.
from osm_common.msgbase import MsgException
^
osm_common/tests/test_sol004_package.py:26:1: I100 Import statements are in the wrong order. 'import unittest' should be before 'from osm_common.sol004_package import SOL004Package, SOL004PackageException' and in a different group.
import unittest
^
osm_common/tests/test_sol004_package.py:26:1: I201 Missing newline between import groups. 'import unittest' is identified as Stdlib and 'from osm_common.sol004_package import SOL004Package, SOL004PackageException' is identified as Third Party.
import unittest
^
setup.py:21:1: I201 Missing newline between import groups. 'from setuptools import setup' is identified as Third Party and 'import os' is identified as Stdlib.
from setuptools import setup
^
ERROR: InvocationError for command /tmp/.tox/flake8/bin/flake8 osm_common/ setup.py (exited with code 1)

=================================== log end ====================================
✖ FAIL flake8 in 13.761 seconds
✔ OK cover in 39.41 seconds
✔ OK safety in 44.293 seconds
✔ OK pylint in 47.707 seconds
___________________________________ summary ____________________________________
  black: commands succeeded
  cover: commands succeeded
ERROR:   flake8: parallel child exit code 1
  pylint: commands succeeded