{"action":"created","issue":{"url":"https://api.github.com/repos/Islandora-CLAW/CLAW/issues/1076","repository_url":"https://api.github.com/repos/Islandora-CLAW/CLAW","labels_url":"https://api.github.com/repos/Islandora-CLAW/CLAW/issues/1076/labels{/name}","comments_url":"https://api.github.com/repos/Islandora-CLAW/CLAW/issues/1076/comments","events_url":"https://api.github.com/repos/Islandora-CLAW/CLAW/issues/1076/events","html_url":"https://github.com/Islandora-CLAW/CLAW/issues/1076","id":429432664,"node_id":"MDU6SXNzdWU0Mjk0MzI2NjQ=","number":1076,"title":"Drupal / Gemini File UUID Mismatch","user":{"login":"seth-shaw-unlv","id":29869988,"node_id":"MDQ6VXNlcjI5ODY5OTg4","avatar_url":"https://avatars0.githubusercontent.com/u/29869988?v=4","gravatar_id":"","url":"https://api.github.com/users/seth-shaw-unlv","html_url":"https://github.com/seth-shaw-unlv","followers_url":"https://api.github.com/users/seth-shaw-unlv/followers","following_url":"https://api.github.com/users/seth-shaw-unlv/following{/other_user}","gists_url":"https://api.github.com/users/seth-shaw-unlv/gists{/gist_id}","starred_url":"https://api.github.com/users/seth-shaw-unlv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seth-shaw-unlv/subscriptions","organizations_url":"https://api.github.com/users/seth-shaw-unlv/orgs","repos_url":"https://api.github.com/users/seth-shaw-unlv/repos","events_url":"https://api.github.com/users/seth-shaw-unlv/events{/privacy}","received_events_url":"https://api.github.com/users/seth-shaw-unlv/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":14,"created_at":"2019-04-04T18:56:24Z","updated_at":"2019-04-05T20:29:38Z","closed_at":null,"author_association":"NONE","body":"While testing riprap I discovered several of my Media aren't getting picked up by check_fixity because the uuid being reported by the JSON API (sourced from the Drupal file_managed.uuid field) doesn't match the uuid stored in Gemini for that file. However, it is inconsistent. Some do match while many don't.  \r\n\r\nFor example, (after adding some print statements to riprap's PluginFetchResourceListFromDrupal.php) one of my successful items reports:\r\n```\r\nNode id: 233784\r\n\tmedia_url: http://dams.library.unlv.edu/node/233784/media\r\n\tfield_media_file uuid: 9471ac1a-116e-4220-a93b-d03d5aa292a0\r\n\tfedora_url: http://localhost:8080/fcrepo/rest/masters/ent/ent001450-056.tif\r\n```\r\nIndeed, the Gemini db does have the correct uuid for this item:\r\n```\r\n+----------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+--------------------------------------+------------------------------------------------------------------------------+------------------------------------------------------------------------------------+---------------------+---------------------+\r\n| fedora_hash                                                                                                                      | drupal_hash                                                                                                                      | uuid                                 | drupal_uri                                                                   | fedora_uri                                                                         | dateCreated         | dateUpdated         |\r\n+----------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+--------------------------------------+------------------------------------------------------------------------------+------------------------------------------------------------------------------------+---------------------+---------------------+\r\n| 2228c3bf188614f4449821f63328d4c6a7a2dbf698e18270e6388151f739e1cd61546c949950d7ce7b188c1558422700475c3f69752694f92beeeddf5963ae54 | aa30949313684de1b375cc4c687a344cf4d8c38b519e2d5a4c750ae897d2edd03828639a6d10d52248c90d4fada5bf70fb7617430a4a4ea2ee289c40c7d18775 | 9471ac1a-116e-4220-a93b-d03d5aa292a0 | http://dams.library.unlv.edu/_flysystem/fedora/masters/ent/ent001450-056.tif | http://localhost:8080/fcrepo/rest/masters/ent/ent001450-056.tif                    | 2019-03-01 14:07:19 | 2019-03-01 14:07:19 |\r\n+----------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+--------------------------------------+------------------------------------------------------------------------------+------------------------------------------------------------------------------------+---------------------+---------------------+\r\n```\r\nCompared to Drupal for the corresponding file:\r\n```\r\n+-------+--------------------------------------+----------+------+-------------------+----------------------------------------+------------+----------+--------+------------+------------+\r\n| fid   | uuid                                 | langcode | uid  | filename          | uri                                    | filemime   | filesize | status | created    | changed    |\r\n+-------+--------------------------------------+----------+------+-------------------+----------------------------------------+------------+----------+--------+------------+------------+\r\n| 92374 | 9471ac1a-116e-4220-a93b-d03d5aa292a0 | en       | NULL | ent001450-056.tif | fedora://masters/ent/ent001450-056.tif | image/tiff | 95503106 |      1 | 1551457224 | 1551981341 |\r\n+-------+--------------------------------------+----------+------+-------------------+----------------------------------------+------------+----------+--------+------------+------------+\r\n```\r\n\r\nHowever, one of my unsuccessful ones displays:\r\n```\r\nNode id: 205112\r\n\tmedia_url: http://dams.library.unlv.edu/node/205112/media\r\n\tfield_media_file uuid: de77f71f-6321-4cb7-900a-080ffb219cbf\r\n\tfedora_url: \r\n```\r\n'fedora_url' is blank because `$fedora_url = $this->getFedoraUrl($media['field_media_file'][0]['target_uuid']);`, which queries Gemini using the uuid, returned false.  Indeed, the Gemini database has a different UUID for this item: ('de77f71f-6321-4cb7-900a-080ffb219cbf' in Drupal, '498944af-2773-4d4b-9526-9f7a08d326da' in Gemini)\r\n```\r\n+----------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+--------------------------------------+------------------------------------------------------------------------------+------------------------------------------------------------------------------------+---------------------+---------------------+\r\n| fedora_hash                                                                                                                      | drupal_hash                                                                                                                      | uuid                                 | drupal_uri                                                                   | fedora_uri                                                                         | dateCreated         | dateUpdated         |\r\n+----------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+--------------------------------------+------------------------------------------------------------------------------+------------------------------------------------------------------------------------+---------------------+---------------------+\r\n| 6c2ed41faef22f2ee0cfeda0ce9a5303c5771f3b9900ad3d2713b08b42d6d8a0167b4da1b89fb22f5abe4c668e22575ac7f4d8cbfb7af9eba52569320ff1fb38 | 347fb4ee386c59798276ca8e4576dbf0ace0d48c9a9d43a25705cada1d9761f77f70a36a10aa2009d061373ef599404660bf3f9de4cfe424a1b6df99c5a93c9f | 498944af-2773-4d4b-9526-9f7a08d326da | http://dams.library.unlv.edu/_flysystem/fedora/masters/ent/ent000725-013.tif | http://localhost:8080/fcrepo/rest/masters/ent/ent000725-013.tif                    | 2019-02-19 20:20:10 | 2019-02-19 20:20:10 |\r\n+----------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+--------------------------------------+------------------------------------------------------------------------------+------------------------------------------------------------------------------------+---------------------+---------------------+\r\n```\r\nCompared to Drupal:\r\n```\r\n+-------+--------------------------------------+----------+------+-------------------+----------------------------------------+------------+-----------+--------+------------+------------+\r\n| fid   | uuid                                 | langcode | uid  | filename          | uri                                    | filemime   | filesize  | status | created    | changed    |\r\n+-------+--------------------------------------+----------+------+-------------------+----------------------------------------+------------+-----------+--------+------------+------------+\r\n| 57984 | de77f71f-6321-4cb7-900a-080ffb219cbf | en       | NULL | ent000725-013.tif | fedora://masters/ent/ent000725-013.tif | image/tiff | 145856244 |      1 | 1550790127 | 1551798977 |\r\n+-------+--------------------------------------+----------+------+-------------------+----------------------------------------+------------+-----------+--------+------------+------------+\r\n```\r\n\r\nIt is not clear to me why some uuids would be correctly recorded in Gemini, while others aren't. Any theories about the cause or strategies for fixing the discrepancies are welcomed."},"comment":{"url":"https://api.github.com/repos/Islandora-CLAW/CLAW/issues/comments/480412176","html_url":"https://github.com/Islandora-CLAW/CLAW/issues/1076#issuecomment-480412176","issue_url":"https://api.github.com/repos/Islandora-CLAW/CLAW/issues/1076","id":480412176,"node_id":"MDEyOklzc3VlQ29tbWVudDQ4MDQxMjE3Ng==","user":{"login":"seth-shaw-unlv","id":29869988,"node_id":"MDQ6VXNlcjI5ODY5OTg4","avatar_url":"https://avatars0.githubusercontent.com/u/29869988?v=4","gravatar_id":"","url":"https://api.github.com/users/seth-shaw-unlv","html_url":"https://github.com/seth-shaw-unlv","followers_url":"https://api.github.com/users/seth-shaw-unlv/followers","following_url":"https://api.github.com/users/seth-shaw-unlv/following{/other_user}","gists_url":"https://api.github.com/users/seth-shaw-unlv/gists{/gist_id}","starred_url":"https://api.github.com/users/seth-shaw-unlv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seth-shaw-unlv/subscriptions","organizations_url":"https://api.github.com/users/seth-shaw-unlv/orgs","repos_url":"https://api.github.com/users/seth-shaw-unlv/repos","events_url":"https://api.github.com/users/seth-shaw-unlv/events{/privacy}","received_events_url":"https://api.github.com/users/seth-shaw-unlv/received_events","type":"User","site_admin":false},"created_at":"2019-04-05T20:29:38Z","updated_at":"2019-04-05T20:29:38Z","author_association":"NONE","body":"@dannylamb, I just checked my gemini log. (I feel silly for not looking at it earlier.)\r\n\r\nFor ent000725-013 (the failed one) the Gemini UUID (498944af-2773-4d4b-9526-9f7a08d326da) shows up as a successful PUT on 2019-02-19:\r\n```\r\n[2019-02-19 20:20:10] app.INFO: Matched route \"{route}\". {\"route\":\"PUT_uuid\",\"route_parameters\":{\"_controller\":\"gemini.controller:put\",\"uuid\":\"498944af-2773-4d4b-9526-9f7a08d326da\",\"_route\":\"PUT_uuid\"},\"request_uri\":\"http://dams.library.unlv.edu/gemini/498944af-2773-4d4b-9526-9f7a08d326da\",\"method\":\"PUT\"} []\r\n[2019-02-19 20:20:10] app.DEBUG: Checking for guard authentication credentials. {\"firewall_key\":\"default\",\"authenticators\":1} []\r\n[2019-02-19 20:20:10] app.DEBUG: Calling getCredentials() on guard configurator. {\"firewall_key\":\"default\",\"authenticator\":\"Islandora\\\\Crayfish\\\\Commons\\\\Syn\\\\JwtAuthenticator\"} []\r\n[2019-02-19 20:20:10] crayfish.syn.jwt_authentication.DEBUG: Token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE1NTA2MjkyMTAsImV4cCI6MTU1MDYzNjQxMCwid2ViaWQiOiIxIiwiaXNzIjoiaHR0cHM6XC9cL2RhbXMubGlicmFyeS51bmx2LmVkdSIsInN1YiI6ImFkbWluIiwicm9sZXMiOlsiYXV0aGVudGljYXRlZCIsImFkbWluaXN0cmF0b3IiLCJmZWRvcmFhZG1pbiJdfQ.DwsyftTuj3e1t-l4ZbDaQ9Ff4L4S4hcacFjEcpuGq6TqBNa0FiG9Yv2CjNlfn7bF3jWQ6WJ7ml9quSVlxha7g6V-Iyk0mScFdHxMEZ0maPYwgJ115969_Pw9Gvzv7LXpexfFqXx20VQwn6k_xYJjaOLjIr7RzvHOA3FR2nif4m3pTcnUMi0iT3H246d_qOGEr-JPpr8TUsxxsSzx7xQdXQoASV3cobGtPKR6i4o5pjQhmtS5Ef7pt_ew153KigsMwrhMxqdWut5G5XdDaj4cXv_QlZPhtAe8lr9RlmLkOXCUnHdhhRPhgTbdFRjNt-eZm7AxeNfPDgo4trQjx64xHg [] []\r\n[2019-02-19 20:20:10] app.DEBUG: Passing guard token information to the GuardAuthenticationProvider {\"firewall_key\":\"default\",\"authenticator\":\"Islandora\\\\Crayfish\\\\Commons\\\\Syn\\\\JwtAuthenticator\"} []\r\n[2019-02-19 20:20:10] app.INFO: Guard authentication successful! {\"token\":\"[object] (Symfony\\\\Component\\\\Security\\\\Guard\\\\Token\\\\PostAuthenticationGuardToken: PostAuthenticationGuardToken(user=\\\"admin\\\", authenticated=true, roles=\\\"authenticated, administrator, fedoraadmin\\\"))\",\"authenticator\":\"Islandora\\\\Crayfish\\\\Commons\\\\Syn\\\\JwtAuthenticator\"} []\r\n[2019-02-19 20:20:10] app.DEBUG: Guard authenticator set no success response: request continues. {\"authenticator\":\"Islandora\\\\Crayfish\\\\Commons\\\\Syn\\\\JwtAuthenticator\"} []\r\n[2019-02-19 20:20:10] app.DEBUG: Remember me skipped: it is not configured for the firewall. {\"authenticator\":\"Islandora\\\\Crayfish\\\\Commons\\\\Syn\\\\JwtAuthenticator\"} []\r\n[2019-02-19 20:20:10] app.DEBUG: > PUT /gemini/498944af-2773-4d4b-9526-9f7a08d326da [] []\r\n[2019-02-19 20:20:10] app.DEBUG: < 201 [] []\r\n```\r\nBut it never shows up in the log again.\r\n\r\nThe Drupal UUID for the same item (de77f71f-6321-4cb7-900a-080ffb219cbf) pops up in the log two days later:\r\n```\r\n[2019-02-21 18:27:59] app.INFO: Matched route \"{route}\". {\"route\":\"PUT_uuid\",\"route_parameters\":{\"_controller\":\"gemini.controller:put\",\"uuid\":\"de77f71f-6321-4cb7-900a-080ffb219cbf\",\"_route\":\"PUT_uuid\"},\"request_uri\":\"http://dams.library.unlv.edu/gemini/de77f71f-6321-4cb7-900a-080ffb219cbf\",\"method\":\"PUT\"} []\r\n[2019-02-21 18:27:59] app.DEBUG: Checking for guard authentication credentials. {\"firewall_key\":\"default\",\"authenticators\":1} []\r\n[2019-02-21 18:27:59] app.DEBUG: Calling getCredentials() on guard configurator. {\"firewall_key\":\"default\",\"authenticator\":\"Islandora\\\\Crayfish\\\\Commons\\\\Syn\\\\JwtAuthenticator\"} []\r\n[2019-02-21 18:27:59] crayfish.syn.jwt_authentication.DEBUG: Token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE1NTA3OTUyNzksImV4cCI6MTU1MDgwMjQ3OSwid2ViaWQiOiIxIiwiaXNzIjoiaHR0cHM6XC9cL2RhbXMubGlicmFyeS51bmx2LmVkdSIsInN1YiI6ImFkbWluIiwicm9sZXMiOlsiYXV0aGVudGljYXRlZCIsImFkbWluaXN0cmF0b3IiLCJmZWRvcmFhZG1pbiJdfQ.ETF4bTORPw-oljNdO9iRPVRP4VOay8MHMtddsjF2ZWhBBwJNJXNMniECWHlhJC9KgoXXhczobnOdBKAqr06QKoamxD3k-tn4ssm0E3fApf_PwBstviz8K_E11CJ1JlSU-6PkFf43Jp-WPN8fPZ3xqn4-XMZhk7vgtWXfrE5yJqoKlj8oP862p76rDtskp8QftWX0hVCdhMJ0wl96X8yqYLvUuDNOX1xwXQSSannRVWKm27nMiLo70FLtXZQWnmKKxpPjzPlNxllo0Iz8EzldwVe1QviT7czrIEVQ2WRi70nYW4Sumj_lUzvMMRRZY0BTW_GOe1P3qrV6-eK1CESgcw [] []\r\n[2019-02-21 18:27:59] app.DEBUG: Passing guard token information to the GuardAuthenticationProvider {\"firewall_key\":\"default\",\"authenticator\":\"Islandora\\\\Crayfish\\\\Commons\\\\Syn\\\\JwtAuthenticator\"} []\r\n[2019-02-21 18:27:59] app.INFO: Guard authentication successful! {\"token\":\"[object] (Symfony\\\\Component\\\\Security\\\\Guard\\\\Token\\\\PostAuthenticationGuardToken: PostAuthenticationGuardToken(user=\\\"admin\\\", authenticated=true, roles=\\\"authenticated, administrator, fedoraadmin\\\"))\",\"authenticator\":\"Islandora\\\\Crayfish\\\\Commons\\\\Syn\\\\JwtAuthenticator\"} []\r\n[2019-02-21 18:27:59] app.DEBUG: Guard authenticator set no success response: request continues. {\"authenticator\":\"Islandora\\\\Crayfish\\\\Commons\\\\Syn\\\\JwtAuthenticator\"} []\r\n[2019-02-21 18:27:59] app.DEBUG: Remember me skipped: it is not configured for the firewall. {\"authenticator\":\"Islandora\\\\Crayfish\\\\Commons\\\\Syn\\\\JwtAuthenticator\"} []\r\n[2019-02-21 18:27:59] app.DEBUG: > PUT /gemini/de77f71f-6321-4cb7-900a-080ffb219cbf [] []\r\n[2019-02-21 18:27:59] app.DEBUG: < 204 [] []\r\n```\r\nIt returned a 204. At this point Gemini still has the old UUID for this item and has no record of the Drupal UUID it just received in the PUT command. This is evidenced by further gemini log messages where we look for the Drupal UUID and receive 404 responses:\r\n```\r\n[2019-03-05 10:51:24] app.INFO: Matched route \"{route}\". {\"route\":\"GET_uuid\",\"route_parameters\":{\"_controller\":\"gemini.controller:get\",\"uuid\":\"de77f71f-6321-4cb7-900a-080ffb219cbf\",\"_route\":\"GET_uuid\"},\"request_uri\":\"http://dams.library.unlv.edu/gemini/de77f71f-6321-4cb7-900a-080ffb219cbf\",\"method\":\"GET\"} []\r\n[2019-03-05 10:51:24] app.DEBUG: Checking for guard authentication credentials. {\"firewall_key\":\"default\",\"authenticators\":1} []\r\n[2019-03-05 10:51:24] app.DEBUG: Calling getCredentials() on guard configurator. {\"firewall_key\":\"default\",\"authenticator\":\"Islandora\\\\Crayfish\\\\Commons\\\\Syn\\\\JwtAuthenticator\"} []\r\n[2019-03-05 10:51:24] crayfish.syn.jwt_authentication.DEBUG: Token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE1NTE3OTk5NjQsImV4cCI6MTU1MTgwNzE2NCwid2ViaWQiOiIxIiwiaXNzIjoiaHR0cHM6XC9cL2RhbXMubGlicmFyeS51bmx2LmVkdSIsInN1YiI6ImFkbWluIiwicm9sZXMiOlsiYXV0aGVudGljYXRlZCIsImFkbWluaXN0cmF0b3IiLCJmZWRvcmFhZG1pbiJdfQ.m-NFiapTEpW6GH30WnnoSTNjjGiYpVrw_IwSaIsXEvvlj8zMElr0D8i1CLXa-T0Mcr8EMpFSeFKQsCizp4oFwI7OJGd7nQJWcR-9IGQpE7mq0Ygzjjh7M86BHg4OMRNI5RrSIYud_V3cslot5QEmJRQWD439z3QZIAJzsAz2RJsJ-mHXD8UQZEYeZdej6QqyCe83apC97H0R8YMiCgOa7ykjPnEkBYIxRqqpluIgh8SOF4i5Sf7wClt-duSxw3smOsGg6OP7Z3yEFoSkevQK5XMZ9Ip_unRfAvJ3EVs-1cLGoYQTxKOHnmJpb0s2q4PAqkae5QaKJh4TtWN_epsOig [] []\r\n[2019-03-05 10:51:24] app.DEBUG: Passing guard token information to the GuardAuthenticationProvider {\"firewall_key\":\"default\",\"authenticator\":\"Islandora\\\\Crayfish\\\\Commons\\\\Syn\\\\JwtAuthenticator\"} []\r\n[2019-03-05 10:51:24] app.INFO: Guard authentication successful! {\"token\":\"[object] (Symfony\\\\Component\\\\Security\\\\Guard\\\\Token\\\\PostAuthenticationGuardToken: PostAuthenticationGuardToken(user=\\\"admin\\\", authenticated=true, roles=\\\"authenticated, administrator, fedoraadmin\\\"))\",\"authenticator\":\"Islandora\\\\Crayfish\\\\Commons\\\\Syn\\\\JwtAuthenticator\"} []\r\n[2019-03-05 10:51:24] app.DEBUG: Guard authenticator set no success response: request continues. {\"authenticator\":\"Islandora\\\\Crayfish\\\\Commons\\\\Syn\\\\JwtAuthenticator\"} []\r\n[2019-03-05 10:51:24] app.DEBUG: Remember me skipped: it is not configured for the firewall. {\"authenticator\":\"Islandora\\\\Crayfish\\\\Commons\\\\Syn\\\\JwtAuthenticator\"} []\r\n[2019-03-05 10:51:24] app.DEBUG: > GET /gemini/de77f71f-6321-4cb7-900a-080ffb219cbf [] []\r\n[2019-03-05 10:51:24] app.DEBUG: < 404 [] []\r\n```\r\nThere are several similar requests for the Drupal UUID, each receiving the same response: 404."}}
{"actor":{"display_login":"seth-shaw-unlv"}}