scientist-softserv / britishlibrary

Other
3 stars 0 forks source link

Bug fatal for https://bl.iro.bl.uk/concern/datasets/2fa13eb5-1767-469b-b4c0-d9d518bfc1b3 (and others) #144

Open crisr15 opened 1 year ago

crisr15 commented 1 year ago

I think we have an edge case: https://bl.iro.bl.uk/concern/datasets/2fa13eb5-1767-469b-b4c0-d9d518bfc1b3 that tickles a bug which I think is part of the theming stuff?

F, [2022-05-13T18:14:25.822054 #1] FATAL -- : [81a889c7171a3a27248563e57e38106f]
F, [2022-05-13T18:14:25.822122 #1] FATAL -- : [81a889c7171a3a27248563e57e38106f] ActionView::Template::Error (wrong number of arguments (given 1, expected 2)):
F, [2022-05-13T18:14:25.822274 #1] FATAL -- : [81a889c7171a3a27248563e57e38106f]     16:     xml.author { xml.name(document.to_semantic_values[:author].first) }
[81a889c7171a3a27248563e57e38106f]     17:   end
[81a889c7171a3a27248563e57e38106f]     18:
[81a889c7171a3a27248563e57e38106f]     19:   with_format("html") do
[81a889c7171a3a27248563e57e38106f]     20:     xml.summary "type" => "html" do
[81a889c7171a3a27248563e57e38106f]     21:       xml.text! render_document_partial(document,
[81a889c7171a3a27248563e57e38106f]     22:       :index,
F, [2022-05-13T18:14:25.822310 #1] FATAL -- : [81a889c7171a3a27248563e57e38106f]
F, [2022-05-13T18:14:25.822336 #1] FATAL -- : [81a889c7171a3a27248563e57e38106f] app/helpers/blacklight/blacklight_helper_behavior.rb:334:in `with_format'
[81a889c7171a3a27248563e57e38106f] app/controllers/application_controller.rb:162:in `inject_theme_views'
[81a889c7171a3a27248563e57e38106f] app/middleware/no_cache_middleware.rb:11:in `call'

The object loads fine if format is not html: https://bl.iro.bl.uk/concern/datasets/2fa13eb5-1767-469b-b4c0-d9d518bfc1b3.json~~~~

crisr15 commented 1 year ago
{
  "id": "2fa13eb5-1767-469b-b4c0-d9d518bfc1b3",
  "create_date": "2021-09-02T10:19:03.789+00:00",
  "modified_date": "2021-11-08T14:24:50.330+00:00",
  "head": [
    {
      "id": "http://fcrepo.default.svc.cluster.local:8080/rest/d08baa53-5174-40bb-89ea-9e5f642d2ac1/2f/a1/3e/b5/2fa13eb5-1767-469b-b4c0-d9d518bfc1b3/list_source#g51863640"
    }
  ],
  "tail": [
    {
      "id": "http://fcrepo.default.svc.cluster.local:8080/rest/d08baa53-5174-40bb-89ea-9e5f642d2ac1/2f/a1/3e/b5/2fa13eb5-1767-469b-b4c0-d9d518bfc1b3/list_source#g13791840"
    }
  ],
  "depositor": "jenny.basford@bl.uk",
  "title": [
    "Ordnance Survey Old / First series England and Wales 1:63360 (georeferenced sheet images)"
  ],
  "date_uploaded": "2021-09-02T10:19:03.260+00:00",
  "date_modified": "2021-11-08T14:24:26.333+00:00",
  "state": {
    "id": "http://fedora.info/definitions/1/0/access/ObjState#active"
  },
  "proxy_depositor": null,
  "on_behalf_of": null,
  "arkivo_checksum": null,
  "owner": null,
  "bulkrax_identifier": null,
  "institution": [
    "British Library"
  ],
  "org_unit": [
    "Digital Scholarship"
  ],
  "refereed": null,
  "funder": [
    "[{\"funder_name\":\"Arts and Humanities Research Council\",\"funder_doi\":\"http://dx.doi.org/10.13039/501100000267\",\"funder_position\":\"0\",\"funder_award\":[\"AH/S01179X/1\"]}]"
  ],
  "fndr_project_ref": [],
  "add_info": null,
  "date_published": "2021-08",
  "date_accepted": null,
  "date_submitted": null,
  "project_name": [
    "Living with Machines"
  ],
  "rights_holder": [],
  "original_doi": "10.23636/6g9b-9d72",
  "place_of_publication": [
    "London, UK"
  ],
  "abstract": "Map sheet images for the Ordnance Survey Old Series / First Series England and Wales 1:63360, georeferenced and cropped at the neatlike (can be viewed together as a seamless composite). Geotiff format. \r\n\r\nThe original (ungeoreferenced) sheet images can be found at: https://commons.wikimedia.org/wiki/Category:Ordnance_Survey_Old/First_series_England_and_Wales_1:63360_(full_sheets). \r\n\r\nThe sheets were georeferenced by relating the sheet corners to their coordinates (no internal control points applied), using sheet boundary data created by the Charles Close Society (see https://www.charlesclosesociety.org/KMLFILE). \r\n\r\nWhere sheets were issued as quarter sheets (NW, NE, SW, SE), a digital composite of the full sheet has been created.\r\n\r\nThe filenames include the sheet number. See an index map at: https://commons.wikimedia.org/wiki/Category:Ordnance_Survey_Old/First_series_England_and_Wales_1:63360_(full_sheets)#/media/File:Ordnance_Survey_One-inch_Old_Series_England_&_Wales_Index.png \r\n\r\nThe imagery is medium resolution.\r\n",
  "alternate_identifier": [],
  "related_identifier": [],
  "creator_search": [
    "Vane, Olivia"
  ],
  "library_of_congress_classification": [],
  "doi_options": null,
  "draft_doi": null,
  "disable_draft_doi": null,
  "alt_title": [],
  "dewey": null,
  "file_availability": [
    "External link (access may be restricted)",
    "File available from this repository"
  ],
  "collection_id": [],
  "collection_names": [],
  "volume": [],
  "pagination": null,
  "issn": null,
  "eissn": null,
  "official_link": "https://doi.org/10.23636/6g9b-9d72",
  "series_name": [],
  "edition": null,
  "event_title": [],
  "event_date": [],
  "event_location": [],
  "book_title": null,
  "journal_title": null,
  "issue": null,
  "article_num": null,
  "isbn": null,
  "media": [],
  "related_exhibition": [],
  "related_exhibition_date": [],
  "version": "W/\"10b94fc56bfdec5d22e9b3ee02de5074f9969694\"",
  "version_number": [],
  "alternative_journal_title": [],
  "related_exhibition_venue": [],
  "current_he_institution": [],
  "qualification_name": null,
  "qualification_level": null,
  "duration": [],
  "editor": [],
  "doi": [],
  "doi_status_when_public": null,
  "label": null,
  "relative_path": null,
  "import_url": null,
  "resource_type": [
    "Dataset default Dataset"
  ],
  "creator": [
    "[{\"creator_given_name\":\"Olivia\",\"creator_family_name\":\"Vane\",\"creator_name_type\":\"Personal\",\"creator_orcid\":\"0000-0002-3777-4910\",\"creator_isni\":\"0000000485055683\",\"creator_position\":\"0\",\"creator_institutional_relationship\":[\"Staff member\"]}]"
  ],
  "contributor": [
    "[{\"contributor_organization_name\":\"The Charles Close Society\",\"contributor_name_type\":\"Organisational\",\"contributor_isni\":\"0000000103860303\",\"contributor_position\":\"0\",\"contributor_type\":\"Data Collector\"},{\"contributor_given_name\":\"Gethin\",\"contributor_family_name\":\"Rees\",\"contributor_name_type\":\"Personal\",\"contributor_orcid\":\"0000-0002-3255-9584\",\"contributor_isni\":\"0000000495697110\",\"contributor_position\":\"1\",\"contributor_type\":\"Other\",\"contributor_institutional_relationship\":[\"Staff member\"]}]"
  ],
  "description": [],
  "keyword": [
    "Wales",
    "Ordnance Survey",
    "First Series",
    "England",
    "maps",
    "Old Series"
  ],
  "license": [
    "http://creativecommons.org/publicdomain/zero/1.0/"
  ],
  "rights_statement": [],
  "publisher": [
    "British Library"
  ],
  "date_created": [],
  "subject": [],
  "language": [
    "English"
  ],
  "identifier": [],
  "based_near": [],
  "related_url": [],
  "bibliographic_citation": [],
  "source": []
}
crisr15 commented 1 year ago

This is failing on a method call in Blacklight

https://github.com/projectblacklight/blacklight/blob/b37a4642059c4af125372e7faa969b5245b6ecd4/app/views/catalog/_document_default.atom.builder#L15

crisr15 commented 1 year ago

I pasted the JSON for the document above. My hunch is that this is a data issue. But I wasn't able to copy this Blacklight file over and debug it.

crisr15 commented 1 year ago

https://gitlab.com/notch8/britishlibrary/-/commit/2ef2050da15359448579c958a11103a8b52fac49?page=3#66b6eacaf845fe23a4f81f1e1ce01cb3f8a93d8f_0_334 was added with theming and overrides the blacklight_helper and changes

def with_format(format,&block) to def with_format(format,_block)

I have no idea if that is significant, but does _block signify unused? &block would be optional by default which might help with the argument error we are getting? Perhaps the data is tickling the argument error after in light of _block not being optional?

If the block that is being sent by with_format : https://github.com/projectblacklight/blacklight/blob/v6.24.0/app/views/catalog/_document_default.atom.builder#L20-L24 yields nowt and the argument in the method is not set up to receive nowt then does this the cause of the error I wonder?

Somewhat out on a limb and am unsure of other consequences, but possibly reverting to def with_format(format,&block) in https://gitlab.com/notch8/britishlibrary/-/blob/main/app/helpers/blacklight/blacklight_helper_behavior.rb#L334 would help?

crisr15 commented 1 year ago

So this is a big dataset with 107 large tiffs.

I'm not sure what I was going on about above, but it seems that the work show page is timing out.

I'm attempting to export it to my dev machine for a further look. Bulkrax's zip is currently 7G and counting...

crisr15 commented 1 year ago

So the originally reported issue related to a dataset that is now timing out (with no error going to in sentry)

The catalog.atom error (https://sentry.notch8.com/sentry/britishlibrary/issues/140188/) however can be reproduced with my.hyku/catalog.atom and fixed with !456

crisr15 commented 1 year ago

Will proceed this ticket to prod deploy as we do have a fix for an error (though still not 100% sure it will make https://bl.iro.bl.uk/concern/datasets/2fa13eb5-1767-469b-b4c0-d9d518bfc1b3 begin to work)

crisr15 commented 1 year ago

As suspected the argument error (https://sentry.notch8.com/sentry/britishlibrary/issues/140188/) goes away with this, but the record show pages are still timing out (e.g. https://bl.iro.bl.uk/concern/datasets/2fa13eb5-1767-469b-b4c0-d9d518bfc1b3)

crisr15 commented 1 year ago

Tagging this with dev phase 2 as this is now of the type: "request timing out and not sure why"

cziaarm commented 11 months ago

Fixed possibly helped by removal of two awkward file_sets see #143