-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
TeamCity: archive debug logs if there are over 1000 of them #12083
TeamCity: archive debug logs if there are over 1000 of them #12083
Conversation
…bug` is uploaded to artifact storage
…logs if their count is >=1000
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
…manual testing in TeamCity
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
Hi @shuyama1 - this PR addresses recent issues with artifacts for the Compute builds in TeamCity. The PR description links to some builds where I show the new build step in action. Something annoying I noticed is that the TeamCity UI makes it looks like you can open archived files in the UI: ![]() However if you click to expand it causes a 500 error (you can try here): ![]() The error mentions "java.util.zip.ZipException: Not in GZIP format" but I think the file format is fine? I'm not sure if this is something I can resolve myself. The file is still ok to be downloaded and opened locally though. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the fix!
Description
This PR addresses issues like in this build:
The plugin used for uploading artifacts to S3 has a limit of 1000 artifacts per build. After contacting JetBrains support they suggested archiving files as a solution. The downside to this is that this would make it harder to open specific artifacts in your web browser, instead you'd need to download the entire zip/tar file, open it and then find the logs file you want.
The compromise discussed in the team chat was to archive logs only if a build exceeds the limit. This PR introduces that behaviour.
Testing
I used this PR to create a test project in TeamCity for manual testing of the bash in the new build step. This PR has some commits from when I forced builds to create >1000 or <1000 debug*.txt files and then see how the new build step reacted.
When there are >=1000 artifacts present
This commit 7b966a7 shows how I forced builds to look like they had >1000 debug logs.
Here's a build in TeamCity showing the outcome:
In step 1 >1000 debug files are made
In step 2
The result is the artifacts tab contains only that .tar.gz file:
When there are <1000 artifacts present
This build shows the opposite scenario, where I made the builds instead create only 10 debug files (bfbca51)
Step 2 now looks like this:
And the artifacts tab shows the 10 files unchanged:
Release Note Template for Downstream PRs (will be copied)
See Write release notes for guidance.