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

[JENKINS-27208] Compatible with Workflow #10

Merged
merged 10 commits into from Oct 13, 2015

Conversation

recena
Copy link
Contributor

@recena recena commented Sep 27, 2015

JENKINS-27208

node {
  checkout changelog: false, poll: false, scm: [$class: 'SubversionSCM', additionalCredentials: [], excludedCommitMessages: '', excludedRegions: '', excludedRevprop: '', excludedUsers: '', filterChangelog: false, ignoreDirPropChanges: false, includedRegions: '', locations: [[credentialsId: '45f065ab-6e41-40d2-9f01-db726aa4621d', depthOption: 'infinity', ignoreExternalsOption: true, local: '.', remote: 'https://subversion.assembla.com/svn/jenkins-26318/trunk']], workspaceUpdater: [$class: 'UpdateUpdater']]
  sh 'mvn clean install -Dmaven.test.skip'
  step([$class: 'LogParserPublisher', 'useProjectRule': true, 'projectRulePath': 'logparser-rules.txt'])
}

@reviewbybees, specially @jglick and @amuniz

@ghost
Copy link

ghost commented Sep 27, 2015

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.

@recena recena changed the title [JENKINS-27208] Compatible with Workflow [WiP] [JENKINS-27208] Compatible with Workflow Sep 27, 2015
@@ -59,7 +64,7 @@ public static String getUrlNameStat() {
return urlName;
}

public AbstractBuild<?, ?> getOwner() {
public Run<?, ?> getOwner() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Binary compatibility issue

Copy link
Contributor Author

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?

Copy link
Member

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

Copy link
Member

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.

Copy link
Member

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 {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Breaks the compatibility

Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@jenkinsadmin
Copy link
Member

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>
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Member

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

@amuniz
Copy link
Member

amuniz commented Sep 28, 2015

🐝 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 @WithBridgeMethods and a couple of try-catch-throw).

@recena
Copy link
Contributor Author

recena commented Sep 28, 2015

@amuniz Exactly. If the maintainer wants to keep backward compatibility, I'll do it.

@tfennelly
Copy link
Member

🐝

@recena
Copy link
Contributor Author

recena commented Sep 28, 2015

@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.

@recena recena changed the title [WiP] [JENKINS-27208] Compatible with Workflow [JENKINS-27208] Compatible with Workflow Sep 30, 2015
@recena
Copy link
Contributor Author

recena commented Sep 30, 2015

@tfennelly @amuniz @oleg-nenashev

I had to do some changes:

  • Snippet generator did not work as I expected.
  • Add a specific test for workflow compatibility

Could you review this PR again? Thank in advance.

@tfennelly
Copy link
Member

🐝 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">
Copy link
Member

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.

Copy link
Contributor Author

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.

@amuniz
Copy link
Member

amuniz commented Sep 30, 2015

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 🐝

@recena
Copy link
Contributor Author

recena commented Sep 30, 2015

@amuniz Nice review. I'll address your comments.

@recena
Copy link
Contributor Author

recena commented Oct 1, 2015

@reviewbybees done

@recena
Copy link
Contributor Author

recena commented Oct 1, 2015

@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>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT: indenting

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@recena
Copy link
Contributor Author

recena commented Oct 5, 2015

@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
Copy link
Member

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.

Copy link
Contributor Author

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
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jglick Done

@jglick
Copy link
Member

jglick commented Oct 5, 2015

belated 🐝

@recena
Copy link
Contributor Author

recena commented Oct 5, 2015

@jglick your 🐝 are never belated. Thank so much!

@tfennelly
Copy link
Member

🐝

@recena
Copy link
Contributor Author

recena commented Oct 6, 2015

@reviewbybees done

@ghost
Copy link

ghost commented Oct 6, 2015

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.

recena added a commit that referenced this pull request Oct 13, 2015
[JENKINS-27208] Compatible with Workflow
@recena recena merged commit 7cce021 into jenkinsci:master Oct 13, 2015
@recena recena deleted the JENKINS-27208 branch October 13, 2015 13:49
@recena
Copy link
Contributor Author

recena commented Oct 14, 2015

@orrc My commit message was confused. The obsolete part was related to newInstance() and how the params are processed. Only that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
7 participants