lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Gerlowski (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (SOLR-11030) Add a test that fails if a collection API has no corresponding v2 API mapping in CollectionApiMapping class
Date Sat, 08 Jul 2017 17:26:00 GMT

     [ https://issues.apache.org/jira/browse/SOLR-11030?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jason Gerlowski updated SOLR-11030:
-----------------------------------
    Attachment: SOLR-11030.patch

Took a quick stab at this, to at least show what it could look like.

Of course, currently the test fails with the message: "java.lang.AssertionError: All CollectionActions
must have V2 mappings.  Currently unmapped: CREATESNAPSHOT, DELETENODE, DELETESNAPSHOT, MOVEREPLICA,
MIGRATESTATEFORMAT, REPLACENODE, LISTSNAPSHOTS"

This failure is at least partially expected: SOLR 11027, SOLR-11028, and SOLR-11029 involve
creating v2 equivalents of MOVEREPLICA, DELETENODE, and REPLACENODE respectively.  And I suspect
that MIGRATESTATEFORMAT should also have a JIRA to get a v2 mapping created.

That leaves the *SNAPSHOT internal commands, which aren't real APIs afaik.  I plan to add
them to the list of exempted CollectionActions in the test, but I know very little about the
Overseer, so I figured I'd mention it here first so someone can correct me if this is wrong.

As a side note, this test could be cleaner if the CollectionActions enum had an {{isApi}}
boolean field to differentiate the true APIs from internal commands.  Wanted to see if anyone
had any thoughts on doing that as a part of this patch.

> Add a test that fails if a collection API has no corresponding v2 API mapping in CollectionApiMapping
class
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-11030
>                 URL: https://issues.apache.org/jira/browse/SOLR-11030
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: SolrCloud, v2 API
>            Reporter: Shalin Shekhar Mangar
>             Fix For: master (8.0), 7.1
>
>         Attachments: SOLR-11030.patch
>
>
> A few recently added collection APIs had no equivalent v2 endpoints. We should add a
test that fails if a collection API has no corresponding v2 API mapping in CollectionApiMapping
class so that it is no longer possible to write a v1 API without a v2 counterpart.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message