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

fixed Rultor login prefix not recognized correctly in comments, when … #1000

Closed
wants to merge 4 commits into from

Conversation

original-brownbear
Copy link
Contributor

…delimited by comma, by using regex for #821

@alex-palevsky
Copy link
Contributor

@original-brownbear Many thanks for the PR, let me find a reviewer for it

@alex-palevsky
Copy link
Contributor

@mkordas review this pull request plz

@mkordas
Copy link

mkordas commented Feb 7, 2016

@original-brownbear I'm on it

Logger.info(this, "mention found in #%d", comment.issue().number());
req = Req.DONE;
final Matcher matcher = Pattern.compile(
String.format(".*\\b?(%s\\b).*", prefix)
Copy link

Choose a reason for hiding this comment

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

@original-brownbear here you have some complex regexp, but I see just one test

Copy link
Contributor Author

Choose a reason for hiding this comment

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

not done here yet sorry my mistake

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mkordas now this should be handled too.

@mkordas
Copy link

mkordas commented Feb 7, 2016

@original-brownbear please see a few comments above

@original-brownbear
Copy link
Contributor Author

@mkordas I think I addressed all points now.

Made it match like this now:

  • comma or whitespace in front of mention => match but don't understand as the mention is never in the beginning of the comment due to using trim
  • rest as expected look for actual \b at the end of the string as the name always ends on an alphanumeric char

@mkordas
Copy link

mkordas commented Feb 8, 2016

@original-brownbear I'm on it again

Logger.info(this, "mention found in #%d", comment.issue().number());
req = Req.DONE;
final Matcher matcher = Pattern.compile(
String.format("(?:^|(?:.*?(?:\\s|,)))(%s)\\b.*?", prefix)
Copy link

Choose a reason for hiding this comment

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

@original-brownbear right now this pattern is even more complex - can you extract it to constant and add a Javadoc with explanation to 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.

@mkordas done, hope it's not too verbose.

* Matches the login when at the beginning of the comment string or when
* preceded by a space or comma.
* Login has to be bound by a word boundary to the right.
* Only captures the @ sign and login.
Copy link

Choose a reason for hiding this comment

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

@original-brownbear looks great for me, thanks a lot!

@mkordas
Copy link

mkordas commented Feb 8, 2016

@original-brownbear good job

@mkordas
Copy link

mkordas commented Feb 8, 2016

@rultor merge

@rultor
Copy link
Collaborator

rultor commented Feb 8, 2016

@rultor merge

@mkordas Thanks for your request. @yegor256 Please confirm this.

@yegor256
Copy link
Owner

yegor256 commented Feb 9, 2016

@rultor try to merge

@rultor
Copy link
Collaborator

rultor commented Feb 9, 2016

@rultor try to merge

@yegor256 OK, I'll try to merge now. You can check the progress of the merge here

@rultor
Copy link
Collaborator

rultor commented Feb 9, 2016

@rultor try to merge

@original-brownbear @yegor256 Oops, I failed. You can see the full log here (spent 16min)

[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ rultor ---
[INFO] Deleting /home/r/repo/target
[INFO] 
[INFO] --- exec-maven-plugin:1.4.0:exec (jekyll-build) @ rultor ---
Configuration file: /home/r/repo/src/jekyll/_config.yml
            Source: /home/r/repo/src/jekyll
       Destination: /home/r/repo/target/jekyll-site
 Incremental build: disabled. Enable with --incremental
      Generating... 
jekyll 3.1.1 | Error:  undefined method `filter_entries' for #<Jekyll::Site:0x00000002166a00>
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.944 s
[INFO] Finished at: 2016-02-09T01:08:21+00:00
[INFO] Final Memory: 16M/276M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.4.0:exec (jekyll-build) on project rultor: Command execution failed. Process exited with an error: 1 (Exit value: 1) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.4.0:exec (jekyll-build) on project rultor: Command execution failed.
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:108)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Command execution failed.
    at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:276)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
    ... 19 more
Caused by: org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
    at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:404)
    at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:166)
    at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:660)
    at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:265)
    ... 21 more
[ERROR] 
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
container b8cb74db864db6291f939c22a2aadf9cc70bb73cfab5b254f58462df1cd72bd4 is dead
Tue Feb  9 01:09:09 UTC 2016

@yegor256
Copy link
Owner

yegor256 commented Feb 9, 2016

@rultor merge again

@rultor
Copy link
Collaborator

rultor commented Feb 9, 2016

@rultor merge again

@yegor256 OK, I'll try to merge now. You can check the progress of the merge here

@rultor
Copy link
Collaborator

rultor commented Feb 9, 2016

@rultor merge again

@original-brownbear @yegor256 Oops, I failed. You can see the full log here (spent 12min)

[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ rultor ---
[INFO] Deleting /home/r/repo/target
[INFO] 
[INFO] --- exec-maven-plugin:1.4.0:exec (jekyll-build) @ rultor ---
Configuration file: /home/r/repo/src/jekyll/_config.yml
            Source: /home/r/repo/src/jekyll
       Destination: /home/r/repo/target/jekyll-site
 Incremental build: disabled. Enable with --incremental
      Generating... 
jekyll 3.1.1 | Error:  undefined method `filter_entries' for #<Jekyll::Site:0x00000002c9eb48>
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.540 s
[INFO] Finished at: 2016-02-09T04:23:37+00:00
[INFO] Final Memory: 16M/276M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.4.0:exec (jekyll-build) on project rultor: Command execution failed. Process exited with an error: 1 (Exit value: 1) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.4.0:exec (jekyll-build) on project rultor: Command execution failed.
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:108)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Command execution failed.
    at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:276)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
    ... 19 more
Caused by: org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
    at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:404)
    at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:166)
    at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:660)
    at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:265)
    ... 21 more
