#3613 [WIP] Use a container environment to run the CI tests.
Closed by cverna. Opened by cverna.
cverna/pagure use_container_ci  into  master

Download 3613.patch

Let's use containers to run in parallel the tests on fedora
and on centos.

Signed-off-by: Clement Verna cverna@tutanota.com

This means we're no longer testing Python 3, since none of the container environment stuff has been adjusted yet...

:thumbsdown:

Sorry I should have put WIP in the title, I am planning to have a Fedora container running Python3 and a CentOS container running Python2.

I wanted to see if what I currently have works, the CI pipeline ran the hold version not use containers :hourglass_flowing_sand:

rebased onto 5db3538792a980ac87e66a206eedf24ccb5553f1

I still have some tests failing so it still need some work but happy to have an early review :smile:

rebased onto b4727bc6e288167bc20d982ac1f0a27fc1defdfd

2 new commits added

  • Use a container environment to run the CI tests.
  • Add chameleon theme to the spec

rebased onto 13bef9910321ff2766e6f7eac3f28191e91483f7

So now the Python3 fedora tests are working, but the Python2 centos are not I have the following issues :

File "/usr/lib/python2.7/site-packages/flask/app.py", line 1090, in _register_error_handler
'It is currently not possible to register a 500 internal ' \
AssertionError: It is currently not possible to register a 500 internal server error on a per-blueprint level.

the flask version installed is python-flask-0.10.1-4.el7.noarch

Please use our Python 3 packages in Fedora, rather than pip3 install.

We need the environment marker, please restore that.

This is not a dep of Pagure anymore.

Please revert this change.

We dropped Pygments as a dep a while ago.

Please drop this, as it's unnecessary. We have environment marker versions of this dep already.

Using the requirements*.txt allows to make sure these files are up to date, I also believe that using pip or pipenv is the Fedora Python SIG recommended way to install packages.

I think I needed all these to successfully run the tests, but I ll give it another try.

@cverna If you are trying to make the requirements file work with EL7, take a look at this to guide you: https://pagure.io/pagure/blob/master/f/files/pagure.spec#_208-214

As for the requirements.txt stuff, I don't mind if there's a test that makes sure it works with pip, but we need one testing Fedora packages too, since that's how we recommend people deploy Pagure.

I have the following error

pagure.lib.git_auth: INFO: Looking for backend: gitolite3
pagure.lib.git_auth: DEBUG: Found the following installed helpers {'test_auth': EntryPoint.parse('test_auth = pagure.lib.git_auth:GitAuthTestHelper'), 'gitolite2': EntryPoint.parse('gitolite2 = pagure.lib.git_a$
th:Gitolite2Auth'), 'gitolite3': EntryPoint.parse('gitolite3 = pagure.lib.git_auth:Gitolite3Auth')}
celery.app.trace: ERROR: Task pagure.lib.tasks.generate_gitolite_acls[5ad23838-2f14-4439-900c-86980f007df4] raised unexpected: DistributionNotFound(Requirement.parse('python-openid'), None)
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/celery/app/trace.py", line 382, in trace_task
R = retval = fun(args, kwargs)
File "/pagure/pagure/lib/tasks.py", line 80, in decorated_function
return function(self, session,
args, kwargs)
File "/pagure/pagure/lib/tasks.py", line 145, in generate_gitolite_acls
pagure_config["GITOLITE_BACKEND"]
File "/pagure/pagure/lib/git_auth.py", line 47, in get_git_auth_helper
cls = classes[backend].load()
File "/usr/lib/python3.6/site-packages/pkg_resources/init.py", line 2317, in load
self.require(*args,
kwargs)
File "/usr/lib/python3.6/site-packages/pkg_resources/init.py", line 2340, in require
items = working_set.resolve(reqs, env, installer, extras=self.extras)
File "/usr/lib/python3.6/site-packages/pkg_resources/init.py", line 774, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'python-openid' distribution was not found and is required by the application

@cverna Only drop the environment markers for EL7. Fedora supports it and it works fine.

@cverna Only drop the environment markers for EL7. Fedora supports it and it works fine.

For some reason on Fedora I had pagure 3.10.1 installed in site-packages that's why I had all these missing packages error.

That's a bug, somehow python-openid ended up in the .egg file as a requirement while for py3 it should be python3-openid (which is installed the line above). See if there isn't an python-openid being added somewhere that shouldn't

rebased onto 8beabf9678335629266f6ec350a398891ccb5e28

rebased onto 3d7cec2d32f45b043e6eae36828305dc52b695aa

rebased onto da98d7c0f657a43511ac72e0d3c2e7190cdcab3b

Let's close this, since the way to run tests has been changed now

Pull-Request has been closed by cverna

Metadata