Skip to content

test: give job output viewer fakes log_is_truncated - #9642

Merged
koenvanderveen merged 1 commit into
devfrom
koen/fix-job-stdout-fakes
Nov 19, 2026
Merged

koenvanderveen merged 1 commit into
devfrom
koen/fix-job-stdout-fakes

Conversation

@koenvanderveen

Copy link
Copy Markdown
Collaborator

Summary

  • When CI runs job-tests on dev, three tests in test_job_stdout.py previously failed. PR feat: say when a log shows only its first characters #9631 made the stdout and stderr viewers call job_info.log_is_truncated(), but the fake job in these tests, added by PR fix: escape job stdout and stderr before rendering ANSI colors as HTML #9587, did not have that method. The two PRs merged separately, so neither PR's CI caught it. Now the fake job has log_is_truncated, and returns False.
  • In job_stdout.py, after both PRs merged, the file imported html and also from html import escape. Now it imports only html, and the truncation message uses html.escape like the rest of the file.

Guidelines

High level

  • 🟢 Split: no need to split.
  • 🟢 Size: fix the job output viewer test fakes that broke when two PRs merged.

Mid level

  • 🟢 User-facing code
  • 🟢 Error handling
  • 🟢 State versioning
  • 🟢 Function structure
  • 🟢 Tests

Low level

  • 🟢 Naming
  • 🟢 Code style

Security

No change.

Testing

  • uv run pytest -n auto packages/syft-job/tests packages/syft-enclave/tests/test_read_permissions.py: 251 passed.

Asana task

PR #9631 made the stdout and stderr viewers call
job_info.log_is_truncated(). The fakes in test_job_stdout.py, added by
PR #9587, did not have it, so job-tests failed on dev.
@koenvanderveen
koenvanderveen merged commit 1426534 into dev Nov 19, 2026
21 checks passed
@koenvanderveen
koenvanderveen deleted the koen/fix-job-stdout-fakes branch November 19, 2026 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant