mnylc / islandora_multi_importer

This is a flexible, twig based, all cmodel, tabular data to islandora Object importer with optional ZeroMQ processing
GNU General Public License v3.0
16 stars 15 forks source link

Failed ingest produces invalid Watchdog notice corrupting reports. #75

Closed McFateM closed 6 years ago

McFateM commented 6 years ago

I've run into a couple of cases where my MODS self-transform failed causing ingest to fail. When that happened, I found two calls to watchdog in islandora_multi_batch.inc that attempted to write $this->id out as the errant object PID, but it looks like the correct element is $this->objectId. The creation of an error inside a watchdog call seems to cause all kinds of issues. I'm actively restructuring those Watchdog calls now.

Hope to have a tested PR soon.

DiegoPino commented 6 years ago

@McFateM did you try this with the latest PULL? I fixed a lot of that. $this->id should be fine.. the ingest object class has same properties as the real Islandora Object

DiegoPino commented 6 years ago

Also, the id is set before the ingest happens (because it is needed for the batch set DB) so id, even when failed, should always be present. Can you point me to the culprit line in the code?

McFateM commented 6 years ago

Thanks Diego. No, I had not pulled code before this change. So, I’ve done that now but ran into a different problem, one that was probably present earlier too.

if (($this->cleanMODS) && ($dsid == 'MODS')) { module_load_include('xml_form_builder','inc','includes/associations'); $twig_output = xml_form_builder_transform_document($this->modsCleanUpTransform, $twig_output);

This call in islandora_multi_batch.inc to module_load_include has the first two arguments in the wrong order.

I’m making this change now and will run my tests again with other changes in place.

-Mark M.

From: Diego Pino Navarro notifications@github.com Reply-To: mnylc/islandora_multi_importer reply@reply.github.com Date: Friday, May 11, 2018 at 11:38 AM To: mnylc/islandora_multi_importer islandora_multi_importer@noreply.github.com Cc: Mark McFate mcfatem@grinnell.edu, Mention mention@noreply.github.com Subject: Re: [mnylc/islandora_multi_importer] Failed ingest produces invalid Watchdog notice corrupting reports. (#75)

@McFateMhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_McFateM&d=DwMFaQ&c=HUrdOLg_tCr0UMeDjWLBOM9lLDRpsndbROGxEKQRFzk&r=PQglHQe-EzyZqJOuOVcmU0OZ6bg-89msSPuqyNlQr28&m=SDYbSjfvhSOlDtv5CuSonFuPRgES6scHPev8bdj4qTA&s=vjyZp1BkYOtSSSSe1DKFF17AnpwJmo00Hm28GWM4Rbw&e= did you try this with the latest PULL? I fixed a lot of that. $this->id should be fine.. the ingest object class has same properties as the real Islandora Object

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_mnylc_islandora-5Fmulti-5Fimporter_issues_75-23issuecomment-2D388417676&d=DwMFaQ&c=HUrdOLg_tCr0UMeDjWLBOM9lLDRpsndbROGxEKQRFzk&r=PQglHQe-EzyZqJOuOVcmU0OZ6bg-89msSPuqyNlQr28&m=SDYbSjfvhSOlDtv5CuSonFuPRgES6scHPev8bdj4qTA&s=pw-akFc1gJsVO172eWztlYvZZor1qW2knKvpGSoa4G8&e=, or mute the threadhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AIFIwYSJrnYxRaFXY4jnMbWdCBGAmqPRks5txb53gaJpZM4T7uBv&d=DwMFaQ&c=HUrdOLg_tCr0UMeDjWLBOM9lLDRpsndbROGxEKQRFzk&r=PQglHQe-EzyZqJOuOVcmU0OZ6bg-89msSPuqyNlQr28&m=SDYbSjfvhSOlDtv5CuSonFuPRgES6scHPev8bdj4qTA&s=l_v0ow8mIlO2f0mgkyZdXgZ_GsUgvp4ilTVbrCPQ_go&e=.

McFateM commented 6 years ago

So, I pulled the latest code, made my changes, fixed a problem with a call to module_load_include(), and re-created the transform error, but when I try to open my latest watchdog messages I get this…

Recoverable fatal error: Argument 2 passed to t() must be of the type array, integer given, called in /var/www/drupal7/modules/dblog/dblog.admin.inc on line 295 and defined in t() (line 1735 of /var/www/drupal7/includes/bootstrap.inc).

Before this test I cleared the message queue, so one or more of the watchdog messages created by this process must be corrupt? I’m investigating now.

DiegoPino commented 6 years ago

Jajaja. Ok. So silly! Will update my pull once i’m back to my computer. (Facepalm!)

El El vie, 11 de may. de 2018 a las 15:54, Mark McFate < notifications@github.com> escribió:

So, I pulled the latest code, made my changes, fixed a problem with a call to module_load_include(), and re-created the transform error, but when I try to open my latest watchdog messages I get this…

Recoverable fatal error: Argument 2 passed to t() must be of the type array, integer given, called in /var/www/drupal7/modules/dblog/dblog.admin.inc on line 295 and defined in t() (line 1735 of /var/www/drupal7/includes/bootstrap.inc).

Before this test I cleared the message queue, so one or more of the watchdog messages created by this process must be corrupt? I’m investigating now.

From: Diego Pino Navarro notifications@github.com Reply-To: mnylc/islandora_multi_importer reply@reply.github.com Date: Friday, May 11, 2018 at 11:39 AM To: mnylc/islandora_multi_importer < islandora_multi_importer@noreply.github.com> Cc: Mark McFate mcfatem@grinnell.edu, Mention < mention@noreply.github.com> Subject: Re: [mnylc/islandora_multi_importer] Failed ingest produces invalid Watchdog notice corrupting reports. (#75)

Also, the id is set before the ingest happens (because it is needed for the batch set DB) so id, even when failed, should always be present. Can you point me to the culprit line in the code?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub< https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_mnylc_islandora-5Fmulti-5Fimporter_issues_75-23issuecomment-2D388417997&d=DwMFaQ&c=HUrdOLg_tCr0UMeDjWLBOM9lLDRpsndbROGxEKQRFzk&r=PQglHQe-EzyZqJOuOVcmU0OZ6bg-89msSPuqyNlQr28&m=DNesVR9VNk-S-5IrJp-0A_dKsfKefy0ceEKam7McbAo&s=Rq1s6VypiZZJAtp7ISowyccFQGg6oyFSsKk4Yz78auY&e=>, or mute the thread< https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AIFIwV0itbSihcwtArcVMf4OAdl-2D4UBRks5txb7EgaJpZM4T7uBv&d=DwMFaQ&c=HUrdOLg_tCr0UMeDjWLBOM9lLDRpsndbROGxEKQRFzk&r=PQglHQe-EzyZqJOuOVcmU0OZ6bg-89msSPuqyNlQr28&m=DNesVR9VNk-S-5IrJp-0A_dKsfKefy0ceEKam7McbAo&s=XfvHm0UyF-O3IeORRDT6vRA6WtO66w2vyWoj1KtoqJU&e=>.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/mnylc/islandora_multi_importer/issues/75#issuecomment-388469301, or mute the thread https://github.com/notifications/unsubscribe-auth/AGn852snkD8Vqw5Y_kgNvHog8qEFK6ePks5txexhgaJpZM4T7uBv .

-- Diego Pino Navarro Digital Repositories Developer Metropolitan New York Library Council (METRO)

DiegoPino commented 6 years ago

Watchdog gets crazy if a t() is passed. I thought all that was fixed. Can you check on your hooks if you are using t() in any of the messages?

El El vie, 11 de may. de 2018 a las 17:17, Diego Pino dpino@metro.org escribió:

Jajaja. Ok. So silly! Will update my pull once i’m back to my computer. (Facepalm!)

El El vie, 11 de may. de 2018 a las 15:54, Mark McFate < notifications@github.com> escribió:

So, I pulled the latest code, made my changes, fixed a problem with a call to module_load_include(), and re-created the transform error, but when I try to open my latest watchdog messages I get this…

Recoverable fatal error: Argument 2 passed to t() must be of the type array, integer given, called in /var/www/drupal7/modules/dblog/dblog.admin.inc on line 295 and defined in t() (line 1735 of /var/www/drupal7/includes/bootstrap.inc).

Before this test I cleared the message queue, so one or more of the watchdog messages created by this process must be corrupt? I’m investigating now.

From: Diego Pino Navarro notifications@github.com Reply-To: mnylc/islandora_multi_importer reply@reply.github.com Date: Friday, May 11, 2018 at 11:39 AM To: mnylc/islandora_multi_importer < islandora_multi_importer@noreply.github.com> Cc: Mark McFate mcfatem@grinnell.edu, Mention < mention@noreply.github.com> Subject: Re: [mnylc/islandora_multi_importer] Failed ingest produces invalid Watchdog notice corrupting reports. (#75)

Also, the id is set before the ingest happens (because it is needed for the batch set DB) so id, even when failed, should always be present. Can you point me to the culprit line in the code?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub< https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_mnylc_islandora-5Fmulti-5Fimporter_issues_75-23issuecomment-2D388417997&d=DwMFaQ&c=HUrdOLg_tCr0UMeDjWLBOM9lLDRpsndbROGxEKQRFzk&r=PQglHQe-EzyZqJOuOVcmU0OZ6bg-89msSPuqyNlQr28&m=DNesVR9VNk-S-5IrJp-0A_dKsfKefy0ceEKam7McbAo&s=Rq1s6VypiZZJAtp7ISowyccFQGg6oyFSsKk4Yz78auY&e=>, or mute the thread< https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AIFIwV0itbSihcwtArcVMf4OAdl-2D4UBRks5txb7EgaJpZM4T7uBv&d=DwMFaQ&c=HUrdOLg_tCr0UMeDjWLBOM9lLDRpsndbROGxEKQRFzk&r=PQglHQe-EzyZqJOuOVcmU0OZ6bg-89msSPuqyNlQr28&m=DNesVR9VNk-S-5IrJp-0A_dKsfKefy0ceEKam7McbAo&s=XfvHm0UyF-O3IeORRDT6vRA6WtO66w2vyWoj1KtoqJU&e=>.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/mnylc/islandora_multi_importer/issues/75#issuecomment-388469301, or mute the thread https://github.com/notifications/unsubscribe-auth/AGn852snkD8Vqw5Y_kgNvHog8qEFK6ePks5txexhgaJpZM4T7uBv .

-- Diego Pino Navarro Digital Repositories Developer Metropolitan New York Library Council (METRO)

-- Diego Pino Navarro Digital Repositories Developer Metropolitan New York Library Council (METRO)

McFateM commented 6 years ago

I got it figured out and will send a PR your way over the weekend if possible.

Sent from my iPhone

On May 11, 2018, at 4:17 PM, Diego Pino Navarro notifications@github.com<mailto:notifications@github.com> wrote:

Jajaja. Ok. So silly! Will update my pull once i’m back to my computer. (Facepalm!)

El El vie, 11 de may. de 2018 a las 15:54, Mark McFate < notifications@github.commailto:notifications@github.com> escribió:

So, I pulled the latest code, made my changes, fixed a problem with a call to module_load_include(), and re-created the transform error, but when I try to open my latest watchdog messages I get this…

Recoverable fatal error: Argument 2 passed to t() must be of the type array, integer given, called in /var/www/drupal7/modules/dblog/dblog.admin.inc on line 295 and defined in t() (line 1735 of /var/www/drupal7/includes/bootstrap.inc).

Before this test I cleared the message queue, so one or more of the watchdog messages created by this process must be corrupt? I’m investigating now.

From: Diego Pino Navarro notifications@github.com<mailto:notifications@github.com> Reply-To: mnylc/islandora_multi_importer reply@reply.github.com<mailto:reply@reply.github.com> Date: Friday, May 11, 2018 at 11:39 AM To: mnylc/islandora_multi_importer < islandora_multi_importer@noreply.github.commailto:islandora_multi_importer@noreply.github.com> Cc: Mark McFate mcfatem@grinnell.edu<mailto:mcfatem@grinnell.edu>, Mention < mention@noreply.github.commailto:mention@noreply.github.com> Subject: Re: [mnylc/islandora_multi_importer] Failed ingest produces invalid Watchdog notice corrupting reports. (#75)

Also, the id is set before the ingest happens (because it is needed for the batch set DB) so id, even when failed, should always be present. Can you point me to the culprit line in the code?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub< https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_mnylc_islandora-5Fmulti-5Fimporter_issues_75-23issuecomment-2D388417997&d=DwMFaQ&c=HUrdOLg_tCr0UMeDjWLBOM9lLDRpsndbROGxEKQRFzk&r=PQglHQe-EzyZqJOuOVcmU0OZ6bg-89msSPuqyNlQr28&m=DNesVR9VNk-S-5IrJp-0A_dKsfKefy0ceEKam7McbAo&s=Rq1s6VypiZZJAtp7ISowyccFQGg6oyFSsKk4Yz78auY&e=%3E, or mute the thread< https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AIFIwV0itbSihcwtArcVMf4OAdl-2D4UBRks5txb7EgaJpZM4T7uBv&d=DwMFaQ&c=HUrdOLg_tCr0UMeDjWLBOM9lLDRpsndbROGxEKQRFzk&r=PQglHQe-EzyZqJOuOVcmU0OZ6bg-89msSPuqyNlQr28&m=DNesVR9VNk-S-5IrJp-0A_dKsfKefy0ceEKam7McbAo&s=XfvHm0UyF-O3IeORRDT6vRA6WtO66w2vyWoj1KtoqJU&e=%3E.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/mnylc/islandora_multi_importer/issues/75#issuecomment-388469301https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_mnylc_islandora-5Fmulti-5Fimporter_issues_75-23issuecomment-2D388469301-253E&d=DwQFaQ&c=HUrdOLg_tCr0UMeDjWLBOM9lLDRpsndbROGxEKQRFzk&r=PQglHQe-EzyZqJOuOVcmU0OZ6bg-89msSPuqyNlQr28&m=dbUlvWhYlNw4-F5tdyzDoCtgZJF9CbeeP8GKwCYdlwE&s=0ocjmKrfzULOsdTO_lDVyRrMTaGlKsedLFaejU8V89U&e=, or mute the thread https://github.com/notifications/unsubscribe-auth/AGn852snkD8Vqw5Y_kgNvHog8qEFK6ePks5txexhgaJpZM4T7uBvhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AGn852snkD8Vqw5Y-5FkgNvHog8qEFK6ePks5txexhgaJpZM4T7uBv-253E&d=DwQFaQ&c=HUrdOLg_tCr0UMeDjWLBOM9lLDRpsndbROGxEKQRFzk&r=PQglHQe-EzyZqJOuOVcmU0OZ6bg-89msSPuqyNlQr28&m=dbUlvWhYlNw4-F5tdyzDoCtgZJF9CbeeP8GKwCYdlwE&s=_CoyI7I5O4jk370AilAuDlKz3vPyNZXSC0zSmiDvjpc&e= .

-- Diego Pino Navarro Digital Repositories Developer Metropolitan New York Library Council (METRO)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_mnylc_islandora-5Fmulti-5Fimporter_issues_75-23issuecomment-2D388488096&d=DwMFaQ&c=HUrdOLg_tCr0UMeDjWLBOM9lLDRpsndbROGxEKQRFzk&r=PQglHQe-EzyZqJOuOVcmU0OZ6bg-89msSPuqyNlQr28&m=dbUlvWhYlNw4-F5tdyzDoCtgZJF9CbeeP8GKwCYdlwE&s=7E68WeOJNdQrc_RpjF07wwP37h42ISf-Vh1J2FT0P_4&e=, or mute the threadhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AIFIwWJIlE2-2DZCk4MWjukVEbleP-2DT07Yks5txf-5FogaJpZM4T7uBv&d=DwMFaQ&c=HUrdOLg_tCr0UMeDjWLBOM9lLDRpsndbROGxEKQRFzk&r=PQglHQe-EzyZqJOuOVcmU0OZ6bg-89msSPuqyNlQr28&m=dbUlvWhYlNw4-F5tdyzDoCtgZJF9CbeeP8GKwCYdlwE&s=sfBZaM73cVjmJpo0NSuIyHStEHs14epWTVJIX1JWr_o&e=.

McFateM commented 6 years ago

The real problem was in the call to watch dog itself. No variables array was passed so it interpreted the message type as an integer when expecting an array. That caused the message corruption so that the recent log messages would not open. I fixed all this in my code so I’ll send it when I get an opportunity to do so.

DiegoPino commented 6 years ago

@McFateM++ fixed via #76.Thanks for this!