{"action":"created","issue":{"url":"https://api.github.com/repos/ManageIQ/manageiq-providers-kubernetes/issues/34","repository_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-kubernetes","labels_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-kubernetes/issues/34/labels{/name}","comments_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-kubernetes/issues/34/comments","events_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-kubernetes/issues/34/events","html_url":"https://github.com/ManageIQ/manageiq-providers-kubernetes/issues/34","id":233827291,"number":34,"title":"kubernetes capture_context_spec.rb runs openshift code","user":{"login":"cben","id":273688,"avatar_url":"https://avatars2.githubusercontent.com/u/273688?v=4","gravatar_id":"","url":"https://api.github.com/users/cben","html_url":"https://github.com/cben","followers_url":"https://api.github.com/users/cben/followers","following_url":"https://api.github.com/users/cben/following{/other_user}","gists_url":"https://api.github.com/users/cben/gists{/gist_id}","starred_url":"https://api.github.com/users/cben/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cben/subscriptions","organizations_url":"https://api.github.com/users/cben/orgs","repos_url":"https://api.github.com/users/cben/repos","events_url":"https://api.github.com/users/cben/events{/privacy}","received_events_url":"https://api.github.com/users/cben/received_events","type":"User","site_admin":false},"labels":[{"id":588251005,"url":"https://api.github.com/repos/ManageIQ/manageiq-providers-kubernetes/labels/technical%20debt","name":"technical debt","color":"eb6420","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-06-06T09:13:12Z","updated_at":"2017-10-18T12:20:11Z","closed_at":"2017-07-24T08:52:58Z","author_association":"CONTRIBUTOR","body":"In #30 we bumped into https://github.com/ManageIQ/manageiq-providers-kubernetes/blob/master/spec/models/manageiq/providers/kubernetes/container_manager/metrics_capture/capture_context_spec.rb#L14 in this repo creating an `:ems_openshift` factory and therefore running `Openshift::ContainerManager` code.\r\nBeside conceptually wrong dep, that's annoying because a change that needs simultaneous kubernetes and openshift PRs won't be able to pass Travis on *either* repo.\r\n\r\nIt's not a trivial change to just use `:ems_kubernetes`, causes VCR errors.  (Didn't look deeper.)\r\n\r\n@miq-bot add-label technical debt\r\n\r\n- It's a metrics test, which in *practice* is an openshift thing, so perhaps could move to openshift repo?\r\n- But in theory IIUC the code should support metrics in kubernetes (if you run a hawkular)?\r\n- More importantly, `metrics_capture` code lives in kubernetes repo, so it's test must live there (to reduce need for separate PRs).\r\n- It's IMHO important that we do test metrics functionality against openshift classes, one way or the other.  Might have to run similar test in both repos...\r\n\r\n@simon3z @yaacov what should we do?"},"comment":{"url":"https://api.github.com/repos/ManageIQ/manageiq-providers-kubernetes/issues/comments/337572198","html_url":"https://github.com/ManageIQ/manageiq-providers-kubernetes/issues/34#issuecomment-337572198","issue_url":"https://api.github.com/repos/ManageIQ/manageiq-providers-kubernetes/issues/34","id":337572198,"user":{"login":"cben","id":273688,"avatar_url":"https://avatars2.githubusercontent.com/u/273688?v=4","gravatar_id":"","url":"https://api.github.com/users/cben","html_url":"https://github.com/cben","followers_url":"https://api.github.com/users/cben/followers","following_url":"https://api.github.com/users/cben/following{/other_user}","gists_url":"https://api.github.com/users/cben/gists{/gist_id}","starred_url":"https://api.github.com/users/cben/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cben/subscriptions","organizations_url":"https://api.github.com/users/cben/orgs","repos_url":"https://api.github.com/users/cben/repos","events_url":"https://api.github.com/users/cben/events{/privacy}","received_events_url":"https://api.github.com/users/cben/received_events","type":"User","site_admin":false},"created_at":"2017-10-18T12:20:11Z","updated_at":"2017-10-18T12:20:11Z","author_association":"CONTRIBUTOR","body":"@yaacov there is another case of this in prometheus spec:\r\nhttps://github.com/manageiq/manageiq-providers-kubernetes/blob/master/spec/models/manageiq/providers/kubernetes/container_manager/metrics_capture/prometheus_capture_context_spec.rb#L10\r\n\r\nSimply changing to `:ems_kubernetes` factory fails with:\r\n```\r\n     VCR::Errors::UnusedHTTPInteractionError:\r\n       There are unused HTTP interactions left in the cassette:\r\n         - [get https://capture.context.com:8443/oapi/v1] => [200 \"{\\\"kind\\\":\\\"APIResourceList\\\",\\\"groupVersion\\\":\\\"v1\\\",\\\"resources\\\":[{\\\"name\\\":\\\"appliedclust\"]\r\n         - [get https://capture.context.com:8443/oapi/v1/routes] => [200 \"{\\\"kind\\\":\\\"RouteList\\\",\\\"apiVersion\\\":\\\"v1\\\",\\\"metadata\\\":{\\\"selfLink\\\":\\\"/oapi/v1/routes\\\",\\\"\"]\r\n         - [get https://capture.context.com:8443/oapi/v1/projects] => [200 \"{\\\"kind\\\":\\\"ProjectList\\\",\\\"apiVersion\\\":\\\"v1\\\",\\\"metadata\\\":{\\\"selfLink\\\":\\\"/oapi/v1/project\"]\r\n         - [get https://capture.context.com:8443/oapi/v1/buildconfigs] => [200 \"{\\\"kind\\\":\\\"BuildConfigList\\\",\\\"apiVersion\\\":\\\"v1\\\",\\\"metadata\\\":{\\\"selfLink\\\":\\\"/oapi/v1/bui\"]\r\n         - [get https://capture.context.com:8443/oapi/v1/builds] => [200 \"{\\\"kind\\\":\\\"BuildList\\\",\\\"apiVersion\\\":\\\"v1\\\",\\\"metadata\\\":{\\\"selfLink\\\":\\\"/oapi/v1/builds\\\",\\\"\"]\r\n         - [get https://capture.context.com:8443/oapi/v1/templates] => [200 \"{\\\"kind\\\":\\\"TemplateList\\\",\\\"apiVersion\\\":\\\"v1\\\",\\\"metadata\\\":{\\\"selfLink\\\":\\\"/oapi/v1/templa\"]\r\n         - [get https://capture.context.com:8443/oapi/v1/images] => [200 \"{\\\"kind\\\":\\\"ImageList\\\",\\\"apiVersion\\\":\\\"v1\\\",\\\"metadata\\\":{\\\"selfLink\\\":\\\"/oapi/v1/images\\\",\\\"\"]\r\n```\r\n\r\nI suppose like #72 we'll need to remove some requests from cassette (or re-record)...\r\nCan you look into it?"}}
{"actor":{"display_login":"cben"}}