Code Monkey home page Code Monkey logo

Comments (5)

WolfgangFahl avatar WolfgangFahl commented on June 7, 2024 1

@CleanCut excellent - since the CI picks up the latest green anyway we might see the warning sooner or later. If i spot in the logs I'll let you know.

from green.

CleanCut avatar CleanCut commented on June 7, 2024

Given that...

  1. Green is using Python's built-in tempfile handling (see snippet at bottom)
    • You can see that line 88 is simply returning, so the end of the with tempfile.TemporaryDirectory()... context is triggering a cleanup from Python's internals.
  2. No other reports of problems have arisen in the 2 years since this code has been touched

...this is most likely a problem with your project, platform, or CI setup. Perhaps you are changing permissions of a file at some point so that it cannot be deleted? Or perhaps you have some subprocess that doesn't get killed that keeps adding files even while things are getting cleaned up? If you printed a recursive directory listing of the temporary directory after hitting this error, that may shed some light on the problem.

I'm going to go ahead and close this for now, as I don't think it's Green's problem, but feel to reopen it if you discover any evidence to the contrary so we can look into it.

green/green/cmdline.py

Lines 83 to 88 in 4939bf8

if os.environ.get("TMPDIR") is None: # pragma: nocover
with tempfile.TemporaryDirectory() as temp_dir_for_tests:
try:
os.environ["TMPDIR"] = temp_dir_for_tests
tempfile.tempdir = temp_dir_for_tests
return _main(argv, testing)

from green.

WolfgangFahl avatar WolfgangFahl commented on June 7, 2024

Or perhaps you have some subprocess that doesn't get killed that keeps adding files even while things are getting cleaned up?

Yes due to a problem in another upstream library we have processes still running and we want to ignore this for the time being. Thats's why we'd love to catch this instead of having it flagged as an error. There is no "reopen" button available.

from green.

CleanCut avatar CleanCut commented on June 7, 2024

There is no "reopen" button available.

My apologies! I thought that the person who created an issue would have access to the Reopen button! I guess it only shows up for me.

from green.

CleanCut avatar CleanCut commented on June 7, 2024

Green 3.4.3 (just released) treats the inability to clean up a temp directory that it created as a warning instead of a crash...I hope. I couldn't find a sane way to test this.

from green.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.