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

fix(agent): Make save_state behave like save as #7025

Merged

Conversation

kcze
Copy link
Contributor

@kcze kcze commented Mar 18, 2024

OPEN-353

This change changes the behavior of saving agent before exiting CLI.
Now when user provides custom id, the state is saved in the new location, and workspace files are copied.

Changes

  • Modify save_state to accept optional save_as param, it saves the state and copies all workspace files
  • Add copy to FileStorage and all its implementations
  • Add tests for coping files and folders

copy tests done

  • Manual
  • Local storage
  • S3 storage
  • GCS

Copy link

netlify bot commented Mar 18, 2024

Deploy Preview for auto-gpt-docs canceled.

Name Link
🔨 Latest commit 5a4a13c
🔍 Latest deploy log https://app.netlify.com/sites/auto-gpt-docs/deploys/66190d46507da50008063cc7

Copy link
Contributor

This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.

@github-actions github-actions bot added the conflicts Automatically applied to PRs with merge conflicts label Mar 20, 2024
@github-actions github-actions bot removed the conflicts Automatically applied to PRs with merge conflicts label Mar 21, 2024
Copy link
Contributor

Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly.

Copy link

codecov bot commented Mar 22, 2024

Codecov Report

Attention: Patch coverage is 38.00000% with 31 lines in your changes are missing coverage. Please review.

Project coverage is 45.44%. Comparing base (fb8ed0b) to head (5a4a13c).
Report is 1 commits behind head on master.

Files Patch % Lines
autogpts/autogpt/autogpt/file_storage/s3.py 7.14% 13 Missing ⚠️
...ogpt/autogpt/agents/features/agent_file_manager.py 33.33% 8 Missing ⚠️
autogpts/autogpt/autogpt/file_storage/gcs.py 11.11% 8 Missing ⚠️
autogpts/autogpt/autogpt/app/main.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7025      +/-   ##
==========================================
- Coverage   45.49%   45.44%   -0.05%     
==========================================
  Files         139      139              
  Lines        6528     6570      +42     
  Branches      917      924       +7     
==========================================
+ Hits         2970     2986      +16     
- Misses       3408     3434      +26     
  Partials      150      150              
Flag Coverage Δ
Linux 45.34% <38.00%> (-0.05%) ⬇️
Windows 43.59% <38.00%> (-0.04%) ⬇️
autogpt-agent 45.41% <38.00%> (-0.05%) ⬇️
macOS 44.79% <38.00%> (-0.05%) ⬇️

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.

@github-actions github-actions bot added size/l and removed size/m labels Mar 23, 2024
@kcze kcze requested a review from Pwuts March 23, 2024 16:36
Copy link
Member

@Pwuts Pwuts left a comment

Choose a reason for hiding this comment

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

LGTM! GCS tests pass :)

@Pwuts Pwuts merged commit e866a4b into Significant-Gravitas:master Apr 12, 2024
16 of 19 checks passed
@kcze kcze deleted the kpczerwinski/open-353-fix-save-as branch April 12, 2024 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants