Thank you for the feedback, as always, Chad. Since you were able to confirm that this is an issue within the plugin, I opened an issue on GitHub <https://github.com/TWChennai/gocd-git-path-material-plugin/issues/246>.
Regards, Jason Smyth On Tuesday, May 6, 2025 at 12:17:34 p.m. UTC-4 Chad Wilson wrote: > Generally speaking, yes it is better to raise issues in the right place > since other people will find it there, and that plugin is not even under > the main two Gocd GitHub orgs (I happen to also be a maintainer on it, but > that's just due to history). > > The URLs are validated against some "simple" regex for some reason, which > doesn't allow spaces. I don't know where that logic came from. Possibly > copy+pasted from some sample plugin or some old code within the GoCD server > originally. > > > https://github.com/TWChennai/gocd-git-path-material-plugin/blob/0d6f256e2d07831c022d97d21b50c778331b4249/src/main/java/com/thoughtworks/go/scm/plugin/util/Validator.java#L12 > > https://github.com/TWChennai/gocd-git-path-material-plugin/blob/0d6f256e2d07831c022d97d21b50c778331b4249/src/test/java/com/thoughtworks/go/scm/plugin/util/ValidatorTest.java > > On Wed, 7 May 2025 at 00:01, Jason Smyth <[email protected]> wrote: > >> Hi all, >> >> We seem to be encountering an issue with the git-path plugin related to >> URLs with spaces in them. >> >> Sample error when passing url-encoded spaces: >> jvm 1 | 2025-05-06 15:37:40,506 INFO [151@MessageListener for >> MaterialUpdateListener] MaterialDatabaseUpdater:124 - [Material Update] >> Modification check failed for material: [url= >> https://dev.azure.com/MyOrg/ProjectName%20Has%20Spaces/_git/some_repo, >> username=myUser, password={{SECRET:[logins][myUser.PAT]}}, >> auto_update=true, branch=main, path=path/to/folder/] cause: >> java.lang.RuntimeException: The plugin sent a response that could not be >> understood by Go. Plugin returned with code '500' and the following >> response: '"Invalid URL format"' >> >> Sample error when passing raw spaces: >> 2025-05-06 11:25:36.547 | jvm 1 | 2025-05-06 15:25:36,542 INFO >> [159@MessageListener for MaterialUpdateListener] >> MaterialDatabaseUpdater:124 - [Material Update] Modification check failed >> for material: [ url=https://dev.azure.com/MyOrg/ProjectName Has >> Spaces/_git/some_repo, username=myUser, >> password={{SECRET:[logins][myUser.PAT]}}, auto_update=true, branch=main, >> path=path/to/folder/ ] cause: java.lang.RuntimeException: The plugin sent >> a response that could not be understood by Go. Plugin returned with code >> '500' and the following response: '"Invalid URL format"' >> >> These same repositories work fine with the main Git material, but we want >> to use the git-path plugin for its filtering abilities. >> >> Is there a way to get the plugin working with spaces (or other special >> characters) in the repository URL? >> >> Is this a bug that we should open a GitHub issue for? >> >> Any help or advice is appreciated. >> >> Regards, >> Jason Smyth >> >> -- >> You received this message because you are subscribed to the Google Groups >> "GoCD Users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion visit >> https://groups.google.com/d/msgid/go-cd/370d580d-2f2b-479d-a16e-9804842badf0n%40googlegroups.com >> >> <https://groups.google.com/d/msgid/go-cd/370d580d-2f2b-479d-a16e-9804842badf0n%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- You received this message because you are subscribed to the Google Groups "GoCD Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/go-cd/84294d1e-7f57-4e12-bebd-fbaa759a6a4en%40googlegroups.com.
