fabric8-analytics / fabric8-analytics-worker

fabric8-analytics worker for gathering raw data
GNU General Public License v3.0
8 stars 45 forks source link

InitPackageFlow should check for metadata task in parent nodes #303

Open fridex opened 7 years ago

fridex commented 7 years ago
{"task_name": "InitPackageFlow", "task_id": "f81db513-208a-4e82-802d-4a7e1c07c07e", "node_args": {"_audit": {"started_at": "2017-09-01T07:57:31.982538", "ended_at": "2017-09-01T07:57:32.124330", "version": "v1"}, "_release": "npm:commons:0.0.1-pre", "document_id": 2770872, "ecosystem": "npm", "name": "commons", "force": true}, "flow_name": "bayesianPackageFlow", "error_type": "<class 'botocore.errorfactory.NoSuchKey'>", "error_traceback": "  File \"/usr/lib/python3.4/site-packages/selinon/selinonTaskEnvelope.py\", line 115, in run\n    result = task.run(node_args)\n  File \"/usr/lib/python3.4/site-packages/f8a_worker/base.py\", line 38, in run\n    result = self.execute(node_args)\n  File \"/usr/lib/python3.4/site-packages/f8a_worker/workers/init_package_flow.py\", line 81, in execute\n    upstream = self.get_upstream_entry(db, package, self.get_upstream_url(arguments))\n  File \"/usr/lib/python3.4/site-packages/f8a_worker/workers/init_package_flow.py\", line 18, in get_upstream_url\n    metadata_result = self.parent_task_result('metadata')\n  File \"/usr/lib/python3.4/site-packages/selinon/selinonTask.py\", line 89, in parent_task_result\n    return StoragePool.retrieve(self.flow_name, parent_name, parent_task_id)\n  File \"/usr/lib/python3.4/site-packages/selinon/storagePool.py\", line 116, in retrieve\n    result = storage.retrieve(flow_name, task_name, task_id)\n  File \"/usr/lib/python3.4/site-packages/f8a_worker/storages/postgres_base.py\", line 97, in retrieve\n    task_name\n  File \"/usr/lib/python3.4/site-packages/f8a_worker/storages/s3_data.py\", line 29, in retrieve_task_result\n    return self.retrieve_dict(object_key)\n  File \"/usr/lib/python3.4/site-packages/f8a_worker/storages/s3.py\", line 196, in retrieve_dict\n    return json.loads(self.retrieve_blob(object_key).decode())\n  File \"/usr/lib/python3.4/site-packages/f8a_worker/storages/s3.py\", line 192, in retrieve_blob\n    return self._s3.Object(self.bucket_name, object_key).get()['Body'].read()\n  File \"/usr/lib/python3.4/site-packages/boto
3/resources/factory.py\", line 520, in do_action\n    response = action(self, *args, **kwargs)\n  File \"/usr/lib/python3.4/site-packages/boto3/resources/action.py\", line 83, in __call__\n    response = getattr(parent.meta.client, operation_name)(**params)\n  File \"/usr/lib/python3.4/site-packages/botocore/client.py\", line 310, in _api_call\n    return self._make_api_call(operation_name, kwargs)\n  File \"/usr/lib/python3.4/site-packages/botocore/client.py\", line 599, in _make_api_call\n    raise error_class(parsed_response, operation_name)\n", "error_value": "An error occurred (NoSuchKey) when calling the GetObject operation: The specified key does not exist.", "event": "STORAGE_OMIT_STORE_ERROR"}
2017-09-06 09:16:22,869 [ERROR] celery.app.trace: Task selinon.SelinonTaskEnvelope[f81db513-208a-4e82-802d-4a7e1c07c07e] raised unexpected: NoSuchKey('An error occurred (NoSuchKey) when calling the GetObject operation: The specified key does not exist.',)
Traceback (most recent call last):
  File "/usr/lib/python3.4/site-packages/celery/app/trace.py", line 367, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/usr/lib/python3.4/site-packages/celery/app/trace.py", line 622, in __protected_call__
    return self.run(*args, **kwargs)
  File "/usr/lib/python3.4/site-packages/selinon/selinonTaskEnvelope.py", line 170, in run
    raise self.retry(max_retries=0, exc=exc)
  File "/usr/lib/python3.4/site-packages/celery/app/task.py", line 668, in retry
    raise_with_context(exc)
  File "/usr/lib/python3.4/site-packages/selinon/selinonTaskEnvelope.py", line 115, in run
    result = task.run(node_args)
  File "/usr/lib/python3.4/site-packages/f8a_worker/base.py", line 38, in run
    result = self.execute(node_args)
  File "/usr/lib/python3.4/site-packages/f8a_worker/workers/init_package_flow.py", line 81, in execute
    upstream = self.get_upstream_entry(db, package, self.get_upstream_url(arguments))
  File "/usr/lib/python3.4/site-packages/f8a_worker/workers/init_package_flow.py", line 18, in get_upstream_url
    metadata_result = self.parent_task_result('metadata')
  File "/usr/lib/python3.4/site-packages/selinon/selinonTask.py", line 89, in parent_task_result
    return StoragePool.retrieve(self.flow_name, parent_name, parent_task_id)
  File "/usr/lib/python3.4/site-packages/selinon/storagePool.py", line 116, in retrieve
    result = storage.retrieve(flow_name, task_name, task_id)
  File "/usr/lib/python3.4/site-packages/f8a_worker/storages/postgres_base.py", line 97, in retrieve
    task_name
  File "/usr/lib/python3.4/site-packages/f8a_worker/storages/s3_data.py", line 29, in retrieve_task_result
    return self.retrieve_dict(object_key)
  File "/usr/lib/python3.4/site-packages/f8a_worker/storages/s3.py", line 196, in retrieve_dict
    return json.loads(self.retrieve_blob(object_key).decode())
  File "/usr/lib/python3.4/site-packages/f8a_worker/storages/s3.py", line 192, in retrieve_blob
    return self._s3.Object(self.bucket_name, object_key).get()['Body'].read()
  File "/usr/lib/python3.4/site-packages/boto3/resources/factory.py", line 520, in do_action
    response = action(self, *args, **kwargs)
  File "/usr/lib/python3.4/site-packages/boto3/resources/action.py", line 83, in __call__
    response = getattr(parent.meta.client, operation_name)(**params)
  File "/usr/lib/python3.4/site-packages/botocore/client.py", line 310, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/usr/lib/python3.4/site-packages/botocore/client.py", line 599, in _make_api_call
    raise error_class(parsed_response, operation_name)
botocore.errorfactory.NoSuchKey: An error occurred (NoSuchKey) when calling the GetObject operation: The specified key does not exist.
jpopelka commented 7 years ago

Also #231