flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zentol <...@git.apache.org>
Subject [GitHub] flink pull request #4788: [FLINK-7790] [REST] Unresolved query params not ad...
Date Tue, 10 Oct 2017 11:04:25 GMT
GitHub user zentol opened a pull request:

    https://github.com/apache/flink/pull/4788

    [FLINK-7790] [REST] Unresolved query params not added to request URL

    ## What is the purpose of the change
    
    This PR fixes a bug where unresolved optional parameters where still included in the request
URL by the RestClusterClient.
    
    For example, imagine a request to list the current jobs, with an optional query parameter
"state" to select only running/completed jobs. If this parameter was unresolved (aka no explicit
value was set for it by the client), this currently causes the request URL to look like this:
"/jobs?state=null", whereas it should be "/jobs",
    
    This is caused by a faulty check in `MessageParameters#resolveUrl` that constructs the
request URL from a set of parameters. It did not properly verify whether a query was resolved
before adding it to the URL.
    
    ## Brief change log
    
    * fix the bug
    * add a test
    
    ## Verifying this change
    
    This change added tests and can be verified as follows:
    
    * run `MessageParametersTest#testUnresolvedParameters`


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/zentol/flink 7790

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/4788.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #4788
    
----
commit d606aa8a4f5f60a03bda5a0f82cdbb4e5bea329f
Author: zentol <chesnay@apache.org>
Date:   2017-10-10T10:57:05Z

    [FLINK-7790] [REST] Unresolved query params not added to request URL

----


---

Mime
View raw message