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

Git Provenance generates a warning when a GitHub organization happens to start with a number #4726

Closed
tylervangorder-8451 opened this issue Nov 27, 2024 · 1 comment · Fixed by #4727
Assignees
Labels
bug Something isn't working

Comments

@tylervangorder-8451
Copy link

What version of OpenRewrite are you using?

I am using

  • OpenRewrite v8.38.0
  • Maven plugin v5.43.4

How are you running OpenRewrite?

We are running OpenRewrite via the maven plugin.

This happens across any of our repositories that have been checked out via SSH:

Our organization name is 8451LLC which it appears is tripping up Git Provenance parsing:

java.lang.IllegalArgumentException: Unable to normalize URL: Specifying a port without a scheme is not supported for URL [email protected]:8451LLC/any-repo-in-our-org.git
	at org.openrewrite.GitRemote$Parser.normalize(GitRemote.java:305)
	at org.openrewrite.GitRemote$Parser.parse(GitRemote.java:223)
	at org.openrewrite.marker.GitProvenance.fromGitConfig(GitProvenance.java:259)
	at org.openrewrite.marker.GitProvenance.fromGitConfig(GitProvenance.java:241)
	at org.openrewrite.marker.GitProvenance.fromProjectDirectory(GitProvenance.java:224)
	at org.openrewrite.marker.GitProvenance.fromProjectDirectory(GitProvenance.java:177)
	at org.openrewrite.maven.MavenMojoProjectParser.lambda$gitProvenance$18(MavenMojoProjectParser.java:795)
	at java.base/java.util.HashMap.computeIfAbsent(HashMap.java:1134)
	at org.openrewrite.maven.MavenMojoProjectParser.gitProvenance(MavenMojoProjectParser.java:795)
	at org.openrewrite.maven.MavenMojoProjectParser.generateProvenance(MavenMojoProjectParser.java:259)
	at java.base/java.util.stream.Collectors.lambda$uniqKeysMapAccumulator$1(Collectors.java:178)
	at java.base/java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169)
	at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1655)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
	at org.openrewrite.maven.MavenMojoProjectParser.listSourceFiles(MavenMojoProjectParser.java:147)
	at org.openrewrite.maven.AbstractRewriteBaseRunMojo.loadSourceSet(AbstractRewriteBaseRunMojo.java:236)
	at org.openrewrite.maven.AbstractRewriteBaseRunMojo.listResults(AbstractRewriteBaseRunMojo.java:152)
	at org.openrewrite.maven.AbstractRewriteRunMojo.execute(AbstractRewriteRunMojo.java:64)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:126)
	at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2(MojoExecutor.java:328)
	at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute(MojoExecutor.java:316)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:174)
	at org.apache.maven.lifecycle.internal.MojoExecutor.access$000(MojoExecutor.java:75)
	at org.apache.maven.lifecycle.internal.MojoExecutor$1.run(MojoExecutor.java:162)
	at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute(DefaultMojosExecutionStrategy.java:39)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:159)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:105)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:73)
	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:53)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:118)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:261)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:173)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:101)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:906)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:283)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:206)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:255)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:201)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:361)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:314)
@timtebeek
Copy link
Contributor

hi @tylervangorder-8451 ; Good seeing you here! Please have a look at

And with that I wish you all the best for the holidays there. :)

@github-project-automation github-project-automation bot moved this from Backlog to Done in OpenRewrite Nov 27, 2024
@timtebeek timtebeek self-assigned this Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants