You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/08/22 12:12:00 UTC

[jira] [Commented] (FLINK-7551) Add VERSION to the REST urls.

    [ https://issues.apache.org/jira/browse/FLINK-7551?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16588773#comment-16588773 ] 

ASF GitHub Bot commented on FLINK-7551:
---------------------------------------

zentol opened a new pull request #6602:  [FLINK-7551][rest] Add versioning to REST API
URL: https://github.com/apache/flink/pull/6602
 
 
   ## What is the purpose of the change
   
   This PR adds a versioning scheme to the REST API.
   
   Versions are represented as a simple prefix (e.g. `v1`) that is prefixed to the request, like `/v1/foo/bar`.
   
   Supported versions are encoded in the `MessageHeaders`, and used by the `RestServerEndpoint` to register handlers for specific versioned URLs.
   Additionally handlers are also registered for the _unversioned_ URLs effectively adding a default version to every request, which is the oldest supported one. What this means is that users working against unversioned URLs will for the time being always work against version 1, even when new versions are added.
   
   ## Brief change log
   
   * [hotfix] Update error handling for `*FileServerHandlers` to be in-line with other handlers
   
   * added `RestAPIVersion` enum
   * added `RestHandlerSpecification#getSupportedAPIVersions`
   * `RestClient#sendRequest` now accepts an optional `RestAPIVersion` argument; default is latest supported version
   
   `RestServerEndpoint`:
   * modified sorting logic so that newer versions are registered first, to ensure that the oldest version is the default (since they override previous registrations)
   * additionally register handlers for versioned URLs
   
   * updated the `RestAPIDocsGenerator` to create separate tables for each version
   * updated REST documentation to include information about versioning
   * reworked REST API docs layout to better separate versioned and legacy APIs
   
   ![untitled](https://user-images.githubusercontent.com/5725237/44462438-e0732780-a614-11e8-96c0-b49244bb68e8.png)
   
   ## Verifying this change
   
   This change added tests and can be verified as follows:
   
   * RestServerEndpointITCase#testVersioning
   * RestAPIVersionTest
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Add VERSION to the REST urls. 
> ------------------------------
>
>                 Key: FLINK-7551
>                 URL: https://issues.apache.org/jira/browse/FLINK-7551
>             Project: Flink
>          Issue Type: Improvement
>          Components: REST
>    Affects Versions: 1.4.0
>            Reporter: Kostas Kloudas
>            Assignee: Chesnay Schepler
>            Priority: Critical
>              Labels: pull-request-available
>             Fix For: 1.7.0
>
>
> This is to guarantee that we can update the REST API without breaking existing third-party clients.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)