{"action":"closed","issue":{"url":"https://api.github.com/repos/pivotal-cf-experimental/pivnet-resource/issues/29","repository_url":"https://api.github.com/repos/pivotal-cf-experimental/pivnet-resource","labels_url":"https://api.github.com/repos/pivotal-cf-experimental/pivnet-resource/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/pivotal-cf-experimental/pivnet-resource/issues/29/comments","events_url":"https://api.github.com/repos/pivotal-cf-experimental/pivnet-resource/issues/29/events","html_url":"https://github.com/pivotal-cf-experimental/pivnet-resource/issues/29","id":158794077,"number":29,"title":"Both eula_slug and eula: { slug: 'foo'} are needed","user":{"login":"ctaymor","id":4574361,"avatar_url":"https://avatars.githubusercontent.com/u/4574361?v=3","gravatar_id":"","url":"https://api.github.com/users/ctaymor","html_url":"https://github.com/ctaymor","followers_url":"https://api.github.com/users/ctaymor/followers","following_url":"https://api.github.com/users/ctaymor/following{/other_user}","gists_url":"https://api.github.com/users/ctaymor/gists{/gist_id}","starred_url":"https://api.github.com/users/ctaymor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctaymor/subscriptions","organizations_url":"https://api.github.com/users/ctaymor/orgs","repos_url":"https://api.github.com/users/ctaymor/repos","events_url":"https://api.github.com/users/ctaymor/events{/privacy}","received_events_url":"https://api.github.com/users/ctaymor/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/pivotal-cf-experimental/pivnet-resource/labels/in%20progress","name":"in progress","color":"3461AD"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-06-06T22:56:03Z","updated_at":"2016-06-14T18:13:04Z","closed_at":"2016-06-14T18:13:04Z","body":"With the following specification of the eula slug in the metadata file, doing a put of the concourse resource, I get a 422 response. The resource is [currently swallowing errors](https://github.com/pivotal-cf-experimental/pivnet-resource/issues/28), so I don't have any error output to provide in this case. However, from intercepting the build, I can see that the 422 was the response from the POST to /api/v2/products/ops-manager/release\r\n\r\n```\r\n---\r\nrelease:\r\n  eula_slug: \"some_valid_slug\"\r\n...\r\n```\r\n\r\nTrying with the exact same metadata via a curl request, I get an error of `{\"status\":422,\"message\":\"validation errors creating release for product 'ops-manager'\",\"errors\":[\"EULA can't be blank\"]}`.\r\n\r\nIf I provide the eula slug via the format specified in the [Pivnet API Docs](https://network.pivotal.io/docs/api#public/docs/api/v2/releases.md), the request succeeds with a curl request. However, when I use the same metadata \r\n```\r\n---\r\nrelease:\r\n  eula:\r\n    slug: \"some_valid_slug\"\r\n...\r\n```\r\nin the resource, I get the following error in concourse:\r\n```\r\n...\r\nSuccessfully pulled pivotalcf/pivnet-resource@sha256:....\r\n\r\nlogging to /tmp/pivnet-resource-out.log668910284\r\n2016/06/06 21:11:49 metadata_file is invalid: missing required value \"eula_slug\"\r\n```\r\n\r\nHowever, if I provide BOTH formats, as below, the put to the pivnet resource succeeds, and everything works!\r\n\r\n```\r\n---\r\nrelease:\r\n  eula_slug: \"some_valid_slug\"\r\n  eula:\r\n    slug: \"some_valid_slug\"\r\n```\r\n\r\nThis seems like a bug. Or if it is intended, it would great to specify in the docs that both are needed."}}
{"actor":{"display_login":"zachgersh"}}