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

GQL-86: User cannot retrieve C2142771958-LPCLOUD in MMT production #149

Merged
merged 2 commits into from
Nov 25, 2024

Conversation

mandyparson
Copy link
Contributor

@mandyparson mandyparson commented Nov 19, 2024

Overview

What is the feature?

Initial issue was User cannot retrieve C2142771958-LPCLOUD in MMT production. Users were unable to do this because there were over 2000 variable associations. This could also be an issue for services and tools.

What is the Solution?

Edit the resolver to pass handlePagingParams nothing as opposed to variables.length. This defaults the page size to 20, users of a client will need to paginate through results if there is ever a front end that requires it. MMT does not allow users to view associated variables or tools from a Collection so there should not be a need to change MMT at this time. I did the same for tools but not for services. Services CAN be viewed from collections but it does not appear that is very common for a collection to have more than 3 services.

What areas of the application does this impact?

Collection resolver

Testing

Reproduction steps

  • **Environment for testing: SIT
  • **Collection to test with: C1200462006-CMR_ONLY
  1. Query for associated variables with the above collection. On main you'll receive the error below whereas on the branch you'll get back the first 20 results.
  2. There does not appear to be a collection with more than 3 or 4 associated tools which makes this a little tricky. This collection C1200376270-MMT_2 has a four. You can query tools on that collection and then edit line 276 in Collection.js/resolvers to ...handlePagingParams(args, 3), you'll notice a result comes back with only 3 results but the count is still 4. This demonstrates that the change doesn't break it.
  • **Environment for testing: PROD
  • **Collection to test with: C2142771958-LPCLOUD
  • Need to change env.yml line 34 to: ummCollectionVersion: '1.18.1'
  1. Can do the same for PROD as well.

Attachments

Issue on main
Screenshot 2024-11-19 at 1 07 42 PM

Fixed on branch
Screenshot 2024-11-19 at 1 09 19 PM

Fixed on prod
Screenshot 2024-11-22 at 12 57 10 PM

Checklist

  • I have added automated tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

Copy link

codecov bot commented Nov 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (6ee37b9) to head (8cbb7d1).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #149   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          106       106           
  Lines         2410      2410           
  Branches       274       274           
=========================================
  Hits          2410      2410           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@mandyparson mandyparson requested a review from htranho November 19, 2024 22:42
@mandyparson mandyparson merged commit 2e4c494 into main Nov 25, 2024
7 of 8 checks passed
@mandyparson mandyparson deleted the GQL-86 branch November 25, 2024 16:04
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.

3 participants