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

Fix failing FERC archivers #304

Merged
merged 2 commits into from
Mar 22, 2024
Merged

Fix failing FERC archivers #304

merged 2 commits into from
Mar 22, 2024

Conversation

jdangerx
Copy link
Member

Overview

Closes #285 .

What problem does this address?

FERC archivers were failing with

TypeError: Constructor parameter should be str

Which we thought was related to some other error messages earlier about

Unsuccessful renaming of downloaded file to active file /Users/dazhong-catalyst/Library/Caches/Arelle/https/ecollection.ferc.gov/taxonomy/form60/2022-01-01/schedules/ScheduleTemporaryCashInvestments/sched-105_2022-01-01_pre.xml                             
Please remove with file manager.

But actually those errors were due to concurrency issues with arelle, and we already handled them with retries. The true issue was that aiohttp.ClientSession.get() wants a str or yarl.URL which is different from the pydantic.networks.HttpUrl that we were passing in. Oops!

What did you change in this PR?

Coerce that bad boy to a string.

Testing

How did you make sure this worked? How can a reviewer verify this?

pudl_archiver --datasets ferc60 --sandbox --only-years 2022

On main, it fails. On this branch, it succeeds. Et voilà.

@jdangerx jdangerx requested review from a team and bendnorman and removed request for a team March 22, 2024 16:27
@e-belfer e-belfer requested review from e-belfer and removed request for bendnorman March 22, 2024 16:35
@e-belfer e-belfer added bug Something isn't working github_actions Pull requests that update GitHub Actions code ferc1 FERC Form 1 ferc2 FERC Form 2 ferc6 FERC Form 6 ferc60 FERC Form 60 ferc714 FERC Form 714 automation Issues relating to automated archiver runs labels Mar 22, 2024
@e-belfer e-belfer linked an issue Mar 22, 2024 that may be closed by this pull request
11 tasks
Copy link
Member

@e-belfer e-belfer left a comment

Choose a reason for hiding this comment

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

Amazing, glad this wound up being a simple fix. Can we add all the FERC archivers to the run_archiver GHA and cross off two issues at once?

@jdangerx jdangerx requested a review from e-belfer March 22, 2024 16:52
Copy link
Member

@e-belfer e-belfer left a comment

Choose a reason for hiding this comment

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

Exciting!

@e-belfer e-belfer merged commit 7c5ed4c into main Mar 22, 2024
3 checks passed
@e-belfer e-belfer deleted the 285-fix-arelle-race-condition branch March 22, 2024 16:59
@e-belfer e-belfer mentioned this pull request Mar 22, 2024
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automation Issues relating to automated archiver runs bug Something isn't working ferc1 FERC Form 1 ferc2 FERC Form 2 ferc6 FERC Form 6 ferc60 FERC Form 60 ferc714 FERC Form 714 github_actions Pull requests that update GitHub Actions code
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Fix broken archivers Automate remaining archive runs
2 participants