Skip to content

if an error occurs while using the setup wizard, undo any actions that have succeeded #9

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

Open
bboynton97 opened this issue Oct 9, 2024 · 3 comments
Assignees

Comments

@bboynton97
Copy link
Contributor

No description provided.

HYPRGK added a commit to HYPRGK/AgentStack that referenced this issue Dec 1, 2024
Fixes AgentOps-AI#9

Add error handling and rollback functionality to the setup wizard.

* Add `rollback_actions` function in `agentstack/cli/cli.py` to undo actions like directory creation and file writing.
* Update `init_project_builder` in `agentstack/cli/cli.py` to catch exceptions and call `rollback_actions`.
* Track created files and directories in `insert_template` for potential rollback in `agentstack/cli/cli.py`.
* Add `rollback_actions` function in `agentstack/generation/agent_generation.py` and `agentstack/generation/task_generation.py` to undo actions.
* Update `generate_agent` in `agentstack/generation/agent_generation.py` and `generate_task` in `agentstack/generation/task_generation.py` to catch exceptions and call `rollback_actions`.
* Add tests in `tests/test_cli_loads.py` to verify rollback functionality.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/AgentOps-AI/AgentStack/issues/9?shareId=XXXX-XXXX-XXXX-XXXX).
@bboynton97
Copy link
Contributor Author

Still looking for a successful implementation of this. i do think it'd be a beneficial feature

@bboynton97
Copy link
Contributor Author

@tcdent is this handled in #235? I'll review that soon, but if so we can close this issue

@tcdent
Copy link
Collaborator

tcdent commented Feb 6, 2025

Wizard create a template internally and runs init on it all at once, so as long as init is bug free, the user is safe.

I had thought about this being more relevant when running individual commands.

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 a pull request may close this issue.

3 participants