anon-iclr-submission/benchname-bug-localization huggingface dataset:
Repository: Agenta-AI/agenta
Issue: Variants that fail to start are added to the backend

**Describe the bug**
If you try `agenta variant serve` and it fails because the docker fails to start. The variant is nevertheless added to the UI.

**To Reproduce**
Steps to reproduce the behavior:
1. Create a buggy variant (i.e. missing requirements.txt)
2. Serve the variant
3. Go to the UI

**Expected behavior**
CLI fails and the variant are not added



Changed files:
agenta-backend/agenta_backend/routers/app_variant.py

diff --git a/agenta-backend/agenta_backend/routers/app_variant.py b/agenta-backend/agenta_backend/routers/app_variant.py
index 18d7a4e..0d3841e 100644
--- a/agenta-backend/agenta_backend/routers/app_variant.py
+++ b/agenta-backend/agenta_backend/routers/app_variant.py
@@ -104,6 +104,8 @@ async def start_variant(app_variant: AppVariant) -> URI:
     try:
         return app_manager.start_variant(app_variant)
     except Exception as e:
+        if db_manager.get_variant_from_db(app_variant) is not None:
+            app_manager.remove_app_variant(app_variant)
         raise HTTPException(status_code=500, detail=str(e))
Repository: Agenta-AI/agenta
Issue: Add 0.0.0.0 to the allowed list for cors in the backend

accessing agenta from 0.0.0.0 does not work because of cors

Changed files:
agenta-backend/agenta_backend/main.py, agenta-cli/agenta/sdk/agenta.py

diff --git a/agenta-backend/agenta_backend/main.py b/agenta-backend/agenta_backend/main.py
index 70ae9da..c9a8ade 100644
--- a/agenta-backend/agenta_backend/main.py
+++ b/agenta-backend/agenta_backend/main.py
@@ -5,7 +5,12 @@ from agenta_backend.routers import app_evaluation_router
 from agenta_backend.routers import testset_router
 from agenta_backend.routers import container_manager
 
-origins = ["http://localhost:3000", "http://localhost:3001", "http:demo.agenta.ai"]
+origins = [
+    "http://localhost:3000",
+    "http://localhost:3001",
+    "http://0.0.0.0:3000",
+    "http://0.0.0.0:3001"
+]
 
 # this is the prefix in which we are reverse proxying the api
 app = FastAPI()
diff --git a/agenta-cli/agenta/sdk/agenta.py b/agenta-cli/agenta/sdk/agenta.py
index b544b77..b4d10db 100644
--- a/agenta-cli/agenta/sdk/agenta.py
+++ b/agenta-cli/agenta/sdk/agenta.py
@@ -22,6 +22,8 @@ app = FastAPI()
 origins = [
     "http://localhost:3000",
     "http://localhost:3001",
+    "http://0.0.0.0:3000",
+    "http://0.0.0.0:3001"
 ]
 
 app.add_middleware(