Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates format to be a single string #782

Merged
merged 1 commit into from
Feb 12, 2024
Merged

Updates format to be a single string #782

merged 1 commit into from
Feb 12, 2024

Conversation

JPrevost
Copy link
Member

@JPrevost JPrevost commented Feb 5, 2024

Why are these changes being introduced:

  • This was a bug in the graphql spec. TIMDEX has always treated format as a single string

Relevant ticket(s):

How does this address that need:

  • Updates GraphQL spec to correct the expectation to be a single string

Document any side effects to this change:

  • None of the TIMDEX sources mapped to anything other than a single string for format. Therefore, anyone requesting format via GraphQL would be getting an error in production at this time. This resolves that problem, so a deprecation does not feel appropriate. This was a bug that caused the inability to use a field, not a change in how a previously usable field is being mapped.
  • Even though the previous comment remains true, we'll still need to refresh the spec in our deployed timdex ui instances as the spec has indeed changed.

Developer

  • All new ENV is documented in README
  • All new ENV has been added to Heroku Pipeline, Staging and Prod
  • ANDI or Wave has been run in accordance to
    our guide and
    all issues introduced by these changes have been resolved or opened as new
    issues (link to those issues in the Pull Request details above)
  • Stakeholder approval has been confirmed (or is not needed)

Code Reviewer

  • The commit message is clear and follows our guidelines
    (not just this pull request message)
  • There are appropriate tests covering any new functionality
  • The documentation has been updated or is unnecessary
  • The changes have been verified
  • New dependencies are appropriate or there were no changes

Requires database migrations?

NO

Includes new or updated dependencies?

NO

@mitlib mitlib temporarily deployed to timdex-pr-782 February 5, 2024 16:57 Inactive
@jazairi jazairi self-assigned this Feb 7, 2024
@jazairi
Copy link
Contributor

jazairi commented Feb 7, 2024

I'm not getting any errors requesting format when testing this locally, but it's returning null for that field for seemingly every record. Do you have a sample search I can use to verify this that will return a record with a format?

@ghukill
Copy link

ghukill commented Feb 8, 2024

I'm not getting any errors requesting format when testing this locally, but it's returning null for that field for seemingly every record. Do you have a sample search I can use to verify this that will return a record with a format?

I don't know if helpful, but in Dev1 the record gismit:EG_CAIRO_A25TOPO_1972 should have a value. This graphql query for this record in Dev1 currently throws a 500.

I believe the ticket had another link from @JPrevost that showed this works now, but I'm a little fuzzy on which Heroku URLs are pointing at which Opensearch instances (and it looks like that link no longer works).

Copy link

@ghukill ghukill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I read the change as going from an array of strings to a single string, which makes sense to me given that the TIMDEX data model in Transmogrifier for the format field will always write a single string or nothing.

Why are these changes being introduced:

* This was a bug in the graphql spec. TIMDEX has always treated format
  as a single string

Relevant ticket(s):

* https://mitlibraries.atlassian.net/browse/GDT-151

How does this address that need:

* Updates GraphQL spec to correct the expectation to be a single string

Document any side effects to this change:

* None of the TIMDEX sources mapped to anything other than a single
  string for `format`. Therefore, anyone requesting `format` via GraphQL
  would be getting an error in production at this time. This resolves
  that problem, so a deprecation does not feel appropriate. This was a
  bug that caused the inability to use a field, not a change in how a
  previously usable field is being mapped.
* Even though the previous comment remains true, we'll still need to
  refresh the spec in our deployed timdex ui instances as the spec has
  indeed changed.
@JPrevost JPrevost force-pushed the gdt-151-format-error branch from 1ab3a88 to f2eedd0 Compare February 12, 2024 20:10
@JPrevost JPrevost merged commit e517f1d into main Feb 12, 2024
4 checks passed
@JPrevost JPrevost deleted the gdt-151-format-error branch February 12, 2024 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants