I used the global configuration archetype to confirm that the issue is in the dependencies used by the git plugin. The configuration round trip tests in the global configuration archetype pass when I run them without the git plugin dependencies and they fail when I run them with the git plugin dependencies.
The Apache commons-validator that the git plugin is using as a convenience provider to check remote URL's requires commons-beanutils 1.9.4. When I include commons-beanutils 1.9.4 as a dependency in the global configuration archetype pom file, the configuration round trip test fails with the TypeError: Cannot call method "hasClassName" message. When I include commons-beanutils 1.9.3 without the commons-validator, the same tests pass. Since the commons-validator is just a convenience, I'll remove the dependency from the git plugin and use other means to check git repository URL validity. I assume commons-beanutils 1.9.4 (released in August 2019) is not being used by anyone else in Jenkins core or plugins. Removing commons-validator will be an improvement for the git plugin, since it will remove a transitive dependency on several other components. On Thursday, November 26, 2020 at 7:17:57 AM UTC-7 Mark Waite wrote: > On Thu, Nov 26, 2020 at 3:17 AM 'Björn Pedersen' via Jenkins Developers < > [email protected]> wrote: > >> It looks like the first iteration did not yield any optional block (in >> master this code is at L1513ff.) and the code never checks that (so s==vg >> is undefined) >> >> > Thanks for that pointer. The code that is reporting that error seems to > be unchanged (though in a different location in the file) from 2.204.1 > through weekly 2.268. > > My trivial test runs successfully with a plugin that I generated from the > global configuration archetype and runs successfully in the git plugin on > the master branch yet it fails on the pull request. I'll continue > exploring to try to understand the difference between the working and > non-working cases. > > Mark Waite > > >> [email protected] schrieb am Donnerstag, 26. November 2020 um 09:50:42 >> UTC+1: >> >>> On Thu, Nov 26, 2020 at 6:58 AM 'Gavin Mogan' via Jenkins Developers < >>> [email protected]> wrote: >>> >>>> I don't know which hasClassName is undefined as your linking to a local >>>> file, and >>>> https://github.com/jenkinsci/jenkins/blob/master/war/src/main/webapp/scripts/hudson-behavior.js#L1382 >>>> >>>> doesn't have that function being called. >>>> >>> >>> >>> https://github.com/jenkinsci/jenkins/blob/stable-2.222/war/src/main/webapp/scripts/hudson-behavior.js#L1382 >>> >>> does. >>> >>> -- >> You received this message because you are subscribed to the Google Groups >> "Jenkins Developers" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> > To view this discussion on the web visit >> https://groups.google.com/d/msgid/jenkinsci-dev/d9f97335-83e6-4eba-ae9c-4139b9e09394n%40googlegroups.com >> >> <https://groups.google.com/d/msgid/jenkinsci-dev/d9f97335-83e6-4eba-ae9c-4139b9e09394n%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/7b767af5-bacb-4a30-9dba-27a4e9b3af73n%40googlegroups.com.
