kuafuai / DevOpsGPT

Multi agent system for AI-driven software development. Combine LLM with DevOps tools to convert natural language requirements into working software. Supports any development language and extends the existing code.
https://www.kuafuai.net
Other
6.48k stars 830 forks source link

When I ran the code using Docker, I noticed that the frontend was displaying an error while the backend was still generating code #121

Open liruixue opened 10 months ago

liruixue commented 10 months ago

Thanks for devopsGPT team great working! When I ran the code using Docker, I noticed that the frontend was displaying an error while the backend was still generating code. I got stuck at this step(please see it on screenshot). Actually, at the same time, the backend was continuing to generate code, that means the frontend error display is not correct(Because the backend logs show that, the backend should generate all the code files finally ). I have uploaded a screenshot of my page and the runtime log information. Any solution to fix this issue? BTW,according to the backend logs, those files should store in workspace folder already, but I can't find those files in '$PWD/workspace' folder,any idea about those files store path?

I am looking forward to your suggestion to help, thank you~

devops_1 devops_2 devops_3

devopsGPT_docker_run_out.txt

booboosui commented 10 months ago

Thanks for your feedback, this document may be helpful to you https://github.com/kuafuai/DevOpsGPT/blob/master/docs/DOCUMENT.md

AICODER_ALLOWED_ORIGIN: Allowed cross-origin addresses for the backend, matching the frontend's access address. Note: If you're not accessing the website via 127.0.0.1, manually modify apiUrl in frontend/static/js/coder.js.

liruixue commented 10 months ago

Thanks for your feedback, this document may be helpful to you https://github.com/kuafuai/DevOpsGPT/blob/master/docs/DOCUMENT.md

AICODER_ALLOWED_ORIGIN: Allowed cross-origin addresses for the backend, matching the frontend's access address. Note: If you're not accessing the website via 127.0.0.1, manually modify apiUrl in frontend/static/js/coder.js.

Thanks for your quickly reply. Actually, I have already modified the access address in coder.js, you can see the steps 'setup_app','clarify' executing successfully in screenshot, what I think the step 'step_subtask/analysis' may cost much time, and the time beyond the ajax call timeout setting. I will try set a more bigger timeout value for ajax call, will let you know if it can works or not later.

liruixue commented 10 months ago

Hi, I tried a more bigger timeout value for ajax call, for example:6mins. But, it still doesn't work, the browser will return the 504 error cause by the long time execution time on background. Then I do some changes for the background code logic changes:

1) When the background receive the 'sub_task' ajax calling at first time, the controller will works as old logic; at the same time, I stored the execution progress in cache, suppose the init value is 0, it means 'calling start status'. when the exection is end, that value will change to '1', mens 'calling is end', and the cache will store the execution result as well.

2) After the frontend lost the connection, then you can try call it again, and the controller will check the cache's progress, if checked value is '0', will return the message 'backend is still running, please wait'; else '1', return the execution result directly.

Now, I can seee the next step backend exectuion result whatever the execution time is beyond timeout setting or not.

If any farther suggestion, please let me konw. Thanks.