{"action":"created","issue":{"url":"https://api.github.com/repos/sapcc/elektra/issues/34","repository_url":"https://api.github.com/repos/sapcc/elektra","labels_url":"https://api.github.com/repos/sapcc/elektra/issues/34/labels{/name}","comments_url":"https://api.github.com/repos/sapcc/elektra/issues/34/comments","events_url":"https://api.github.com/repos/sapcc/elektra/issues/34/events","html_url":"https://github.com/sapcc/elektra/issues/34","id":201265984,"number":34,"title":"project request workflow is broken when cost control service is used","user":{"login":"majewsky","id":24696,"avatar_url":"https://avatars3.githubusercontent.com/u/24696?v=3","gravatar_id":"","url":"https://api.github.com/users/majewsky","html_url":"https://github.com/majewsky","followers_url":"https://api.github.com/users/majewsky/followers","following_url":"https://api.github.com/users/majewsky/following{/other_user}","gists_url":"https://api.github.com/users/majewsky/gists{/gist_id}","starred_url":"https://api.github.com/users/majewsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/majewsky/subscriptions","organizations_url":"https://api.github.com/users/majewsky/orgs","repos_url":"https://api.github.com/users/majewsky/repos","events_url":"https://api.github.com/users/majewsky/events{/privacy}","received_events_url":"https://api.github.com/users/majewsky/received_events","type":"User","site_admin":false},"labels":[{"id":300314915,"url":"https://api.github.com/repos/sapcc/elektra/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"closed","locked":false,"assignee":{"login":"majewsky","id":24696,"avatar_url":"https://avatars3.githubusercontent.com/u/24696?v=3","gravatar_id":"","url":"https://api.github.com/users/majewsky","html_url":"https://github.com/majewsky","followers_url":"https://api.github.com/users/majewsky/followers","following_url":"https://api.github.com/users/majewsky/following{/other_user}","gists_url":"https://api.github.com/users/majewsky/gists{/gist_id}","starred_url":"https://api.github.com/users/majewsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/majewsky/subscriptions","organizations_url":"https://api.github.com/users/majewsky/orgs","repos_url":"https://api.github.com/users/majewsky/repos","events_url":"https://api.github.com/users/majewsky/events{/privacy}","received_events_url":"https://api.github.com/users/majewsky/received_events","type":"User","site_admin":false},"assignees":[{"login":"majewsky","id":24696,"avatar_url":"https://avatars3.githubusercontent.com/u/24696?v=3","gravatar_id":"","url":"https://api.github.com/users/majewsky","html_url":"https://github.com/majewsky","followers_url":"https://api.github.com/users/majewsky/followers","following_url":"https://api.github.com/users/majewsky/following{/other_user}","gists_url":"https://api.github.com/users/majewsky/gists{/gist_id}","starred_url":"https://api.github.com/users/majewsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/majewsky/subscriptions","organizations_url":"https://api.github.com/users/majewsky/orgs","repos_url":"https://api.github.com/users/majewsky/repos","events_url":"https://api.github.com/users/majewsky/events{/privacy}","received_events_url":"https://api.github.com/users/majewsky/received_events","type":"User","site_admin":false},{"login":"auhlig","id":14873188,"avatar_url":"https://avatars0.githubusercontent.com/u/14873188?v=3","gravatar_id":"","url":"https://api.github.com/users/auhlig","html_url":"https://github.com/auhlig","followers_url":"https://api.github.com/users/auhlig/followers","following_url":"https://api.github.com/users/auhlig/following{/other_user}","gists_url":"https://api.github.com/users/auhlig/gists{/gist_id}","starred_url":"https://api.github.com/users/auhlig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/auhlig/subscriptions","organizations_url":"https://api.github.com/users/auhlig/orgs","repos_url":"https://api.github.com/users/auhlig/repos","events_url":"https://api.github.com/users/auhlig/events{/privacy}","received_events_url":"https://api.github.com/users/auhlig/received_events","type":"User","site_admin":false}],"milestone":null,"comments":5,"created_at":"2017-01-17T12:29:55Z","updated_at":"2017-03-22T09:00:42Z","closed_at":"2017-03-22T09:00:42Z","body":"Consider a situation where the `sapcc-billing` backend service is available. A user logs on and wants to request a new project. This action happens in the domain scope, where Keystone does not deliver a service catalog. Therefore, [`services.cost_control.available?`](https://github.com/sapcc/elektra/blob/ce4d596e6f1f029d06e55b87d97cad1a397c3cb2/plugins/cost_control/app/services/service_layer/cost_control_service.rb#L15) is false and the project request form (and thus, the project request) will [not contain the form fields](https://github.com/sapcc/elektra/blob/ce4d596e6f1f029d06e55b87d97cad1a397c3cb2/plugins/identity/app/views/identity/projects/shared/_form.html.haml#L23) for specifying a cost object.\r\n\r\nThis leads to funny crashes when the domain admin tries to approve the request, because the dialog gets confused over cost control being enabled on the one side, but the request not containing any cost object data on the other side.\r\n\r\nThere are two questions in here:\r\n\r\n1. How can we rewrite `services.cost_control.available?` such that it gives the correct result when the project request wizard is rendered?\r\n2. When the request is approved, the dashboard seems to understand that cost control is enabled (as evidenced by it trying, and failing, to access the cost object metadata in the request). But that workflow also happens in domain scope, where `services.cost_control.available?` should give the same, wrong result. How does that work? (Maybe it just doesn't check the service availability at all?)\r\n\r\nSince this breaks the project request workflow for customers, it would be nice if someone could look into this soon."},"comment":{"url":"https://api.github.com/repos/sapcc/elektra/issues/comments/288336888","html_url":"https://github.com/sapcc/elektra/issues/34#issuecomment-288336888","issue_url":"https://api.github.com/repos/sapcc/elektra/issues/34","id":288336888,"user":{"login":"auhlig","id":14873188,"avatar_url":"https://avatars0.githubusercontent.com/u/14873188?v=3","gravatar_id":"","url":"https://api.github.com/users/auhlig","html_url":"https://github.com/auhlig","followers_url":"https://api.github.com/users/auhlig/followers","following_url":"https://api.github.com/users/auhlig/following{/other_user}","gists_url":"https://api.github.com/users/auhlig/gists{/gist_id}","starred_url":"https://api.github.com/users/auhlig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/auhlig/subscriptions","organizations_url":"https://api.github.com/users/auhlig/orgs","repos_url":"https://api.github.com/users/auhlig/repos","events_url":"https://api.github.com/users/auhlig/events{/privacy}","received_events_url":"https://api.github.com/users/auhlig/received_events","type":"User","site_admin":false},"created_at":"2017-03-22T09:00:42Z","updated_at":"2017-03-22T09:00:42Z","body":"Thanks for confirming.\r\nClosing. Please reopen if necessary. "}}
{"actor":{"display_login":"auhlig"}}