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

Truncate beginning of S3 log filenames #635

Merged
merged 4 commits into from
Oct 13, 2015
Merged

Truncate beginning of S3 log filenames #635

merged 4 commits into from
Oct 13, 2015

Conversation

kwm4385
Copy link
Contributor

@kwm4385 kwm4385 commented Jul 27, 2015

Truncate the beginning of s3 log files to enable reading of useful information.

@@ -106,3 +106,6 @@ Handlebars.registerHelper 'usernameFromEmail', (email) ->

Handlebars.registerHelper 'substituteTaskId', (value, taskId) ->
value.replace('$TASK_ID', taskId)

Handlebars.registerHelper 'trimS3File', (filename) ->
return '...' + filename.substring(filename.indexOf("service.log"));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unfortunately the log name will not always be service.log. That is the default for the SingularityExecutor, but it could be anything for s3 logs. I might go more on the route of taking the taskId out of the name (since we are already on the task page) to make a name that is more readable and shorter without having to truncate

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was afraid that was the case. This model doesn't include the task id but I should be able to add it in.

@tpetr
Copy link
Contributor

tpetr commented Jul 29, 2015

This looks good but to be fully complete, we should surface the s3KeyFormat to the API (https://github.com/HubSpot/Singularity/blob/master/SingularityService/src/main/java/com/hubspot/singularity/config/S3Configuration.java#L28-L34), and strip things off from there.

@tpetr tpetr changed the title Truncate beginning of file at service.log Truncate beginning of S3 log filenames Oct 2, 2015
@tpetr tpetr force-pushed the s3_log_truncation branch from 4d61622 to 0402529 Compare October 13, 2015 20:56
tpetr pushed a commit that referenced this pull request Oct 13, 2015
Truncate beginning of S3 log filenames
@tpetr tpetr merged commit d4178d8 into master Oct 13, 2015
@tpetr tpetr removed hs_qa labels Oct 13, 2015
@tpetr tpetr modified the milestone: 0.4.6 Oct 13, 2015
@ssalinas ssalinas deleted the s3_log_truncation branch April 5, 2016 15:33
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.

3 participants