[JIRA] (JENKINS-52964) Add a way to tell if an SCMFileSystem.Builder supports an SCMSource class, not just an instance

5 views
Skip to first unread message

andrew.bayer@gmail.com (JIRA)

unread,
Aug 9, 2018, 2:38:03 PM8/9/18
to jenkinsc...@googlegroups.com
Andrew Bayer created an issue
 
Jenkins / Improvement JENKINS-52964
Add a way to tell if an SCMFileSystem.Builder supports an SCMSource class, not just an instance
Issue Type: Improvement Improvement
Assignee: Andrew Bayer
Components: scm-api-plugin
Created: 2018-08-09 18:37
Priority: Minor Minor
Reporter: Andrew Bayer

This has been annoying for me - I've got a thing that only wants to allow you to choose an SCMSource if that SCMSource has an SCMFileSystem.Builder implementation that's valid for it. SCMFileSystem#supports(SCMSource) (which calls Builder#supports(SCMSource) for each Builder extension) would be fine...except that I want to know which SCMSource implementations are valid in a configuration UI, meaning I don't have instances, just descriptors. So it'd be awfully handy to have Builder#supports(Class<? extends SCMSource>) or Builder#supports(SCMSourceDescriptor).

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.10.1#710002-sha1:6efc396)

andrew.bayer@gmail.com (JIRA)

unread,
Aug 9, 2018, 2:55:02 PM8/9/18
to jenkinsc...@googlegroups.com
Andrew Bayer commented on Improvement JENKINS-52964
 
Re: Add a way to tell if an SCMFileSystem.Builder supports an SCMSource class, not just an instance

Maybe Builder#maySupport(SCMSourceDescriptor) would be the way to go - while most implementations in the wild (see the extensions list here just implement Builder#supports(SCMSource) with a simple return source instanceof SomeSCMSourceImpl, GitSCMTelescope actually cares about how the instance is configured. So in that case, there's no way to know definitively whether an SCMSourceDescriptor's SCMSource would be supported without an actual instance of the SCMSource. But I think we can live with that here - calling the new method maySupport implies that it's theoretically possible to use this SCMSourceDescriptor's SCMSource, but it doesn't make any promises that any particular config will be valid...

andrew.bayer@gmail.com (JIRA)

unread,
Oct 3, 2018, 11:42:03 AM10/3/18
to jenkinsc...@googlegroups.com
Change By: Andrew Bayer
Status: In Progress Review
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

andrew.bayer@gmail.com (JIRA)

unread,
Oct 3, 2018, 11:42:03 AM10/3/18
to jenkinsc...@googlegroups.com
Andrew Bayer started work on Improvement JENKINS-52964
 
Change By: Andrew Bayer
Status: Open In Progress

andrew.bayer@gmail.com (JIRA)

unread,
Oct 3, 2018, 11:42:03 AM10/3/18
to jenkinsc...@googlegroups.com

andrew.bayer@gmail.com (JIRA)

unread,
Oct 17, 2018, 5:23:01 AM10/17/18
to jenkinsc...@googlegroups.com

mark.earl.waite@gmail.com (JIRA)

unread,
Oct 20, 2019, 2:37:12 PM10/20/19
to jenkinsc...@googlegroups.com
Change By: Mark Waite
Status: Resolved Fixed but Unreleased
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

mark.earl.waite@gmail.com (JIRA)

unread,
Nov 2, 2019, 8:49:05 AM11/2/19
to jenkinsc...@googlegroups.com
 

Included in git plugin 4.0.0 released Nov 2, 2019

Change By: Mark Waite
Status: Fixed but Unreleased Closed
Reply all
Reply to author
Forward
0 new messages