-
Notifications
You must be signed in to change notification settings - Fork 122
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-58964 : Regression tests to ensure important impls are modern #78
Conversation
Complements jenkinsci/git-plugin#742 FTR. |
IIUC, the problem here was that in the fix for JENKINS-43802 (jenkinsci/git-plugin#736), Because of that change, if you run a version of It's not clear to me how the new tests would help catch this kind of problem in the future. I think we'd need the tests to check for real SCMs like Any thoughts? Did I misunderstand the problem? |
@dwnusbaum, you are right. I am not able to argue whether this is a I also agree this is easier to catch in integration tests, but not having anything that would catch something this serious in time is a problem for customers (JCasC breakage). Can we improve the contract of |
@olivergondza Yeah, it's not clear to me that either plugin is to blame here, just a combination of subtle issues.
Maybe we could implement a method on If |
That is what jenkinsci/git-plugin#742 does. I suggested complementing that with a test in this plugin just confirming that the usage of |
Regression test to detect problems like 3a6e48b.
While this does its job in making sure specific implementations does not get legacy accidentally, it provides no forward-looking guarantee that
SCMSource
's API andSCMSourceRetriever.DescriptorImpl#getSCMDescriptors()
stays in sync. IOW, when someone changes API ofSCMSource
and forgets to update#getSCMDescriptors()
, they are very likely to forget to update this test (that would detect that) as well. Which is how JENKINS-58964 originated.Slightly aggressive measure I can think of is to assert this exact API of
SCMSource
in the test so every change to that API would cause it to fail, and hence forcing the developer to verify whether the contract of#getSCMDescriptors()
needs to change as well (if not, they would just adjust the test). Thoughts?