Conversation
…s them through for upload function; in upload function, use spider and project names to construct a new upload path so the log files are grouped by the provided names; fix typos in k8s manifest
wvengen
reviewed
Apr 1, 2025
Member
wvengen
left a comment
There was a problem hiding this comment.
Thank you, straightforward implementation, that will be useful!
Some small notes, otherwise good to go 🚀
kubernetes.yaml
Outdated
|
|
||
| [joblogs] | ||
| logs_dir = /data/joblogs | ||
| logs_dir = /tmp/joblogs |
Member
There was a problem hiding this comment.
why this change?
Using /tmp by default is dangerous, as a pod restart (or moving to another node) can lose joblogs.
Collaborator
Author
There was a problem hiding this comment.
yeah, I forgot to change it, I was using tmp for testing it
| verify_hash=False, | ||
| headers=None | ||
| ) | ||
| logger.debug("HEY I AN UPLOADING") |
Member
|
p.s. please mention the issue in the PR body, so that it is more easily findable in Github. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#47
The new changes affect two methods:
KubernetesJobLogHandler.handle_events and LibcloudObjectStorage.upload_file
handle_events now extract two more labels from the job pod to identify project and spider names and then passes them to the upload_file function.
upload_file uses project name, spider name and extract job_id from a local_path parameter to construct a new object name that is used to create a specific directory like structure in the remote storage.