Skip to content

Conversation

@husseinmozannar
Copy link
Contributor

@husseinmozannar husseinmozannar commented Apr 4, 2025

This pull request introduces a new feature to the DockerCommandLineCodeExecutor class, which allows temporary files generated by code execution to be deleted after code execution. The most important changes include adding a new configuration option, updating the class to handle this option, and adding tests to verify the new functionality.

New Feature: Temporary File Deletion

Testing

@codecov
Copy link

codecov bot commented Apr 4, 2025

Codecov Report

Attention: Patch coverage is 93.33333% with 2 lines in your changes missing coverage. Please review.

Project coverage is 77.25%. Comparing base (b670511) to head (5894de6).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...ext/code_executors/docker/_docker_code_executor.py 93.33% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6211   +/-   ##
=======================================
  Coverage   77.25%   77.25%           
=======================================
  Files         200      200           
  Lines       14246    14255    +9     
=======================================
+ Hits        11006    11013    +7     
- Misses       3240     3242    +2     
Flag Coverage Δ
unittests 77.25% <93.33%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@husseinmozannar husseinmozannar requested review from ekzhu and jackgerrits and removed request for jackgerrits April 4, 2025 23:34
Copy link
Contributor

@ekzhu ekzhu left a comment

Choose a reason for hiding this comment

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

Note that the default work directory of all code executors is already temp directory from tempfile.

@husseinmozannar husseinmozannar enabled auto-merge (squash) April 6, 2025 18:42
@husseinmozannar husseinmozannar merged commit 7acfd8a into main Apr 6, 2025
57 checks passed
@husseinmozannar husseinmozannar deleted the tmp_code_code branch April 6, 2025 18:47
peterj added a commit to kagent-dev/autogen that referenced this pull request Apr 11, 2025
* upstream/main: (120 commits)
  Update discover.md with adding email agent package (microsoft#6274)
  Expose TCM TypedDict classes for apps to use (microsoft#6269)
  Fix publish_message-method() notes (microsoft#6250)
  Fix ValueError: Dataclass has a union type error (microsoft#6266)
  [Bugfix] Fix for Issue microsoft#6241 - ChromaDB removed IncludeEnum (microsoft#6260)
  Add note on ModelInfo for Gemini Models (microsoft#6259)
  .NET update autogen 0.2.2 -> autogen 0.2.3 (microsoft#6257)
  [Draft] Enable File Upload/Paste as Task in AGS (microsoft#6091)
  Bugfix/azure ai search embedding (microsoft#6248)
  Expose more Task-Centric Memory parameters (microsoft#6246)
  fix: typo in usage.md (microsoft#6245)
  .NET update oai and aoai package version (microsoft#6239)
  Fix sha256_hash docstring (microsoft#6236)
  Update json_schema_to_pydantic version and make relaxed requirement on arry item. (microsoft#6209)
  Fix terminations conditions. (microsoft#6229)
  Docker Code Exec delete temp files (microsoft#6211)
  clean codes notes for autogen-core. (microsoft#6218)
  Fix/transformer aware any modelfamily (microsoft#6213)
  chore: Add powershell path check for code executor (microsoft#6212)
  added: gemini 2.5 pro preview (microsoft#6226)
  ...

Signed-off-by: Peter Jausovec <peter.jausovec@solo.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants