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

cat-log: add timeout to processes #645

Merged
merged 2 commits into from
Nov 12, 2024
Merged

cat-log: add timeout to processes #645

merged 2 commits into from
Nov 12, 2024

Conversation

oliver-sanders
Copy link
Member

@oliver-sanders oliver-sanders commented Nov 11, 2024

  • Partially addresses cat-log: clean up processes on websocket disconnect #643
  • Add a timeout to cylc cat-log processes:
    • Ensures we don't accumulate them by accident.
    • Improves efficiency by closing long-lived log streams (the user probably isn't looking at the log file any more and the log file has probably stopped growing anyway).
  • At present, cylc cat-log processes may be left behind if the websocket is closed abruptly. This has been observed as the result of a proxy timeout.

Check List

  • I have read CONTRIBUTING.md and added my name as a Code Contributor.
  • Contains logically grouped changes (else tidy your branch by rebase).
  • Does not contain off-topic changes (use other PRs for other changes).
  • Applied any dependency changes to both setup.cfg (and conda-environment.yml if present).
  • Tests are included (or explain why tests are not needed).
  • Changelog entry included if this is a change that can affect users
  • Cylc-Doc pull request opened if required at cylc/cylc-doc/pull/XXXX.
  • If this is a bug fix, PR should be raised against the relevant ?.?.x branch.

@oliver-sanders oliver-sanders added this to the 1.5.x milestone Nov 11, 2024
@oliver-sanders oliver-sanders self-assigned this Nov 11, 2024
@hjoliver
Copy link
Member

(gah, the trouble orphaned cat-log processes have caused over the years!)

* Partially addresses cylc#643
* Add a timeout to `cylc cat-log` processes:
  * Ensures we don't accumulate them by accident.
  * Improves efficiency by closing long-lived log streams
    (the user probably isn't looking at the log file any more and
    the log file has probably stopped growing anyway).
* At present, `cylc cat-log` processes may be left behind
  if the websocket is closed abruptly. This has been observed as
  the result of a proxy timeout.
cylc/uiserver/resolvers.py Outdated Show resolved Hide resolved
Copy link
Member

@wxtim wxtim left a comment

Choose a reason for hiding this comment

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

Reasonable. Thank you for all the extra annotation. Some of this code is NOT self documenting IMO.

One Spelling error

Copy link
Member

@hjoliver hjoliver left a comment

Choose a reason for hiding this comment

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

Yep, good.

@hjoliver hjoliver merged commit 8461385 into cylc:master Nov 12, 2024
5 of 6 checks passed
@oliver-sanders oliver-sanders deleted the 643 branch November 13, 2024 08:50
@MetRonnie MetRonnie linked an issue Dec 5, 2024 that may be closed by this pull request
@MetRonnie MetRonnie modified the milestones: 1.5.x, 1.6.0 Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cat-log: tail process timeout
4 participants