Skip to content
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

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 this issue Nov 6, 2023 · 3 comments

Comments

@liruixue
Copy link

liruixue commented Nov 6, 2023

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
Copy link
Collaborator

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
Copy link
Author

liruixue commented Nov 7, 2023

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
Copy link
Author

liruixue commented Nov 10, 2023

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 up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants