{"action":"opened","issue":{"url":"https://api.github.com/repos/HumanCellAtlas/ingest-central/issues/215","repository_url":"https://api.github.com/repos/HumanCellAtlas/ingest-central","labels_url":"https://api.github.com/repos/HumanCellAtlas/ingest-central/issues/215/labels{/name}","comments_url":"https://api.github.com/repos/HumanCellAtlas/ingest-central/issues/215/comments","events_url":"https://api.github.com/repos/HumanCellAtlas/ingest-central/issues/215/events","html_url":"https://github.com/HumanCellAtlas/ingest-central/issues/215","id":366614495,"node_id":"MDU6SXNzdWUzNjY2MTQ0OTU=","number":215,"title":"File with content-type `application/json` is served as `binary/octet-stream`","user":{"login":"hannes-ucsc","id":5143256,"node_id":"MDQ6VXNlcjUxNDMyNTY=","avatar_url":"https://avatars2.githubusercontent.com/u/5143256?v=4","gravatar_id":"","url":"https://api.github.com/users/hannes-ucsc","html_url":"https://github.com/hannes-ucsc","followers_url":"https://api.github.com/users/hannes-ucsc/followers","following_url":"https://api.github.com/users/hannes-ucsc/following{/other_user}","gists_url":"https://api.github.com/users/hannes-ucsc/gists{/gist_id}","starred_url":"https://api.github.com/users/hannes-ucsc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hannes-ucsc/subscriptions","organizations_url":"https://api.github.com/users/hannes-ucsc/orgs","repos_url":"https://api.github.com/users/hannes-ucsc/repos","events_url":"https://api.github.com/users/hannes-ucsc/events{/privacy}","received_events_url":"https://api.github.com/users/hannes-ucsc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-04T04:07:34Z","updated_at":"2018-10-04T04:07:34Z","closed_at":null,"author_association":"NONE","body":"In today's test ingestion of the \"Single cell transcriptome analysis of human pancreas\" project in `staging`, one bundle failed to be indexed by Azul because DSS is not serving one of the metadata files as `application/json` but as `binary/octet-stream` instead. Since only one file in one bundle is affected, I'm leaning towards blaming ingest. The bad file:\r\n\r\n```\r\n$ http --follow \"https://dss.staging.data.humancellatlas.org/v1/files/71d074ed-5250-486a-82da-ad4acee2abe6?replica=aws&version=2018-10-03T215813.700000Z\"\r\nHTTP/1.1 200 OK\r\nAccept-Ranges: bytes\r\nContent-Length: 390\r\nContent-Type: binary/octet-stream\r\nDate: Thu, 04 Oct 2018 03:25:53 GMT\r\nETag: \"3cfb6347843e18e3f1ea648be15e5f2e\"\r\nLast-Modified: Wed, 03 Oct 2018 22:49:44 GMT\r\nServer: AmazonS3\r\nx-amz-expiration: expiry-date=\"Thu, 11 Oct 2018 00:00:00 GMT\", rule-id=\"dss_checkout_expiration\"\r\nx-amz-id-2: dknnQAHnisJiq/CrKnOCY8d3a4Oh3xh7jX6ac6UG7/qIkEBFeHSwWlHLognStoxkDbltomh/pCw=\r\nx-amz-request-id: 9F260D01CEF893FE\r\n\r\n{\r\n    \"process_core\": {\r\n        \"process_id\": \"process_id_983\"\r\n    },\r\n    \"schema_type\": \"process\",\r\n    \"describedBy\": \"http://schema.staging.data.humancellatlas.org/type/process/6.0.2/process\",\r\n    \"provenance\": {\r\n        \"document_id\": \"71d074ed-5250-486a-82da-ad4acee2abe6\",\r\n        \"submission_date\": \"2018-10-03T21:42:49.532Z\",\r\n        \"update_date\": \"2018-10-03T21:58:13.700Z\"\r\n    }\r\n}\r\n```\r\n\r\nThe other metadata files in the same bundle are fine:\r\n\r\n```\r\n$ http --follow \"https://dss.staging.data.humancellatlas.org/v1/files/05672c5c-2c00-4292-9f41-f0d7ed7a6cc5?replica=aws&version=2018-10-03T220300.297000Z\"\r\nHTTP/1.1 200 OK\r\nAccept-Ranges: bytes\r\nContent-Length: 386\r\nContent-Type: application/json; dcp-type=\"metadata/process\"\r\nDate: Thu, 04 Oct 2018 03:25:19 GMT\r\nETag: \"8e7db4352697916fd27867acbfa07b8d\"\r\nLast-Modified: Wed, 03 Oct 2018 22:50:00 GMT\r\nServer: AmazonS3\r\nx-amz-expiration: expiry-date=\"Thu, 11 Oct 2018 00:00:00 GMT\", rule-id=\"dss_checkout_expiration\"\r\nx-amz-id-2: mUqu12HL+jX8txs1eq0iGXEkpyBQdXrOtzJnkdObOZkM2UJPy2QtjQxhm4gq7Er+7h44mvlj+hs=\r\nx-amz-request-id: 1FD315ADBF47DC63\r\nx-amz-tagging-count: 4\r\n\r\n{\r\n    \"describedBy\": \"http://schema.staging.data.humancellatlas.org/type/process/6.0.2/process\",\r\n    \"process_core\": {\r\n        \"process_id\": \"SRR3563184\"\r\n    },\r\n    \"provenance\": {\r\n        \"document_id\": \"05672c5c-2c00-4292-9f41-f0d7ed7a6cc5\",\r\n        \"submission_date\": \"2018-10-03T21:44:48.997Z\",\r\n        \"update_date\": \"2018-10-03T22:03:00.297Z\"\r\n    },\r\n    \"schema_type\": \"process\"\r\n}\r\n```\r\n\r\nBecause the bad file is served with the wrong content type, the requests library used by the `dcp-cli` is unable to detect that it actually is JSON, which in turn breaks the `metadata-api`."}}
{"actor":{"display_login":"hannes-ucsc"}}