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

Conversation

Projects
None yet
3 participants
@kwm4385
Contributor

kwm4385 commented Jul 27, 2015

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

Show outdated Hide outdated SingularityUI/app/handlebarsHelpers.coffee
@@ -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"));

This comment has been minimized.

@ssalinas

ssalinas Jul 27, 2015

Member

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

@ssalinas

ssalinas Jul 27, 2015

Member

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

This comment has been minimized.

@kwm4385

kwm4385 Jul 27, 2015

Contributor

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

@kwm4385

kwm4385 Jul 27, 2015

Contributor

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

This comment has been minimized.

Show comment
Hide comment
@tpetr

tpetr Jul 29, 2015

Member

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.

Member

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 from Truncate beginning of file at service.log to Truncate beginning of S3 log filenames Oct 2, 2015

tpetr added a commit that referenced this pull request Oct 13, 2015

Merge pull request #635 from HubSpot/s3_log_truncation
Truncate beginning of S3 log filenames

@tpetr tpetr merged commit d4178d8 into master Oct 13, 2015

0 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
continuous-integration/travis-ci/push The Travis CI build is in progress
Details

@tpetr tpetr modified the milestone: 0.4.6 Oct 13, 2015

@ssalinas ssalinas deleted the s3_log_truncation branch Apr 5, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment