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

Cache results of allowed_workflows #290

Merged
merged 1 commit into from
Nov 19, 2024

Conversation

mbthornton-lbl
Copy link
Contributor

This PR addresses a stale file-handle error, which in turn cause the Watcher daemon to exit:

2024-11-19 12:40:33,557 INFO: Restored 0 jobs from state
2024-11-19 12:40:33,561 ERROR: Error occurred during cycle: [Errno 116] Stale file handle: '/global/homes/n/nmdcda/nmdc_automation/dev/nmdc_automation/nmdc_automation/config/workflows/workflows.yaml'
Traceback (most recent call last):
  File "/global/homes/n/nmdcda/nmdc_automation/dev/nmdc_automation/nmdc_automation/workflow_automation/watch_nmdc.py", line 360, in watch
  File "/global/homes/n/nmdcda/nmdc_automation/dev/nmdc_automation/nmdc_automation/workflow_automation/watch_nmdc.py", line 318, in cycle
  File "/global/homes/n/nmdcda/nmdc_automation/dev/nmdc_automation/nmdc_automation/config/siteconfig.py", line 104, in allowed_workflows
OSError: [Errno 116] Stale file handle: '/global/homes/n/nmdcda/nmdc_automation/dev/nmdc_automation/nmdc_automation/config/workflows/workflows.yaml'

The fix here is to cache the results of reading in workflows.yaml in the allowed_workflows function

@mbthornton-lbl mbthornton-lbl linked an issue Nov 19, 2024 that may be closed by this pull request
@mbthornton-lbl mbthornton-lbl requested a review from aclum November 19, 2024 21:20
@mbthornton-lbl mbthornton-lbl merged commit 21240c7 into main Nov 19, 2024
1 check passed
@mbthornton-lbl mbthornton-lbl deleted the 289-watcher-failing-from-stale-filehandle branch November 19, 2024 22:49
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.

Watcher failing from stale filehandle
2 participants