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: list out/err files when available via tailer #6480

Open
wants to merge 3 commits into
base: 8.4.x
Choose a base branch
from

Conversation

oliver-sanders
Copy link
Member

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

Closes #5802

List log files that are not present on disk but which are available via a tailer.

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 changed the base branch from master to 8.3.x November 15, 2024 14:36
@oliver-sanders oliver-sanders added this to the 8.3.7 milestone Nov 15, 2024
@oliver-sanders oliver-sanders self-assigned this Nov 15, 2024
@oliver-sanders oliver-sanders added the could be better Not exactly a bug, but not ideal. label Nov 15, 2024
@oliver-sanders

This comment was marked as outdated.

@hjoliver hjoliver modified the milestones: 8.3.7, 8.4.1 Jan 8, 2025
@MetRonnie MetRonnie changed the base branch from 8.3.x to 8.4.x January 9, 2025 18:33
@oliver-sanders oliver-sanders force-pushed the cat-log-list-tailable-files branch 4 times, most recently from 320f8f4 to 39e17e5 Compare January 27, 2025 16:49
@oliver-sanders oliver-sanders marked this pull request as ready for review January 27, 2025 16:49
* The `--mode=list-dir` option lists log files which are available to
  view.
* This commit includes remote `job.out` and `job.err` files which are
  available via platform tailer/viewer commands.
* Note, these log files are only listed if accessible via *both* a
  tailer and a viewer in order to prevent ambiguity (these are typically
  configured together anyway).
@oliver-sanders oliver-sanders force-pushed the cat-log-list-tailable-files branch from 39e17e5 to f8a248c Compare January 28, 2025 10:47
Copy link
Member

Choose a reason for hiding this comment

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

12-delete-kill.t already exists - can we make this number 13?

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.

  • Read code
  • Ran new test
  • Tried manually testing, including looking at available log files in TUI before and after.
  • Ran new test with coverage. Lines indicated in the diff were covered.

@@ -0,0 +1 @@
cat-log: List log files which are availably via a configured tailer/viewer command.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
cat-log: List log files which are availably via a configured tailer/viewer command.
`cat-log`: List log files which are available via a configured tailer/viewer command.

cylc/flow/scripts/cat_log.py Show resolved Hide resolved

files.sort()
print('\n'.join(files))
print(err, file=sys.stderr)
Copy link
Member

Choose a reason for hiding this comment

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

Currently on 8.4.0 the cat-log -m l command exits non-zero if this subprocess exits non-zero. But it no longer does on this branch

Copy link
Member Author

Choose a reason for hiding this comment

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

Hopefully fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
could be better Not exactly a bug, but not ideal.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cat-log: list job.out and job.err when jobs are running that require a tailer to access
4 participants