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

[NOREF] cedar system dataloader #2577

Merged
merged 7 commits into from
May 13, 2024
Merged

[NOREF] cedar system dataloader #2577

merged 7 commits into from
May 13, 2024

Conversation

mynar7
Copy link
Contributor

@mynar7 mynar7 commented May 10, 2024

NOREF

Changes and Description

  • Adds a dataloader for fetching multiple CEDAR systems from the system summary endpoint.

How to test this change

Load the TRB admin homepage. It should be faster!

PR Author Review Checklist

  • Met the ticket's acceptance criteria, or will meet them in a subsequent PR.
  • Added or updated tests for backend resolvers or other functions as needed.
  • Added or updated client tests for new components, parent components, functions, or e2e tests as necessary.
  • Tested user-facing changes with voice-over and the rotor menu

PR Reviewer Guidelines

  • It's best to pull the branch locally and test it, rather than just looking at the code online!
  • Check that all code is adequately covered by tests - if it isn't feel free to suggest the addition of tests.
  • Always make comments, even if it's minor, or if you don't understand why something was done.

@mynar7 mynar7 requested a review from a team as a code owner May 10, 2024 22:38
@mynar7 mynar7 requested review from samoddball and removed request for a team May 10, 2024 22:38
logger := appcontext.ZLogger(ctx)
cedarSystems, err := loaders.GetCedarSystems(ctx)
if err != nil {
logger.Error("error getting cedar systems in data loader", zap.Error(err))
Copy link
Contributor

Choose a reason for hiding this comment

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

we should return a slice of dataloader.Result with every err populated with err - i believe dataloaders always need to return a slice with len of requested keys

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oooooh, ok

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added in 1c15a9f

pkg/dataloaders/cedar_system_loader.go Show resolved Hide resolved
pkg/dataloaders/cedar_system_loader.go Outdated Show resolved Hide resolved
@mynar7 mynar7 marked this pull request as draft May 11, 2024 00:45
@mynar7
Copy link
Contributor Author

mynar7 commented May 11, 2024

Marking as draft since we'll need to make the same TRB changes for System Intakes!

@mynar7 mynar7 marked this pull request as ready for review May 13, 2024 19:14
@mynar7 mynar7 added blocked and removed blocked labels May 13, 2024
@ClayBenson94 ClayBenson94 added bug Something isn't working and removed bug Something isn't working labels May 13, 2024
@mynar7 mynar7 merged commit 917f763 into main May 13, 2024
14 of 20 checks passed
@mynar7 mynar7 deleted the NOREF/cedar_system_dataloader branch May 13, 2024 20:14
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.

None yet

4 participants