Bug 1273370 - [platformmanagement_public_523]After remove v1beta3 REST API the resource still can be outputed to v1beta3 format
Summary: [platformmanagement_public_523]After remove v1beta3 REST API the resource sti...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: oc
Version: 3.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Dan Mace
QA Contact: Wei Sun
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-10-20 10:06 UTC by zhou ying
Modified: 2015-11-23 21:14 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-23 21:14:32 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description zhou ying 2015-10-20 10:06:45 UTC
Description of problem:
After remove v1beta3 REST API the resource still can be outputed to v1beta3 format 

Version-Release number of selected component (if applicable):
oc v1.0.6-748-gd9fde09
kubernetes v1.2.0-alpha.1-1107-g4c8e6f4
devenv-fedora-2496

How reproducible:
always

Steps to Reproduce:
1. Login and create project;
2. Use command to create app:
`oc process -f application-template-stibuild.json|oc create -f -`
3. Output the resource to v1beta3 version:
`oc get bc ruby-sample-build --output-version='v1beta3' -o json`

Actual results:
oc get bc ruby-sample-build --output-version='v1beta3' -o json
{
    "kind": "BuildConfig",
    "apiVersion": "v1beta3",
    "metadata": {
        "name": "ruby-sample-build",
        "namespace": "zhouy",
        "selfLink": "/oapi/v1/namespaces/zhouy/buildconfigs/ruby-sample-build",
        "uid": "f3ca139f-72dd-11e5-94bc-0ee6c2123ff7",
        "resourceVersion": "562",
        "creationTimestamp": "2015-10-15T01:42:10Z",
        "labels": {
            "name": "ruby-sample-build",
            "template": "application-template-stibuild"
        }
    },
    "spec": {
        "triggers": [
            {
                "type": "github",
                "github": {
                    "secret": "secret101"
                }
            },
            {
                "type": "generic",
                "generic": {
                    "secret": "secret101"
                }
            },
            {
                "type": "imageChange",
                "imageChange": {
                    "lastTriggeredImageID": "openshift/ruby-20-centos7@sha256:22b9a52f79a814145fa6b2e88f2e9dc6b013c88620cb46433a8bcf41c1f1e038"
                }
            },
            {
                "type": "ConfigChange"
            }
        ],
        "source": {
            "type": "Git",
            "git": {
                "uri": "https://github.com/openshift/ruby-hello-world.git"
            }
        },
        "strategy": {
            "type": "Source",
            "sourceStrategy": {
                "from": {
                    "kind": "ImageStreamTag",
                    "name": "ruby-20-centos7:latest"
                }
            }
        },
        "output": {
            "to": {
                "kind": "ImageStreamTag",
                "name": "origin-ruby-sample:latest"
            }
        },
        "resources": {}
    },
    "status": {
        "lastVersion": 1
    }
}

Expected results:
Should automatically converted to v1.

Additional info:

Comment 1 zhou ying 2015-10-20 10:07:37 UTC
 curl -k -H "Authorization:Bearer NE-yS2qeNW04Pyoafm_Fy4Jvckcwk_8H8grtfGus1ys" https://52.91.179.63:8443/oapi/v1beta3/users/~
{
  "kind": "Status",
  "apiVersion": "v1",
  "metadata": {},
  "status": "Failure",
  "message": "the server could not find the requested resource",
  "reason": "NotFound",
  "details": {},
  "code": 404
}
[root@zhouy v1beta3_v1_api]# curl -k -H "Authorization:Bearer NE-yS2qeNW04Pyoafm_Fy4Jvckcwk_8H8grtfGus1ys" https://52.91.179.63:8443/oapi/v1/users/~
{
  "kind": "User",
  "apiVersion": "v1",
  "metadata": {
    "name": "zhouy",
    "selfLink": "/oapi/v1/users/zhouy",
    "uid": "82ce4733-72d8-11e5-94bc-0ee6c2123ff7",
    "resourceVersion": "212",
    "creationTimestamp": "2015-10-15T01:03:13Z"
  },
  "identities": [
    "anypassword:zhouy"
  ],
  "groups": null
}

Comment 2 Dan Mace 2015-10-21 12:50:47 UTC
This is the expected behavior. The client has the ability to read and write v1beta3 when asked (via --output-version), but the server won't accept or send v1beta3.


Note You need to log in before you can comment on or make changes to this bug.