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
opened 2023-11-06 11:17:00 -05:00 by liruixue · 3 comments
liruixue commented 2023-11-06 11:17:00 -05:00 (Migrated from github.com)

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

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](https://github.com/kuafuai/DevOpsGPT/assets/8676084/b30b1708-c281-4566-bdc8-15624dd54446) ![devops_2](https://github.com/kuafuai/DevOpsGPT/assets/8676084/4bbc0143-b393-4c87-a20d-1717fd4cbcfb) ![devops_3](https://github.com/kuafuai/DevOpsGPT/assets/8676084/6f5f49d5-4587-4617-a9c5-deb28afeb783) [devopsGPT_docker_run_out.txt](https://github.com/kuafuai/DevOpsGPT/files/13269628/devopsGPT_docker_run_out.txt)
booboosui commented 2023-11-06 21:10:30 -05:00 (Migrated from github.com)

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 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 2023-11-06 22:02:27 -05:00 (Migrated from github.com)

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.

> 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 2023-11-09 20:10:30 -05:00 (Migrated from github.com)

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.

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.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
kuafuai/DevOpsGPT#121
No description provided.