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

Enable fedach and fedwire download from proxy #268

Merged

Conversation

burnettekm
Copy link
Contributor

frbservices.org is not always available when we need to download the fedach or fedwire data. The ability to get this data from a proxy or cache instead of frbservices.org would be very helpful.

This PR enables Fed to fetch data from a custom URL(i.e. private service or NGINX). The custom URL must be set in the CUSTOM_DOWNLOAD_URL environment variable. The custom URL must include the formatting directive %s where %s is the listName. This value is interpolated into the URL at the time the request is made.

Ex: "https://frbservices.org/EPaymentsDirectory/directories/%s?format=json"

If this environment variable is not supplied, Fed defaults to the url in the above example.

cmd/server/reader.go Outdated Show resolved Hide resolved
cmd/server/reader.go Outdated Show resolved Hide resolved
cmd/server/reader.go Outdated Show resolved Hide resolved
pkg/download/download.go Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Feb 26, 2024

Codecov Report

Merging #268 (92c717a) into master (d4d3022) will increase coverage by 3.02%.
The diff coverage is 60.00%.

❗ Current head 92c717a differs from pull request most recent head 32b3082. Consider uploading reports for the commit 32b3082 to get more accurate results

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #268      +/-   ##
==========================================
+ Coverage   65.61%   68.64%   +3.02%     
==========================================
  Files          16       16              
  Lines         922      928       +6     
==========================================
+ Hits          605      637      +32     
+ Misses        295      261      -34     
- Partials       22       30       +8     

adamdecaf
adamdecaf previously approved these changes Feb 26, 2024
@adamdecaf
Copy link
Member

Do you want to try building this image yourself make docker locally and verifying it works in platform-dev before we merge?

@burnettekm
Copy link
Contributor Author

Do you want to try building this image yourself make docker locally and verifying it works in platform-dev before we merge?

Yes, I'll give it a shot. Thanks for the idea.

@adamdecaf adamdecaf merged commit ca28151 into moov-io:master Feb 27, 2024
7 checks passed
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