New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix test SyncPublishDownloadPolicyTestCase #1299
Conversation
|
This one will be rebased after #1298 is merged. |
|
@kersommoura , why is it still passing? I thought it should fail without a fix from #1298. |
|
@goosemania, I will double check. |
'Task report /pulp/api/v3/tasks/0afdc1fb-559b-4cdb-a026-b03b2fd1c97e/ '
'contains a error: {\'code\': None, \'description\': "\'NoneType\' object has '
'no attribute \'file\'", \'traceback\': \' File '
'"/usr/local/lib/pulp/lib64/python3.7/site-packages/rq/worker.py", line 799, '
'in perform_job\\n rv = job.perform()\\n File '
'"/usr/local/lib/pulp/lib64/python3.7/site-packages/rq/job.py", line 600, in '
'perform\\n self._result = self._execute()\\n File '
'"/usr/local/lib/pulp/lib64/python3.7/site-packages/rq/job.py", line 606, in '
'_execute\\n return self.func(*self.args, **self.kwargs)\\n File '
'"/usr/local/lib/pulp/lib64/python3.7/site-packages/pulp_rpm/app/tasks/publishing.py", '
'line 132, in publish\\n pkg = '
"cr.package_from_rpm(artifact.content_artifact.artifact.file.path)\\n'}\n"
"Full task report: {'_href': "
"'/pulp/api/v3/tasks/0afdc1fb-559b-4cdb-a026-b03b2fd1c97e/', '_created': "
"'2019-03-14T17:19:11.000980Z', 'job_id': "
"'b266e8d6-872c-47a6-b921-f15ae57519a2', 'state': 'failed', 'name': "
"'pulp_rpm.app.tasks.publishing.publish', 'started_at': "
"'2019-03-14T17:19:11.078500Z', 'finished_at': '2019-03-14T17:19:11.313561Z', "
"'non_fatal_errors': [], 'error': {'code': None, 'description': "
'"\'NoneType\' object has no attribute \'file\'", \'traceback\': \' File '
'"/usr/local/lib/pulp/lib64/python3.7/site-packages/rq/worker.py", line 799, '
'in perform_job\\n rv = job.perform()\\n File '
'"/usr/local/lib/pulp/lib64/python3.7/site-packages/rq/job.py", line 600, in '
'perform\\n self._result = self._execute()\\n File '
'"/usr/local/lib/pulp/lib64/python3.7/site-packages/rq/job.py", line 606, in '
'_execute\\n return self.func(*self.args, **self.kwargs)\\n File '
'"/usr/local/lib/pulp/lib64/python3.7/site-packages/pulp_rpm/app/tasks/publishing.py", '
'line 132, in publish\\n pkg = '
"cr.package_from_rpm(artifact.content_artifact.artifact.file.path)\\n'}, "
"'worker': '/pulp/api/v3/workers/907c9b9a-bbc8-4fb1-b5e1-a8f8e74c8473/', "
"'parent': None, 'spawned_tasks': [], 'progress_reports': [], "
"'created_resources': []}",
{'_created': '2019-03-14T17:19:11.000980Z',
'_href': '/pulp/api/v3/tasks/0afdc1fb-559b-4cdb-a026-b03b2fd1c97e/',
'created_resources': [],
'error': {'code': None,
'description': "'NoneType' object has no attribute 'file'",
'traceback': ' File '
'"/usr/local/lib/pulp/lib64/python3.7/site-packages/rq/worker.py", '
'line 799, in perform_job\n'
' rv = job.perform()\n'
' File '
'"/usr/local/lib/pulp/lib64/python3.7/site-packages/rq/job.py", '
'line 600, in perform\n'
' self._result = self._execute()\n'
' File '
'"/usr/local/lib/pulp/lib64/python3.7/site-packages/rq/job.py", '
'line 606, in _execute\n'
' return self.func(*self.args, **self.kwargs)\n'
' File '
'"/usr/local/lib/pulp/lib64/python3.7/site-packages/pulp_rpm/app/tasks/publishing.py", '
'line 132, in publish\n'
' pkg = '
'cr.package_from_rpm(artifact.content_artifact.artifact.file.path)\n'},
'finished_at': '2019-03-14T17:19:11.313561Z',
'job_id': 'b266e8d6-872c-47a6-b921-f15ae57519a2',
'name': 'pulp_rpm.app.tasks.publishing.publish',
'non_fatal_errors': [],
'parent': None,
'progress_reports': [],
'spawned_tasks': [],
'started_at': '2019-03-14T17:19:11.078500Z',
'state': 'failed',
'worker': '/pulp/api/v3/workers/907c9b9a-bbc8-4fb1-b5e1-a8f8e74c8473/'})
Before I sent this PR I ran the test locally with a fresh Pulp installation from yesterday. I will take a look into Travis, and double check if there is anything that can be improved in the test itself. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is passing on Travis because by the time these 2 tests run, a previous test has already populated Pulp with the artifacts needed during the publish part of the test. These two tests should either use a different fixture repository than the other tests or we need to clean up orphans before running the test.
Fix test `SyncPublishDownloadPolicyTestCase`. Add publish step. https://pulp.plan.io/issues/4412 https://pulp.plan.io/issues/4418 ref: #4418
|
@dkliban, added the clean up, tests failed as expected. |
|
Looks like this change affected a couple of other tests also. However, the failures look exactly the same as the other publishing errors. @goosemania, merge when you think it's appropriate. |
|
Merging. Tests are supposed to fail, a follow-up PR which fixes publish will be merged shortly. |
Fix test
SyncPublishDownloadPolicyTestCase. Add publish step.https://pulp.plan.io/issues/4418
ref: #4418