Skip to content
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.

Regenerate Publications #139

Merged
merged 10 commits into from
Aug 7, 2020
Merged

Regenerate Publications #139

merged 10 commits into from
Aug 7, 2020

Conversation

meissadia
Copy link
Contributor

@meissadia meissadia commented Aug 5, 2020

Closes #138
Closes cfpb/hmda-frontend#602

Changes

  • Displays availability of an Institution's MLAR and IRS files
  • Provides easy way to trigger regeneration of each file
    • Prevents regeneration attempts for Institutions without Filing histories
  • Adds Cypress tests for Regeneration

Testing

  • Create a cypress.env.json file
    {
      "HH_AUTH_URL": "https://<dev-default url>",
      "HH_USERNAME": <keycloak username>,
      "HH_PASSWORD": <keycloak password>
    }
    
  • yarn cypress run

Screenshots

Screen Shot 2020-08-05 at 2 05 16 PM

@meissadia meissadia marked this pull request as ready for review August 5, 2020 20:12
@meissadia meissadia requested a review from wpears August 5, 2020 20:12
Copy link
Member

@wpears wpears left a comment

Choose a reason for hiding this comment

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

I'm getting CORS errors on which are causing the file column to just be perma-spinners:
Screen Shot 2020-08-05 at 5 00 33 PM

Were you avoiding these errors somehow? The files exist when accessed directly from the bucket. Either way, we probably should have some sort of error state that replaces the spinner and says something's amiss.

@meissadia
Copy link
Contributor Author

Yes, I've been testing in a browser with CORS disabled. And in my mind the CORS issue would somehow be solved once the app was deployed but now I'm realizing that this will never be requesting from the same origin since it's a call to S3.

I've also tried fetch and jquery just in case those would magically solve the problem but, of course, they don't.

We'd need to enable HEAD CORS requests on the S3 bucket: S3 Doc

@meissadia
Copy link
Contributor Author

There are also a ton of calls to the Filing /latest endpoint when we should only need 1/year. So I need to revise that logic.

Copy link
Member

@wpears wpears left a comment

Choose a reason for hiding this comment

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

Like the additional changes, going to merge this in and the CORS stuff can be tracked elsewhere

@wpears wpears merged commit 7b7cd04 into master Aug 7, 2020
@wpears wpears deleted the 138-regenerate-publications branch August 7, 2020 19:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Page for Regenerating Publications Add Page for Regenerating Publications
2 participants