-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
[JENKINS-54532] Document how to get parameters from a Run #3724
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
Conversation
b7fe96a to
c6a4b46
Compare
|
I will poke the build once the PR builder is fixed |
|
Thanks for the fixes, sorry this was a bit fire-and-forget. |
|
Neither blueocean nor common UI show what is the root cause easily. |
|
From the logs it looks like a test failed? Not sure why it didn't show up in the test view in Blue Ocean or classic UI: |
@dwnusbaum It is a separate issue, see #3811 by @jglick . It does not impact the build, because the test is retried after that. We will cleanup up this misleading error in few week once Java 11 is in GA |
|
The build failed in the Windows JDK 8 branch because of a Javadoc error: Looks like a visualization bug in BlueOcean. If you click on the Windows JDK 8 branch then it does show the failing step at the end, so I'm not sure what happened. I looked through Jira but didn't find a similar bug already reported, so maybe it's a regression from some other fix? |
|
Thanks @dwnusbaum ! |
| * It will use a gzip-compressed log file (log.gz) if that exists. | ||
| * | ||
| * It will use a gzip-compressed log file (log.gz) if that exists, decompressing | ||
| * it on the fly to return the uncompressed data. |
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.
Not a fan of this being documented in the API (strictly speaking, this means JEP-210 is invalid), but at least this PR doesn't add it.
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.
Yeah to complement #3963 I would suggest simply deleting this sentence. How or where the log text is stored is a matter of no concern to the caller of this method, and for Pipeline there is no built-in gzip support (this implementation is not used).
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.
+1, also this would become wrong indeed if we ended up merging #3966
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.
Removing it at all since there is a consensus. Not much related to the PR anyway
| * It will use a gzip-compressed log file (log.gz) if that exists. | ||
| * | ||
| * It will use a gzip-compressed log file (log.gz) if that exists, decompressing | ||
| * it on the fly to return the uncompressed data. |
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.
Yeah to complement #3963 I would suggest simply deleting this sentence. How or where the log text is stored is a matter of no concern to the caller of this method, and for Pipeline there is no built-in gzip support (this implementation is not used).
| * Many details of a run are contained in {@link Action} instances | ||
| * accessible via {@link Actionable#getAllActions} and {@link #getAction(Class)}. | ||
| * For example, build access to build parameters is obtained with | ||
| * <code>run.getAction(hudson.model.ParametersAction.class)</code> to |
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.
| * <code>run.getAction(hudson.model.ParametersAction.class)</code> to | |
| * {@code run.getAction(ParametersAction.class)} to |
| } | ||
|
|
||
| /** | ||
| * Returns a Reader that reads from the log file. |
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.
| * Returns a Reader that reads from the log file. | |
| * Reads from the log file. |
Stating the return type of a method (and without @code or @link, at that) is not helpful.
| /** | ||
| * Returns a Reader that reads from the log file. | ||
| * | ||
| * This is the simplest way to access the job's console log. |
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.
Well…not necessarily. Depends on what you wanted to accomplish. For example, this will contain raw console notes, which might be unwanted in some contexts. getLogText is the most general way to access the log, as you can use that to work with the log in a variety of ways.
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.
Agreed, we should not be doing arguable suggestions, especially if we return to JEP-207
| * This is the simplest way to access the job's console log. |
The previous code was missing a change to getLogFile(), that was not applied due to the deprecation of getLogFile() in the upstream code. This led to the new files never being read. The new code will pick up compressed log files regardless of their extension, as long as they are named "log" or "log.*" -- with the uncompressed version always being preferred. Also: - Extended the logging to give some additional feedback to the users in case of errors or missing files - Rephrased the API docs to no longer refer to log files (See: jenkinsci#3724)
|
@batmat Why is this assigned to you? |
|
@daniel-beck no particular reason. IIRC was just a way to add it to my bucket and get it over the fence. But I failed since. |
| * It will use a gzip-compressed log file (log.gz) if that exists. | ||
| * | ||
| * It will use a gzip-compressed log file (log.gz) if that exists, decompressing | ||
| * it on the fly to return the uncompressed data. |
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.
| * it on the fly to return the uncompressed data. |
| * It will use a gzip-compressed log file (log.gz) if that exists. | ||
| * | ||
| * It will use a gzip-compressed log file (log.gz) if that exists, decompressing | ||
| * it on the fly to return the uncompressed data. |
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.
Removing it at all since there is a consensus. Not much related to the PR anyway
| * Returns an input stream that reads from the log file. | ||
| * It will use a gzip-compressed log file (log.gz) if that exists. | ||
| * | ||
| * It will use a gzip-compressed log file (log.gz) if that exists, decompressing |
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.
| * It will use a gzip-compressed log file (log.gz) if that exists, decompressing |
oleg-nenashev
left a comment
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.
I have no permission to push to the original repository, so I cannot apply the proposed changes.
@ringerc if you are still interested to get it over the line, please apply changes so that we can integrate it
|
Given no answer since May, we will close this Pull Request on next pass. Thanks a lot for your understanding. |
|
Closing since there is no answer since May and it's proposed for close. Please reopen the PR if you plan keep on working on it. |
See JENKINS-54532.
Proposed changelog entries
Submitter checklist
* Use the
Internal:prefix if the change has no user-visible impact (API, test frameworks, etc.)