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

Developer Research Spike: 526ez Pull Disability list from LIghthouse API (41302) #59815

Closed
3 tasks
austinjprice opened this issue Jun 6, 2023 · 7 comments
Closed
3 tasks
Assignees
Labels
DBEX-Carbs Disability Benefits Experience - Team Carbs disability-experience spike Research effort

Comments

@austinjprice
Copy link
Contributor

austinjprice commented Jun 6, 2023

Acceptance Criteria:

Time-box: 12 hrs per doc (raise if we are approaching limit or think we will)

@austinjprice austinjprice added DBEX-Carbs Disability Benefits Experience - Team Carbs disability-experience labels Jun 6, 2023
@austinjprice austinjprice changed the title Research Spike: 526ez Pull Disability list from LIghthouse API (41302) Developer Research Spike: 526ez Pull Disability list from LIghthouse API (41302) Jun 6, 2023
@NB28VT
Copy link
Contributor

NB28VT commented Jun 6, 2023

Front End next steps: make time to share findings with someone in bdex-engineers Slack from team 1. Re: how do you think we should plan to approach this?

@sortizsh sortizsh added the spike Research effort label Jun 6, 2023
@SamStuckey
Copy link
Contributor

SamStuckey commented Jun 7, 2023

I accidentally dropped this comment in the wrong ticket. This is a summary of my initial findings pre-ticketing, for posterity.


Additional context from my initial research indicates that whoever focuses on the backend of this ticket will need to answer two primary questions:

What is our performance need / availability requirement for this data via that API? This will inform whether or not we decide to cache this data at the application level (likely), or allow for a read through to the lighthouse API. Caching will present the issue of cache breaking to consider, while non-caching will make our API dependent on lighthouse uptime and the appropriate query route being exposed by lighthouse, e.g. do they have a 'fuzzy' match api we can use? This will also depend on the FE use cases captured by the FE researcher here.
What is our current solution for interacting with Lighthouse via the API? In other words, how big of a lift will it be to plug our API into a new route (and potentially a cache busting webhook). Is there an auth pattern to follow? A Lighthouse API wrapper object, etc... To answer this question, research existing API to lighthouse requests.

Existing answers:

  1. yes we want some version of caching at the application (API) level
  2. yes, we want to support fuzzy search from the front end

@sortizsh
Copy link
Contributor

sortizsh commented Jun 8, 2023

@tblackwe can you go in and add tasks

  • Add 2 tasks to 59815:
  • Understand existing lighthouse api and caching
  • Serve data to the endpoints Nathan is discovering

@micahaspyr
Copy link
Contributor

micahaspyr commented Jun 13, 2023

It's been tough getting clarity into the workings of Lighthouse, so we'll just treat it as a black box. Because the Lighthouse API endpoint lacks fuzzy searching, we'll just need to search upon the data received on the backend via the ruby controller code. The best way forward is to just cache the list of disabilities, then do some text searching on the values returned by lighthouse. The data needing to be returned looks to just be the "name" and "id" of each pair. Name being the name of the ailment, and id maps to the "code" of a disability. We can just return an array of json values for the frontend end to consume.

The research has brought to my attention that all data from the benefits reference endpoints can be cached. This isn't necessarily in the purview of this ticket but perhaps something to look at later.

Actions

  • Update the BenefitsDataController or create a new or separate controller to handle this call
  • Collab on how the frontend/ @NB28VT wants the data to be structured. Briefly looking at the frontend React components being used it appears that sending the name of the disability and it's contention 'id' aka 'code' is all that's needed
  • Make sure this doesn't clash with other work being done referencing the BenefitsDataController and the BenefitsData services attached to making the Lighthouse API call.
    • If the service (what acts as the data fetcher) isn't being updated by other teams, we can just use a separate controller.
    • OR we can skip using the service to decouple from future changes
      Backend areas to touch
    • Create a request test spec. Test needs to be cognizant of the request being cached. Using VCR to test this doesn't encompass what is needed as VCR cassettes are basically just cached api responses, so we'll need to figure out what to do in this instance
  • Looking into the config files, it appears that redis cache is statically set to expire every 30 minutes but the amount of time can be customized per usage. I don't see why we would need to change this since the list hasn't changed in over 3.5 years

@NB28VT
Copy link
Contributor

NB28VT commented Jun 13, 2023

Quick Update, just got a great high level overview from Christine on what docs I need to read to map out the front end for this fix:

Current Goals

  • Understand patterns for retrieving API data in the front end
  • Understand how to work with the Redux store
  • Understand how I would write a unit test for this
  • Understand how if at all I would tweak the 526 form e2e cypress tests for this
  • Understand how our form library works
  • Map out what I would change where when we actually implement this new endpoint

TODO:

@NB28VT
Copy link
Contributor

NB28VT commented Jun 15, 2023

Nathan: note to self move this ticket to the "done" column once you've unblocked work on the ticket this blocks

@austinjprice
Copy link
Contributor Author

@NB28VT @micahaspyr @tblackwe @RakshindaAslam @lydiahooper moving to icebox as this is blocked based on feedback from TRex and Shannon Ford. Meeting with team 1, 3pm est and we can determine next steps to unbock or if this needs to go back to backlog

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DBEX-Carbs Disability Benefits Experience - Team Carbs disability-experience spike Research effort
Projects
None yet
Development

No branches or pull requests

5 participants