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
[JENKINS-27208] Compatible with Workflow #10
Conversation
This pull request originates from a CloudBees employee. At CloudBees, we require that all pull requests be reviewed by other CloudBees employees before we seek to have the change accepted. If you want to learn more about our process please see this explanation. |
@@ -59,7 +64,7 @@ public static String getUrlNameStat() { | |||
return urlName; | |||
} | |||
|
|||
public AbstractBuild<?, ?> getOwner() { | |||
public Run<?, ?> getOwner() { |
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.
Binary compatibility issue
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.
@oleg-nenashev I'd like to talk wih the maintainer about it. The last release of this plugin was on 15 Dec 2010. Do you think make sense?
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'm pretty sure I've used these actions in my scripts at the previous work... And yes, the plugin used to work well :)
BTW, a release with a new major version could be an option. I have no idea how to properly test the previously merged commits since the last release
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.
There's an annotation that can be used. It's called @WithBridgeMethods
or something.
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, example here.
@@ -40,7 +41,7 @@ | |||
|
|||
public LogParserParser(final FilePath parsingRulesFile, | |||
final boolean preformattedHtml, final VirtualChannel channel) | |||
throws IOException { | |||
throws IOException, InterruptedException { |
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.
Breaks the compatibility
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.
Actually, not sure why it was added given that the constructor code didn't change.
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.
Done
Thank you for a pull request! Please check this document for how the Jenkins project handles pull requests |
</parent> | ||
<artifactId>log-parser</artifactId> | ||
<packaging>hpi</packaging> | ||
<version>1.1-SNAPSHOT</version> | ||
<name>Log Parser Plugin</name> | ||
|
||
<properties> | ||
<workflow-jenkins-plugin.version>1.4</workflow-jenkins-plugin.version> |
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.
Seeing as the version is only ref'd in one place, is it really worth splitting out a property for 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.
I agree. I decided to add this section properties
because I'm working on #9 and I'll need to reference more values.
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 think you can use 1.7
as you upgraded core to 1.596.1
🐝 despite binary incompatibilities. You have to decide (with the maintainer, if still active) if you want to keep backward compatibility. IMO it's a common rule in plugins and it's a good option -- if possible -- (and in this case is easy with |
@amuniz Exactly. If the maintainer wants to keep backward compatibility, I'll do it. |
🐝 |
@tfennelly @amuniz @oleg-nenashev Thanks so much for your time. Before to consider this PR done, I'm would like to contact with the maintainer and verify snippet generator is working fine. |
@tfennelly @amuniz @oleg-nenashev I had to do some changes:
Could you review this PR again? Thank in advance. |
🐝 LGTM |
@@ -9,7 +9,7 @@ | |||
<f:entry title="Show log parser graphs" help="/plugin/log-parser/parser_graphs.html"> | |||
<f:checkbox name="log-parser.showGraphs" checked="${instance.showGraphs}"/> | |||
</f:entry> | |||
<f:radioBlock title="Use global rule" name="log-parser.useProjectRule" value="false" checked="${instance.useProjectRule!=true}"> | |||
<f:radioBlock title="Use global rule" name="log-parser.useProjectRule" value="false" checked="${instance.useProjectRule!=true}" inline="true"> |
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.
Did you check if there some acceptance test relying on this? The inline
attribute changes the selector to access the field in acceptance tests.
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.
@amuniz It seems there aren't acceptance tests for this plugin.
Kudos for adding a test. A configuration round trip test would be in place as well, since there were some changes in data bound aware fields. At any rate 🐝 |
@amuniz Nice review. I'll address your comments. |
@reviewbybees done |
@jborghi Consider this PR ready to merge. Your comments are welcome. |
<groupId>org.jenkins-ci.plugins.workflow</groupId> | ||
<artifactId>workflow-aggregator</artifactId> | ||
<version>${workflow-jenkins-plugin.version}</version> | ||
<scope>test</scope> |
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.
NIT: indenting
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.
Done.
@reviewbybees done |
final String logFileLocation, final int linesInLog, | ||
final Logger logger) throws IOException, InterruptedException { | ||
@Deprecated | ||
private void parseLogBody(final AbstractBuild build, final BufferedWriter writer, final FilePath filePath, final |
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.
Deprecating a private
method makes no sense. You can just delete 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.
@jglick It is true. Done.
} | ||
|
||
@Override | ||
public void perform(Run<?, ?> run, FilePath workspace, Launcher launcher, TaskListener listener) throws |
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.
BTW naming the first parameter build
would minimize diff lines.
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.
@jglick Done
belated 🐝 |
@jglick your 🐝 are never belated. Thank so much! |
🐝 |
@reviewbybees done |
This pull request has completed our internal processes and we now respectfully request the maintainers of this repository to consider our proposal contained within this pull request for merging. |
[JENKINS-27208] Compatible with Workflow
@orrc My commit message was confused. The obsolete part was related to |
JENKINS-27208
@reviewbybees, specially @jglick and @amuniz