Skip to content
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

drakrun, drakcore: Check size of uploaded log file #550

Merged
merged 1 commit into from
May 11, 2021

Conversation

chivay
Copy link
Collaborator

@chivay chivay commented May 11, 2021

If analysis emits no logs while processing a task, uploading log file to
object store will fail - karton disallows empty resources.
Skip uploading when there's no data.

Generated stacktrace:

Traceback (most recent call last):
   File "/opt/venvs/drakcore/lib/python3.7/site-packages/drakcore/process.py", line 56, in wrapper
    res.upload(self.backend)
   File "/opt/venvs/drakcore/lib/python3.7/site-packages/karton/core/resource.py", line 322, in upload
    raise RuntimeError("Can't upload resource without content")
 RuntimeError: Can't upload resource without content

If analysis emits no logs while processing a task, uploading log file to
object store will fail - karton disallows empty resources.
Skip uploading when there's no data.

Generated stacktrace:
Traceback (most recent call last):
   File "/opt/venvs/drakcore/lib/python3.7/site-packages/drakcore/process.py", line 56, in wrapper
    res.upload(self.backend)
   File "/opt/venvs/drakcore/lib/python3.7/site-packages/karton/core/resource.py", line 322, in upload
    raise RuntimeError("Can't upload resource without content")
 RuntimeError: Can't upload resource without content
@chivay chivay requested a review from a team May 11, 2021 10:10
@chivay chivay merged commit 737ce76 into master May 11, 2021
@chivay chivay deleted the fix/resource-upload branch May 11, 2021 12:40
chivay added a commit that referenced this pull request May 11, 2021
If analysis emits no logs while processing a task, uploading log file to
object store will fail - karton disallows empty resources.
Skip uploading when there's no data.

Generated stacktrace:
Traceback (most recent call last):
   File "/opt/venvs/drakcore/lib/python3.7/site-packages/drakcore/process.py", line 56, in wrapper
    res.upload(self.backend)
   File "/opt/venvs/drakcore/lib/python3.7/site-packages/karton/core/resource.py", line 322, in upload
    raise RuntimeError("Can't upload resource without content")
 RuntimeError: Can't upload resource without content
@chivay
Copy link
Collaborator Author

chivay commented May 11, 2021

Queued for v0.16.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants