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

Returns a list of lists for invoice_lines_paid_on_fund task. #1383

Merged
merged 1 commit into from
Oct 30, 2024

Conversation

shelleydoljack
Copy link
Contributor

@shelleydoljack shelleydoljack commented Oct 29, 2024

Fixes #1335

When triggering the digital_bookplate_instances DAG with a conf with a new fund, the funds branch will be used so that invoice_lines_paid_on_fund task will query folio for the fund_uuid in fundDistributions list of paid invoice lines. In some cases, there are more invoice lines than can be mapped to dynamic tasks (currently in prod there are 2,026 paid invoice lines with the LINDER fund). I've changed invoice_lines_paid_on_fund task to return a list of lists, e.g.

[
  [{folio invoice line dict}, {folio invoice line dict}, {folio invoice line dict}, ...],
  [{folio invoice line dict}, {folio invoice line dict}, {folio invoice line dict}, ...]
]

If all paid invoice lines for a particular fund is greater than 1,000, then each inner list of folio invoice line dicts will be 100. For all others it will be 5. I am a little worried that we will see a lot of dropped connections once we get to the instances_from_po_lines task for each 100 paid invoice lines, since we will be hitting okapi hard at this point and possibly seeing dropped connections for the connection pooling bug in httpx implementation of FolioClient.

@shelleydoljack
Copy link
Contributor Author

Also, thinking about this more, we could deploy to prod w/out this PR and let LINDER fund fail, then deploy to prod with PR merged and trigger digital_bookplate_instances with just LINDER fund. That way we know more of what to expect in terms of the dags running in the form that we had them running on airflow-stage.

@shelleydoljack
Copy link
Contributor Author

We'll merge this after we deploy to prod and run the digital bookplates dags to completion.

@shelleydoljack shelleydoljack merged commit ac1d085 into main Oct 30, 2024
4 checks passed
@shelleydoljack shelleydoljack deleted the t1335-toomuch-data branch October 30, 2024 17:38
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.

Too many invoice lines causes UnmappableXComLengthPushed exception
2 participants