[ERROR] 
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
container 4c29263d5b780b9a9578e9233ffb492f02183e63de6baebf390199bb04157f1a is dead
Tue Feb  9 04:24:08 UTC 2016

@yegor256
Copy link
Owner

yegor256 commented Feb 9, 2016

@rultor merge

@rultor
Copy link
Collaborator

rultor commented Feb 9, 2016

@rultor merge

@yegor256 OK, I'll try to merge now. You can check the progress of the merge here

@rultor
Copy link
Collaborator

rultor commented Feb 9, 2016

@rultor merge

@original-brownbear @yegor256 Oops, I failed. You can see the full log here (spent 8min)

[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building rultor 2.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ rultor ---
[INFO] Deleting /home/r/repo/target
[INFO] 
[INFO] --- exec-maven-plugin:1.4.0:exec (jekyll-build) @ rultor ---
Configuration file: /home/r/repo/src/jekyll/_config.yml
\u001b[31m  Dependency Error: Yikes! It looks like you don't have jekyll-sass or one of its dependencies installed. In order to use Jekyll as currently configured, you'll need to install this gem. The full error message from Ruby is: 'cannot load such file -- jekyll-sass' If you run into trouble, you can find helpful resources at http://jekyllrb.com/help/! \u001b[0m
jekyll 3.1.1 | Error:  jekyll-sass
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.461 s
[INFO] Finished at: 2016-02-09T04:59:38+00:00
[INFO] Final Memory: 15M/276M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.4.0:exec (jekyll-build) on project rultor: Command execution failed. Process exited with an error: 1 (Exit value: 1) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.4.0:exec (jekyll-build) on project rultor: Command execution failed.
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:108)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Command execution failed.
    at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:276)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
    ... 19 more
Caused by: org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
    at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:404)
    at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:166)
    at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:660)
    at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:265)
    ... 21 more
[ERROR] 
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
container 11ba519f9a24a6811df18eff5d2180e705dfeb69a88b71da440b1efe2f7b41a7 is dead
Tue Feb  9 05:00:57 UTC 2016

@mkordas
Copy link

mkordas commented Feb 10, 2016

@yegor256 please see #1002, this should help with making merge work again

@mkordas
Copy link

mkordas commented Feb 12, 2016

@yegor256 please take care of this PR as well

@yegor256
Copy link
Owner

@rultor merge

@rultor
Copy link
Collaborator

rultor commented Feb 12, 2016

@rultor merge

@yegor256 OK, I'll try to merge now. You can check the progress of the merge here

@rultor
Copy link
Collaborator

rultor commented Feb 12, 2016

@rultor merge

@yegor256 Done! FYI, the full log is here (took me 20min)

@mkordas
Copy link

mkordas commented Feb 13, 2016

@original-brownbear can you close this PR?

@mkordas
Copy link

mkordas commented Feb 13, 2016

@rultor deploy

@rultor
Copy link
Collaborator

rultor commented Feb 13, 2016

@rultor deploy

@mkordas Thanks for your request. @yegor256 Please confirm this.

@original-brownbear
Copy link
Contributor Author

@mkordas jup all done here : )

@alex-palevsky
Copy link
Contributor

@mkordas since quality is good, I just added 10 mins to @original-brownbear (our architect) in transaction AP-37D02265W46925311

@mkordas
Copy link

mkordas commented Feb 22, 2016

@original-brownbear are you new a architect here? :)

@original-brownbear
Copy link
Contributor Author

@mkordas yes :)

@mkordas
Copy link

mkordas commented Feb 22, 2016

@original-brownbear congrats! I think the biggest challenge would be to improve stability of Rultor in production.

@original-brownbear
Copy link
Contributor Author

@mkordas thanks :), 100% agreed:
Fortunately the weak points are fairly obvious :)

  • dependencies are not clearly defined version wise
  • direct/unstable interaction with the Docker daemon via CLI instead of Docker HTTP API

I already have experience building integration tests with much more complicated docker setups and made tickets for the dependencies, this should be very doable :)

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

Successfully merging this pull request may close these issues.

None yet

5 participants