Skip to content

Commit

Permalink
Fix bug in run button and add logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Ayan-Bandyopadhyay committed Oct 19, 2024
1 parent 2b2e1b3 commit b4e76b0
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion frontend/src/layouts/DefaultPageLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export function DefaultPageLayout({ children }: DefaultPageLayoutRootProps) {
const currentPath = location.pathname;
return (
<div className="flex h-screen w-full min-w-0 items-center bg-default-background">
<div className="flex grow shrink-0 basis-0 flex-col items-start self-stretch">
<div className="flex grow shrink-0 basis-0 flex-col items-start self-stretch min-w-0">
<AppTopBar className="flex-none" path={currentPath}/>
{children ? (
<div className="flex w-full grow shrink-0 basis-0 flex-col items-start gap-4 overflow-y-auto">
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/pages/monitoring/ExecutionDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ export default function ExecutionDetail({
<div className="flex w-full flex-col items-start gap-2 overflow-hidden rounded-md bg-neutral-50 relative">
<div className="flex w-full flex-col items-start px-4 py-4 overflow-x-auto max-w-full">
<span className="text-monospace-body font-monospace-body text-default-font whitespace-pre">
testd sfdsf sdf sfsdf sdfds sdfdsfsdfdsfsd fsf ds fds sdf sdf dsf ds fsdfds fds fd fsd fs fds fsd fsdf sdf sd fsd fsd fsdf sdf ds ds dfsd sdfdsfs sdf dsfds ds dsf sdf sdf s ksdhf h h u hi hk j kj kj bk bkb k bh bk bkj b jkb kjb kj bk kj kjjk nkjkjhkhkjnkjbkjbkjbkbkhbkhbkbkbkjbkjnnkjnkbkjbkhbnbkbjkjbnjkn,mn,jn,m,n,n,jn,nmsdfdsfsdfdsfdsfdsfdsfdsfdsfdsfsdfdsfsdfsdfdsfdsfsdfsdfsdfdsfsdfsdfsdfsdfsdfsdfsdfdsfsdfsdfsdfsdfds
{/* {getResults(selectedExecution)} */}
{/* testd sfdsf sdf sfsdf sdfds sdfdsfsdfdsfsd fsf ds fds sdf sdf dsf ds fsdfds fds fd fsd fs fds fsd fsdf sdf sd fsd fsd fsdf sdf ds ds dfsd sdfdsfs sdf dsfds ds dsf sdf sdf s ksdhf h h u hi hk j kj kj bk bkb k bh bk bkj b jkb kjb kj bk kj kjjk nkjkjhkhkjnkjbkjbkjbkbkhbkhbkbkbkjbkjnnkjnkbkjbkhbnbkbjkjbnjkn,mn,jn,m,n,n,jn,nmsdfdsfsdfdsfdsfdsfdsfdsfdsfdsfsdfdsfsdfsdfdsfdsfsdfsdfsdfdsfsdfsdfsdfsdfsdfsdfsdfdsfsdfsdfsdfsdfds */}
{getResults(selectedExecution)}
</span>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions server/models/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class AgentUploadRequest(BaseModel):
class UpdateSessionRequest(BaseModel):
status: Optional[SessionStatus] = None
results: Optional[List[Dict]] = None
logs: Optional[List[Dict]] = None
error: Optional[Dict] = None

class CopilotRequest(BaseModel):
Expand Down
1 change: 1 addition & 0 deletions server/models/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class Session(BaseModel):
results: Optional[List[Dict]] = None
error: Optional[Dict] = None
created_at: datetime.datetime
logs: Optional[List[Dict]] = None

# created at should serialize to isoformat when converting to json

Expand Down
4 changes: 3 additions & 1 deletion worker/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -144,4 +144,6 @@ app_config.py

local_dir

project
project

session_recording_path.txt
2 changes: 1 addition & 1 deletion worker/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "MIT"
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.10"
python = "~3.10"
playwright = "^1.47.0"
requests = "^2.32.3"
poetry-dotenv-plugin = "^0.2.0"
Expand Down
10 changes: 2 additions & 8 deletions worker/run_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,16 +148,10 @@ def run_worker(agent_id: str, api_key: str, request: Dict):
try:
# Run the agent code by running poetry install and then poetry run start
os.chdir(project_path)
proc = subprocess.Popen(
subprocess.run(
["poetry", "install"],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
text=True,
bufsize=1,
universal_newlines=True
check=True
)
collect_and_record_logs(proc)
proc.wait()
# Set the DISPLAY environment variable
os.environ["DISPLAY"] = ":99"

Expand Down

0 comments on commit b4e76b0

Please sign in to comment.