-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
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
[Fixed JENKINS-13655] Enable transparent log decompression support #549
Conversation
This only works if the "transparent GZIP support" patch has been applied against Stapler. Otherwise, this patch will not compile as the new "LargeText" constructor will not be found. Additionally, the console.jelly was modified to make use of the stream instead of the raw file, which is necessary to get the correct uncompressed size of the file for skipping bytes. [JENKINS-2551] [JENKINS-10400] [JENKINS-13655] Signed-off-by: Martin Schroeder <martin.h.schroeder@intel.com>
The link to the associated Stapler pull request is: |
JENKINS-10400 is currently marked fixed. Should it be reopened, and does your pull request claim to fix it? |
Will there be any effect on a client of the REST API |
It replaces the fix for JENKINS-10400, as that change introduced the "fix" in Jenkins that checks if a "log.gz" exists, and if so, return a GZIPOutputStream instead of a FileOutputStream. This fix was subsequently broken by the introduction of the LineFormatter API (if I remember correctly) which allows plugins like the "Timestamper" to annotate the lines. These annotations were dumped as GZIP+Base64 encoded blobs into the log file itself. The original fix for JENKINS-10400 caused these blobs to be displayed as-is in Base64. With this patch; Stapler does transparent decompression for Jenkins, so that the latter can properly decode these blobs as if the file was uncompressed. |
No. This patch only works on files that are already GZIPed and does not compress anything on its own. While the log is generated, it remains uncompressed; as such, the progressive log API works fine. Only if you afterwards compress the logs externally -- either via a cronjob or a periodic job inside Jenkins -- does this patch cause any alteration in the behaviour of Stapler and Jenkins. |
Well what I was asking was whether |
Thanks, now I understand you. :) I've just tested it on our internal productive Jenkins instance that has the patches applied. I tested the following calls, both with a compressed and uncompressed log file. Both cases returned the exactly same output: http://[server]/job/[jobName]/[id]/progressiveLog The only change is that the "start" option will now need to decompress the file until that position; instead of the entire operation being just a simple "seek" operation. This is by the way also the reason why I decided to not implement any online compression of the log. |
In other words, I agree that compressing the log of a build in progress could lead to poor performance. |
Signed-off-by: Martin Schroeder <martin.h.schroeder@intel.com>
Hi everyone. Any updates on when this pull request will be merged? The associated pull request to Stapler was already merged 2 weeks ago, so there should be no problems: Thanks! |
Hi again. I just took a look at the changes in the Jenkins and Stapler git repos. The changes that this pull request needed in Stapler have been merged into its mainline starting with v1.196. Jenkins makes use of these changes since its v1.482 release; where the dependency on Stapler was moved from v1.195 to v1.197. As such this pull request can be merged immediately as all the necessary dependencies are now fulfilled. Thanks! |
There is some sort of merge conflict with trunk; you should fetch Will probably leave it to @kohsuke to review & apply, but this all looks reasonable to me (have not personally tested). |
This resolves a tiny merge conflict on a changed comment. Signed-off-by: Martin Schroeder <martin.h.schroeder@intel.com>
Hi everyone. I've merged in all the changes from the 1.485 tag on origin/master. All this does is to fix a single small conflict on a single comment, where Darek Ostolski added his company name to the licencing comment. Hopefully this merge will not break things even further. :P |
Closed in favour of the following pull request, as the branch that this request was based on has become unmergeable. |
This change enables use of the Stapler transparent decompression
support that was added by another pull-request to the Stapler project.
This means, that this change will not compile when the
changes to Stapler are not applied, as the new "LargeText"
constructor will not be found.
Additionally, the console.jelly was modified to make use of the
stream instead of the raw file, which is necessary to get the
correct uncompressed size of the file for skipping bytes.
This submission fixes the following bugs in the JIRA bug tracker:
[JENKINS-2551]
[JENKINS-10400]
[JENKINS-13655]
Signed-off-by: Martin Schroeder martin.h.schroeder@intel.com