Skip to content

Fix failing tests due to No space left on device #576

@rwood-97

Description

@rwood-97

Describe the bug
Sometimes the tests fail due to No space left on device error.

To Reproduce
See error in #574 action.

Run python -m pytest ./tests
============================= test session starts ==============================
platform linux -- Python 3.11.14, pytest-8.4.2, pluggy-1.6.0
rootdir: /home/runner/work/MapReader/MapReader
plugins: hydra-core-1.3.2, anyio-4.12.0, cov-5.0.0
collected 355 items
tests/test_annotate/test_annotator.py ............................       [  7%]
tests/test_classify/test_annotations_loader.py ....................      [ 13%]
tests/test_classify/test_classifier.py .........................F        [ 20%]
tests/test_classify/test_datasets.py EEEEEEEEEEEEEEEEEEE                 [ 26%]
tests/test_download/test_data_structures.py ...                          [ 27%]
tests/test_download/test_downloader_utils.py ...                         [ 27%]
tests/test_download/test_iiif_downloader.py .......EEEEE                 [ 31%]
tests/test_download/test_sheet_downloader.py EFEFEEEEEEEEEEEEEEEEEEEEEEE [ 38%]
EEEEEEEEEEEE                                                             [ 42%]
tests/test_geo_pipeline.py E                                             [ 42%]
tests/test_import.py .                                                   [ 42%]
tests/test_load/test_geo_utils.py F.FF                                   [ 43%]
tests/test_load/test_images.py FFFFFF.FFFFFFEEEEEEEEEFEEFEEEEEEEEEEEEEFF [ 55%]
FEEEEEFEEEEEEEEEEEEEFEEEEFEE                                             [ 63%]
tests/test_load/test_images_load_parents.py EEEEEE                       [ 65%]
tests/test_load/test_loader.py EEEEEEEE                                  [ 67%]

and:

System.IO.IOException: No space left on device : '/home/runner/actions-runner/cached/_diag/Worker_20251219-165641-utc.log'
   at System.IO.RandomAccess.WriteAtOffset(SafeFileHandle handle, ReadOnlySpan`1 buffer, Int64 fileOffset)
   at System.IO.Strategies.OSFileStreamStrategy.Write(ReadOnlySpan`1 buffer)
   at System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder)
   at System.Diagnostics.TextWriterTraceListener.Flush()
   at GitHub.Runner.Common.HostTraceListener.WriteHeader(String source, TraceEventType eventType, Int32 id)
   at GitHub.Runner.Common.HostTraceListener.TraceEvent(TraceEventCache eventCache, String source, TraceEventType eventType, Int32 id, String message)
   at System.Diagnostics.TraceSource.TraceEvent(TraceEventType eventType, Int32 id, String message)
   at GitHub.Runner.Worker.Worker.RunAsync(String pipeIn, String pipeOut)
   at GitHub.Runner.Worker.Program.MainAsync(IHostContext context, String[] args)
System.IO.IOException: No space left on device : '/home/runner/actions-runner/cached/_diag/Worker_20251219-165641-utc.log'
   at System.IO.RandomAccess.WriteAtOffset(SafeFileHandle handle, ReadOnlySpan`1 buffer, Int64 fileOffset)
   at System.IO.Strategies.OSFileStreamStrategy.Write(ReadOnlySpan`1 buffer)
   at System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder)
   at System.Diagnostics.TextWriterTraceListener.Flush()
   at GitHub.Runner.Common.HostTraceListener.WriteHeader(String source, TraceEventType eventType, Int32 id)
   at GitHub.Runner.Common.HostTraceListener.TraceEvent(TraceEventCache eventCache, String source, TraceEventType eventType, Int32 id, String message)
   at System.Diagnostics.TraceSource.TraceEvent(TraceEventType eventType, Int32 id, String message)
   at GitHub.Runner.Common.Tracing.Error(Exception exception)
   at GitHub.Runner.Worker.Program.MainAsync(IHostContext context, String[] args)
Unhandled exception. System.IO.IOException: No space left on device : '/home/runner/actions-runner/cached/_diag/Worker_20251219-165641-utc.log'
   at System.IO.RandomAccess.WriteAtOffset(SafeFileHandle handle, ReadOnlySpan`1 buffer, Int64 fileOffset)
   at System.IO.Strategies.OSFileStreamStrategy.Write(ReadOnlySpan`1 buffer)
   at System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder)
   at System.Diagnostics.TextWriterTraceListener.Flush()
   at System.Diagnostics.TraceSource.Flush()
   at GitHub.Runner.Common.Tracing.Dispose(Boolean disposing)
   at GitHub.Runner.Common.Tracing.Dispose()
   at GitHub.Runner.Common.TraceManager.Dispose(Boolean disposing)
   at GitHub.Runner.Common.TraceManager.Dispose()
   at GitHub.Runner.Common.HostContext.Dispose(Boolean disposing)
   at GitHub.Runner.Common.HostContext.Dispose()
   at GitHub.Runner.Worker.Program.Main(String[] args)

To debug this:

  1. work out what part of the test/workflow is causing this error
  2. remove this from our tests or split it into multiple smaller tests

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions