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 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"));

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

This comment has been minimized.

@kwm4385

kwm4385 Jul 27, 2015 Author 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
Copy link
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 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 Oct 13, 2015
tpetr added 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
0 of 2 checks passed
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 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 Apr 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.