Today, the "supported_api_versions" attribute is an array of floats, and the "version" attribute is a string. This is bad for comparison purposes and for other operations. Starting in the next major API version, we should communicate with our developers that "version" will be changed to a float instead of a string, and that they should react accordingly. We should investigate the impact this may have on older, non version locked clients (older versions of RHC before 1.3) and any other major non version locked integrator.
This change will make sure the next version will respond with version in float. It also protects any clients using versions =<1.4 by returning a string. https://github.com/lnader/origin-server/commit/7df848b3e12548396337d49e8a30d858d937ee57 Older RHC clients should be protected by this code in broker that we put in place in 1.4. origin-server/controller/lib/openshift/controller/api_behavior.rb:31 version = 1.3 if request.headers['User-Agent'].present? and request.headers['User-Agent'].start_with? "rhc" This change will take affect when we move to version 1.5. I will make a separate commit for changing current version from 1.4 => 1.5 after we have decided how to communicate the change to our developers.
https://github.com/openshift/origin-server/pull/2499
Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/37861ded19686ea1308b6a84e66097231ff75a5a Bug 961475
Created a US in trello for remaining tasks https://trello.com/c/HYiLhcT3
Verified on devenv_3261 All API versions (1.0,1.1,1.2,1.3,1.4) now returned as string temporarily. curl -k -X GET -H 'Accept: application/json, version=1.1' --user qgong:111111 https://ec2-23-21-31-195.compute-1.amazonaws.com/broker/rest/api |json_reformat ....... "status": "ok", "supported_api_versions": [ 1.0, 1.1, 1.2, 1.3, 1.4 ], "type": "links", "version": "1.0" "status": "ok", "supported_api_versions": [ 1.0, 1.1, 1.2, 1.3, 1.4 ], "type": "links", "version": "1.1" "status": "ok", "supported_api_versions": [ 1.0, 1.1, 1.2, 1.3, 1.4 ], "type": "links", "version": "1.2" "status": "ok", "supported_api_versions": [ 1.0, 1.1, 1.2, 1.3, 1.4 ], "type": "links", "version": "1.3" "status": "ok", "supported_api_versions": [ 1.0, 1.1, 1.2, 1.3, 1.4 ], "type": "links", "version": "1.4"