)]}'
{"stx/dockerfiles/stx-pkgbuilder.Dockerfile":[{"author":{"_account_id":28410,"name":"Scott Little","email":"scott.little@windriver.com","username":"slittle1"},"change_message_id":"78da2e1d6be7dd992332d23a31ede913a13e0143","unresolved":true,"context_lines":[{"line_number":43,"context_line":"        pip3 install Flask \u0026\u0026 \\"},{"line_number":44,"context_line":"        sudo sbuild-adduser root"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"COPY stx/toCOPY/pkgbuilder/app.py /opt/"},{"line_number":47,"context_line":"COPY stx/toCOPY/pkgbuilder/debbuilder.py /opt/"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"WORKDIR /opt"},{"line_number":50,"context_line":"CMD [\"python3\", \"app.py\"]"}],"source_content_type":"text/x-dockerfile","patch_set":1,"id":"17c4a71a_95588f01","line":47,"range":{"start_line":46,"start_character":0,"end_line":47,"end_character":46},"updated":"2021-08-12 19:35:49.000000000","message":"Where are these files?   They aren\u0027t included in this update.  Does this update depend on on another?","commit_id":"a7f63abeb418065e1e4df19a903a6f72ff373635"},{"author":{"_account_id":32562,"name":"hqbai","display_name":"Haiqing Bai","email":"haiqing.bai@windriver.com","username":"hbai"},"change_message_id":"076f689c6b1870e96e83cb6db8fa6012c2c2e127","unresolved":true,"context_lines":[{"line_number":43,"context_line":"        pip3 install Flask \u0026\u0026 \\"},{"line_number":44,"context_line":"        sudo sbuild-adduser root"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"COPY stx/toCOPY/pkgbuilder/app.py /opt/"},{"line_number":47,"context_line":"COPY stx/toCOPY/pkgbuilder/debbuilder.py /opt/"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"WORKDIR /opt"},{"line_number":50,"context_line":"CMD [\"python3\", \"app.py\"]"}],"source_content_type":"text/x-dockerfile","patch_set":1,"id":"a1730228_bfdb6a22","line":47,"range":{"start_line":46,"start_character":0,"end_line":47,"end_character":46},"in_reply_to":"17c4a71a_95588f01","updated":"2021-08-16 08:06:19.000000000","message":"Yes, this update is focus on the Dockerfile only. Since these python source code are related with tox, pylint and flake8 checking, I plan to submit these two files soon. Except the two python source files, there are no other depends for this update.","commit_id":"a7f63abeb418065e1e4df19a903a6f72ff373635"},{"author":{"_account_id":24,"name":"Chuck Short","email":"charles.short@windriver.com","username":"zulcss"},"change_message_id":"e38ed80ce5b014c974d7c8b99eead30767895888","unresolved":true,"context_lines":[{"line_number":14,"context_line":"#"},{"line_number":15,"context_line":"FROM debian:bullseye"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"ADD stx/toCOPY/pkgbuilder/update_repo /usr/local/bin/"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"RUN echo \"deb-src http://deb.debian.org/debian bullseye main\" \u003e\u003e /etc/apt/sources.list"},{"line_number":20,"context_line":"# Download required dependencies by mirror/build processes."}],"source_content_type":"text/x-dockerfile","patch_set":4,"id":"74f3c6f5_2576a86e","line":17,"updated":"2021-08-24 13:14:48.000000000","message":"This seems to be missing in this gerrit review?","commit_id":"9df3140029e71ba7f8594d1096193d9ec057a66f"},{"author":{"_account_id":31683,"name":"Davlet Panech","email":"davlet.panech@windriver.com","username":"dpanech"},"change_message_id":"d1107832a8d8d011c92ebe173167b3c3b93ca26a","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#"},{"line_number":15,"context_line":"FROM debian:bullseye"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"ADD stx/toCOPY/pkgbuilder/update_repo /usr/local/bin/"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"RUN echo \"deb-src http://deb.debian.org/debian bullseye main\" \u003e\u003e /etc/apt/sources.list"},{"line_number":20,"context_line":"# Download required dependencies by mirror/build processes."}],"source_content_type":"text/x-dockerfile","patch_set":4,"id":"6720476a_08d6997a","line":17,"in_reply_to":"214720f0_32de216d","updated":"2021-09-17 16:30:27.000000000","message":"Done","commit_id":"9df3140029e71ba7f8594d1096193d9ec057a66f"},{"author":{"_account_id":32562,"name":"hqbai","display_name":"Haiqing Bai","email":"haiqing.bai@windriver.com","username":"hbai"},"change_message_id":"31b83addc5f866afb0b96953e46a08627cfac015","unresolved":true,"context_lines":[{"line_number":14,"context_line":"#"},{"line_number":15,"context_line":"FROM debian:bullseye"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"ADD stx/toCOPY/pkgbuilder/update_repo /usr/local/bin/"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"RUN echo \"deb-src http://deb.debian.org/debian bullseye main\" \u003e\u003e /etc/apt/sources.list"},{"line_number":20,"context_line":"# Download required dependencies by mirror/build processes."}],"source_content_type":"text/x-dockerfile","patch_set":4,"id":"958c49e6_ea1506fe","line":17,"in_reply_to":"74f3c6f5_2576a86e","updated":"2021-09-02 03:09:54.000000000","message":"Since the aptly/pulp local build repo will be configured to pkgbuilder later, this will be removed.","commit_id":"9df3140029e71ba7f8594d1096193d9ec057a66f"},{"author":{"_account_id":31683,"name":"Davlet Panech","email":"davlet.panech@windriver.com","username":"dpanech"},"change_message_id":"815287d6d807b566b552cf4bedd0f11b0faca23b","unresolved":true,"context_lines":[{"line_number":14,"context_line":"#"},{"line_number":15,"context_line":"FROM debian:bullseye"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"ADD stx/toCOPY/pkgbuilder/update_repo /usr/local/bin/"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"RUN echo \"deb-src http://deb.debian.org/debian bullseye main\" \u003e\u003e /etc/apt/sources.list"},{"line_number":20,"context_line":"# Download required dependencies by mirror/build processes."}],"source_content_type":"text/x-dockerfile","patch_set":4,"id":"bf630a87_922e6451","line":17,"in_reply_to":"958c49e6_ea1506fe","updated":"2021-09-03 14:56:02.000000000","message":"Sorry I don\u0027t understand. The file stx/toCOPY/pkgbuilder/update_repo doesn\u0027t exist in this gerrit commit.","commit_id":"9df3140029e71ba7f8594d1096193d9ec057a66f"},{"author":{"_account_id":32562,"name":"hqbai","display_name":"Haiqing Bai","email":"haiqing.bai@windriver.com","username":"hbai"},"change_message_id":"07683a182f3b47044b8382971975919497571298","unresolved":true,"context_lines":[{"line_number":14,"context_line":"#"},{"line_number":15,"context_line":"FROM debian:bullseye"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"ADD stx/toCOPY/pkgbuilder/update_repo /usr/local/bin/"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"RUN echo \"deb-src http://deb.debian.org/debian bullseye main\" \u003e\u003e /etc/apt/sources.list"},{"line_number":20,"context_line":"# Download required dependencies by mirror/build processes."}],"source_content_type":"text/x-dockerfile","patch_set":4,"id":"214720f0_32de216d","line":17,"in_reply_to":"bf630a87_922e6451","updated":"2021-09-07 16:20:02.000000000","message":"Sorry, the story is: before \u0027aptly\u0027 and \u0027pulp\u0027 are ready, the post hook script \u0027update_repo\u0027 is used to copy these fresh building .deb into the local repo and refresh the repo meta for the build engine to resolve dependency.  Now when each building done, the .debs will be submitted to local aptly repo and the building engine takes the aptly repo with config item \u0027 --extra-repository\u003d\u003cthe local aptly repo\u003e\u0027 in \u0027/etc/sbuild/sbuild.conf\u0027 by defauly, so the \u0027update_repo\u0027 hook script can be dropped.","commit_id":"9df3140029e71ba7f8594d1096193d9ec057a66f"}],"stx/toCOPY/pkgbuilder/app.py":[{"author":{"_account_id":15435,"name":"Al Bailey","email":"albailey1974@gmail.com","username":"albailey"},"change_message_id":"6f21547d04dbb7ae0d05a6ebae3929c368681ea4","unresolved":true,"context_lines":[{"line_number":14,"context_line":"# Copyright (C) 2021 Wind River Systems,Inc"},{"line_number":15,"context_line":"#"},{"line_number":16,"context_line":"from debbuilder import Debbuilder"},{"line_number":17,"context_line":"from flask import Flask"},{"line_number":18,"context_line":"from flask import jsonify"},{"line_number":19,"context_line":"from flask import request"},{"line_number":20,"context_line":"import logging"}],"source_content_type":"text/x-python","patch_set":3,"id":"c5dd6c03_6e4ef060","line":17,"updated":"2021-08-19 13:09:34.000000000","message":"From Zuul\nstx/toCOPY/pkgbuilder/app.py:16:0: E0401: Unable to import \u0027debbuilder\u0027 (import-error)\nstx/toCOPY/pkgbuilder/app.py:17:0: E0401: Unable to import \u0027flask\u0027 (import-error)\nstx/toCOPY/pkgbuilder/app.py:18:0: E0401: Unable to import \u0027flask\u0027 (import-error)\nstx/toCOPY/pkgbuilder/app.py:19:0: E0401: Unable to import \u0027flask\u0027 (import-error)\n\nthis means you need to update test-requirements.txt and add flask\n\nIn tox.ini the pylint is set to \u003c 2.5\ntherefore you might want to add this entry to test-requirements.txt \nastroid \u003c\u003d 2.2.5\n\nThe version of astroid affects how pylint runs.  Certain checks get skipped or processed differently depending on the version of astroid.  By adding this entry, I believe your local tox and the zuul tox will have a more similar env.","commit_id":"a263145ff97117db15ddf59a8bb28abdb28ea93e"},{"author":{"_account_id":32562,"name":"hqbai","display_name":"Haiqing Bai","email":"haiqing.bai@windriver.com","username":"hbai"},"change_message_id":"ddda7dcd0865782b0d2dc653ee574ddd51c1848f","unresolved":false,"context_lines":[{"line_number":14,"context_line":"# Copyright (C) 2021 Wind River Systems,Inc"},{"line_number":15,"context_line":"#"},{"line_number":16,"context_line":"from debbuilder import Debbuilder"},{"line_number":17,"context_line":"from flask import Flask"},{"line_number":18,"context_line":"from flask import jsonify"},{"line_number":19,"context_line":"from flask import request"},{"line_number":20,"context_line":"import logging"}],"source_content_type":"text/x-python","patch_set":3,"id":"b64201a6_0458a34f","line":17,"in_reply_to":"c5dd6c03_6e4ef060","updated":"2021-09-07 16:25:34.000000000","message":"Thank you so much and after added \u0027astroid \u003c\u003d 2.2.5\u0027, this is resolved.","commit_id":"a263145ff97117db15ddf59a8bb28abdb28ea93e"},{"author":{"_account_id":31683,"name":"Davlet Panech","email":"davlet.panech@windriver.com","username":"dpanech"},"change_message_id":"6ca3bb9ae3fc2a60c4b101a5da665ee61797669b","unresolved":true,"context_lines":[{"line_number":142,"context_line":""},{"line_number":143,"context_line":"if __name__ \u003d\u003d \u0027__main__\u0027:"},{"line_number":144,"context_line":"    app.debug \u003d True"},{"line_number":145,"context_line":"    handler \u003d logging.FileHandler(\u0027/localdisk/pkgbuilder.log\u0027,"},{"line_number":146,"context_line":"                                  encoding\u003d\u0027UTF-8\u0027)"},{"line_number":147,"context_line":"    logging.basicConfig(level\u003dlogging.DEBUG)"},{"line_number":148,"context_line":"    log_format \u003d logging.Formatter(\u0027pkgbuilder: %(levelname)s %(message)s\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9795db27_12b8ed3f","line":145,"updated":"2021-09-01 15:45:34.000000000","message":"Is this intentional? I guess this directory is mounted within the docker container, but it looks like it has now userid in it. Shouldn\u0027t this be under /localdisk/loadbuild/$USER or some such?","commit_id":"653006ce144bb197198ce0a4672b7b57b0360b04"},{"author":{"_account_id":31683,"name":"Davlet Panech","email":"davlet.panech@windriver.com","username":"dpanech"},"change_message_id":"815287d6d807b566b552cf4bedd0f11b0faca23b","unresolved":false,"context_lines":[{"line_number":142,"context_line":""},{"line_number":143,"context_line":"if __name__ \u003d\u003d \u0027__main__\u0027:"},{"line_number":144,"context_line":"    app.debug \u003d True"},{"line_number":145,"context_line":"    handler \u003d logging.FileHandler(\u0027/localdisk/pkgbuilder.log\u0027,"},{"line_number":146,"context_line":"                                  encoding\u003d\u0027UTF-8\u0027)"},{"line_number":147,"context_line":"    logging.basicConfig(level\u003dlogging.DEBUG)"},{"line_number":148,"context_line":"    log_format \u003d logging.Formatter(\u0027pkgbuilder: %(levelname)s %(message)s\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"01ccdd8e_3ead334c","line":145,"in_reply_to":"31932f8c_c373c046","updated":"2021-09-03 14:56:02.000000000","message":"Done","commit_id":"653006ce144bb197198ce0a4672b7b57b0360b04"},{"author":{"_account_id":32562,"name":"hqbai","display_name":"Haiqing Bai","email":"haiqing.bai@windriver.com","username":"hbai"},"change_message_id":"31b83addc5f866afb0b96953e46a08627cfac015","unresolved":true,"context_lines":[{"line_number":142,"context_line":""},{"line_number":143,"context_line":"if __name__ \u003d\u003d \u0027__main__\u0027:"},{"line_number":144,"context_line":"    app.debug \u003d True"},{"line_number":145,"context_line":"    handler \u003d logging.FileHandler(\u0027/localdisk/pkgbuilder.log\u0027,"},{"line_number":146,"context_line":"                                  encoding\u003d\u0027UTF-8\u0027)"},{"line_number":147,"context_line":"    logging.basicConfig(level\u003dlogging.DEBUG)"},{"line_number":148,"context_line":"    log_format \u003d logging.Formatter(\u0027pkgbuilder: %(levelname)s %(message)s\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"31932f8c_c373c046","line":145,"in_reply_to":"7abd486b_e50168b6","updated":"2021-09-02 03:09:54.000000000","message":"Yes, the original log locates in the pkgbuilder\u0027s own fs, to check the log, must switch to container of pkgbuilder, so move this log to the shared fs and let user check it in builder container. Actually \"/localdisk\" here you see has the USER specific prefix on the real host during minikube mounts volume, it means each user\u0027s \"/localdisk\" has been isolated.","commit_id":"653006ce144bb197198ce0a4672b7b57b0360b04"},{"author":{"_account_id":31683,"name":"Davlet Panech","email":"davlet.panech@windriver.com","username":"dpanech"},"change_message_id":"52c7606713d1d5bab654e20c7da4f72b6831ab4e","unresolved":true,"context_lines":[{"line_number":142,"context_line":""},{"line_number":143,"context_line":"if __name__ \u003d\u003d \u0027__main__\u0027:"},{"line_number":144,"context_line":"    app.debug \u003d True"},{"line_number":145,"context_line":"    handler \u003d logging.FileHandler(\u0027/localdisk/pkgbuilder.log\u0027,"},{"line_number":146,"context_line":"                                  encoding\u003d\u0027UTF-8\u0027)"},{"line_number":147,"context_line":"    logging.basicConfig(level\u003dlogging.DEBUG)"},{"line_number":148,"context_line":"    log_format \u003d logging.Formatter(\u0027pkgbuilder: %(levelname)s %(message)s\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"7abd486b_e50168b6","line":145,"in_reply_to":"9795db27_12b8ed3f","updated":"2021-09-01 16:53:59.000000000","message":"If user-specific directories are not yet supported, please create a task in storyboard.","commit_id":"653006ce144bb197198ce0a4672b7b57b0360b04"}],"stx/toCOPY/pkgbuilder/debbuilder.py":[{"author":{"_account_id":32562,"name":"hqbai","display_name":"Haiqing Bai","email":"haiqing.bai@windriver.com","username":"hbai"},"change_message_id":"951e52718c5f8dba28b3fae1ec399cc26e736f39","unresolved":true,"context_lines":[{"line_number":15,"context_line":"import os"},{"line_number":16,"context_line":"import signal"},{"line_number":17,"context_line":"import subprocess"},{"line_number":18,"context_line":"import shutil"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"BULLSEYE_DEFAULT_REPO \u003d \u0027http://ftp.us.debian.org/debian/bullseye \u0027"},{"line_number":21,"context_line":"BUILD_ROOT \u003d \u0027/localdisk/loadbuild/\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"646057cb_0447d1f4","line":18,"in_reply_to":"d0f36394_ad9874b6","updated":"2021-08-19 02:04:16.000000000","message":"\u003e pep8: H306: imports not in alphabetical order (subprocess, shutil)\n\nPlease fix.","commit_id":"44b47904e5b9e3a6f187f0eb8804e09507182d1b"},{"author":{"_account_id":28410,"name":"Scott Little","email":"scott.little@windriver.com","username":"slittle1"},"change_message_id":"8096dfd69a885a2329b4e06c8e6f7e44f48e4cc6","unresolved":true,"context_lines":[{"line_number":24,"context_line":"DEBDIST \u003d \u0027bullseye\u0027"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"class Debbuilder:"},{"line_number":28,"context_line":"    def __init__(self, mode, logger):"},{"line_number":29,"context_line":"        # currently two engines:sbuild,obs-build default:sbuild"},{"line_number":30,"context_line":"        self._repo \u003d BULLSEYE_DEFAULT_REPO"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f5ce955_cb95e333","line":27,"range":{"start_line":27,"start_character":3,"end_line":27,"end_character":17},"updated":"2021-08-26 16:44:35.000000000","message":"Please add comments describing what the class does.  How is it to be used?  \n\nDoes each user/project need an independent instance of the class? Or does the one instance manage all user/project?  I don\u0027t see any data structures to support the later.\n\nCan more than one task be in flight within a user/project context?  Are they queued?  Or will it reject new tasks till the current one is complete?\n\nIs chroot creation intended to be \u0027just another task\u0027 that runs in the background?  Or should it block until completed?\n\nYou need a mechanism to clean up completed tasks, i.e. \u0027wait\u0027\n\nYou  need a task status check method. Still running, or completed?  If complete, what\u0027s it\u0027s exit status/result.","commit_id":"a263145ff97117db15ddf59a8bb28abdb28ea93e"},{"author":{"_account_id":32562,"name":"hqbai","display_name":"Haiqing Bai","email":"haiqing.bai@windriver.com","username":"hbai"},"change_message_id":"31b83addc5f866afb0b96953e46a08627cfac015","unresolved":true,"context_lines":[{"line_number":24,"context_line":"DEBDIST \u003d \u0027bullseye\u0027"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"class Debbuilder:"},{"line_number":28,"context_line":"    def __init__(self, mode, logger):"},{"line_number":29,"context_line":"        # currently two engines:sbuild,obs-build default:sbuild"},{"line_number":30,"context_line":"        self._repo \u003d BULLSEYE_DEFAULT_REPO"}],"source_content_type":"text/x-python","patch_set":3,"id":"e3e5432e_d17b66a2","line":27,"range":{"start_line":27,"start_character":3,"end_line":27,"end_character":17},"in_reply_to":"3f5ce955_cb95e333","updated":"2021-09-02 03:09:54.000000000","message":"Thanks. The clean_env function has been added in patchset 6 to do the clean tasks.\nAnd plan to add below description to class debbuilder:\n\n    \"Debbuilder querys/creates/saves/restores the schroot for sbuild\n    The default name of schroot is like \u0027\u003cDebian DIST\u003e-amd64-\u003cUSER\u003e\u0027\n    it takes \u0027user\u0027 as suffix, per user per schroot and the multiple\n    building instances launched on the same schroot will be queued.\n\n    Debuilder starts/stops the building instances for user, clean\n    the scene and handle the user\u0027s building abort/terminate commands\n    to building instances, the whole building log will be displayed\n    on front end console which includeing the detailed building results\n    \n    Debbuiler allows to customize the build configuration for the sbuild\n    engine by updating debbuilder.conf\n\n\n    Debuilder is created by python3 application \u0027app.py\u0027 which runs in\n    python Flask server to provide Restful APIs to offload the building tasks.\"\n\nBut seems I made wrong place to add the function description in pathset 6, python\u0027s rule is under function name, I will update this with other modifications needed. So could you please help to review the pathset 6, thanks","commit_id":"a263145ff97117db15ddf59a8bb28abdb28ea93e"},{"author":{"_account_id":32562,"name":"hqbai","display_name":"Haiqing Bai","email":"haiqing.bai@windriver.com","username":"hbai"},"change_message_id":"07683a182f3b47044b8382971975919497571298","unresolved":true,"context_lines":[{"line_number":24,"context_line":"DEBDIST \u003d \u0027bullseye\u0027"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"class Debbuilder:"},{"line_number":28,"context_line":"    def __init__(self, mode, logger):"},{"line_number":29,"context_line":"        # currently two engines:sbuild,obs-build default:sbuild"},{"line_number":30,"context_line":"        self._repo \u003d BULLSEYE_DEFAULT_REPO"}],"source_content_type":"text/x-python","patch_set":3,"id":"49088f51_e1d24b14","line":27,"range":{"start_line":27,"start_character":3,"end_line":27,"end_character":17},"in_reply_to":"d187d2cd_eac0dd9b","updated":"2021-09-07 16:20:02.000000000","message":"ok, I think the reason you can not see the whole picture is that here is the service and APIs and actually the other part logic is in cgcs-root/build-pkgs. Let me try to provide more detailed answer. do you know whether this web page to allow inserting each reply to your review comments line? If it can, could you pleases tell me how to do that, thanks.\n\n\u003d\u003d\u003d\nScott Little\nAug 27\n---\nPlease add comments describing what the class does.  How is it to be used?\n[hbai] ok, the below class description will be added:\n\n\"Debbuilder is created by app.py which is the flask service of pkgbuilder container.\n It is memory resident and only have one instance in pkgbuilder. \n It queries, creates, saves and restores the schroot for sbuild. For the first building\n packages, the schroot named \u0027\u003cDebian distribution\u003e-amd64-\u003cUSER\u003e\u0027 will be created on the\n shared volume \u0027/localdisk\u0027, the schroot index file \u0027/etc/chroot.d/\u003cx\u003e\u0027 will be save on\n the volume for the purpose of persistence too. This schroot will be restored if the \n container stopped and start again.\n    \n Debbuilder also receives the building tasks from builder container and helps to launch the \n Debian sbuild instance on the USER specific schroot. Though the multiple sbuild instances \n on the same schroot can be queued, pkgbuilder is just offloading container and USER\u0027 \n building commands are launched from the container, asynchronous mode is not accepted for \n package building.\n\n Based on above functions, the initial working follow like:\n\n                  stx builder                  stx pkgbuilder\n                      \n                      |      (RESTful APIS)        ENTRYPOINT [“/usr/bin/tini”] (zombie reaper)  \n           start      |   addChroot(USER\u003dx)           |\n      build-pkgs -p A | \u003c----------------------------\u003e| check, if schroot \u0027bullseye- \n                      |  reply:exists or creating     | amd64-$USER\u0027 non-exist, creating \n                      |                               | and share the log to builder\n                      |                               |   \n   monitor the schroot|    addTask(USER\u003dx)            |  \n   log, if ok,continue| \u003c----------------------------\u003e| Launch the building instance on \n   to add building task    reply: launched            |  schroot\n                      |                               | \u0027bullseye-amd64-$USER\u0027, share the\n  display and monitor |                               |  building log to builder\n  the building log,   |                               |\n  if building done    |   cleanEnv                    |\n  success or fail     | -----------------------------\u003e| \u0027sbuild\u0027 is mainly perl script which \n                      |                               |  calls gcc/fakeroot/dh-utils/dpkg- \n                      |                               |  build etc, the recorded parent\n                      |                               |  process calls terminate firstly, \n                      |                               |  then wait\nCTRL+c during building|                               |  \n                      |                               |  call \u0027sbuild-abort\u0027 and cleanEnv\n                      |                               |\n                      |                               |  ‘tini’ is the PID 1 process of \n                      |                               |   pkgbuilder and takes responsible \n                      |                               |   for these zombie which reparents \n                      |                               |   to ‘tini’ in pkgbuilder\n\n[hbai] I think the reason why can not see the whole picture of the working flowing is that\nhere is only service and Restful APIs, but actually the other part of logic is in the build-pkgs.                                 \n \n---\nDoes each user/project need an independent instance of the class? Or does the one instance manage all user/project?  I don\u0027t see any data structures to support the later.\n[hbai] Like above description, Debbuilder is the housekeeper with one instance, it has the same lifecycle to the flask service. \n\n---\nCan more than one task be in flight within a user/project context?  Are they queued?  Or will it reject new tasks till the current one is complete?\n[hbai] Currently only per user per schroot supported, actually for sbuild, multiple tasks on the same schroot can be queued. But we do not want to take async mode to let user to back to check the log to know whether the building is done or not, success or fail after launch building,\nwe prefer to show all process clearly in front of users, so the second task can\u0027t be launched if the first one is running. \n\n---\nIs chroot creation intended to be \u0027just another task\u0027 that runs in the background?  Or should it block until completed?\n[hbai] Like the above working flow shows, the existed schroot is the premise condition of building task, so it blocks the creating of build task until schroot creating completed.  \n\n---\nYou need a mechanism to clean up completed tasks, i.e. \u0027wait\u0027\n[hbai] I have added cleanenv to do this after each building done. In additon. \u0027tini\u0027 is the specific \u0027init‘（with PID 1） process in docker container to take the responsibility of zombie reaper.\n\n---\nYou  need a task status check method. Still running, or completed?  If complete, what\u0027s it\u0027s exit status/result.\n[hbai] Since the chroot creating log and building log will be displayed one the console of builder, actually each status is clear to user. But one issue your team member raise is that when build multiple packages, even there are some packages fail to build, the build system will try to continue to build other packages instead of exit, this will flush the failed messages of the previous package on screen though the log is kept. I plan to add a command line options as \"--exit-on-fail\" for this.\n\n\nDavlet\n\u003d\u003d\u003d\u003d\nIn particular it\u0027s not clear how child processes are reaped w.r.t process cleaning. It looks like \"add_task\" allows to start multiple sbuild\u0027s:\n\n1) add_task(): creates a sbuild process\n2) add_task(): creates a second build process\n3) when (1) exits it becomes a zombie.\n[hbai] As the simple working flow between builder and pkgbuiler, the 2) only happens after 1) completely done. And when each task done, clean_env will be called.\n\nAlso, the \"_state\" variable doesn\u0027t seem to change from \"works\" back to \"idle\". It gets set to \"works\" after the 1st call to add_task() and never changes.\n[hbai] sorry, this is really very puzzling, this does not means there is a state machine maintained, and it is just a \"keep-alive\" Restful APIs used before to check the flask service of pkgbuilder is ok. I think I can drop this now.  \n\nProcess reaping, states and zombie management implementation in this class doesn\u0027t make sense to me.\n[hbai] Thank you and Scott\u0027s great effort on this patient review. Thank you to continue to give your valuable comments after the above working flow and zombie handle I explained.","commit_id":"a263145ff97117db15ddf59a8bb28abdb28ea93e"},{"author":{"_account_id":31683,"name":"Davlet Panech","email":"davlet.panech@windriver.com","username":"dpanech"},"change_message_id":"815287d6d807b566b552cf4bedd0f11b0faca23b","unresolved":true,"context_lines":[{"line_number":24,"context_line":"DEBDIST \u003d \u0027bullseye\u0027"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"class Debbuilder:"},{"line_number":28,"context_line":"    def __init__(self, mode, logger):"},{"line_number":29,"context_line":"        # currently two engines:sbuild,obs-build default:sbuild"},{"line_number":30,"context_line":"        self._repo \u003d BULLSEYE_DEFAULT_REPO"}],"source_content_type":"text/x-python","patch_set":3,"id":"d187d2cd_eac0dd9b","line":27,"range":{"start_line":27,"start_character":3,"end_line":27,"end_character":17},"in_reply_to":"e3e5432e_d17b66a2","updated":"2021-09-03 14:56:02.000000000","message":"Please respond all of Scott\u0027s comments above.\n\nIn particular it\u0027s not clear how child processes are reaped w.r.t process cleaning. It looks like \"add_task\" allows to start multiple sbuild\u0027s:\n\n1) add_task(): creates a sbuild process\n2) add_task(): creates a second build process\n3) when (1) exits it becomes a zombie.\n\nAlso, the \"_state\" variable doesn\u0027t seem to change from \"works\" back to \"idle\". It gets set to \"works\" after the 1st call to add_task() and never changes.\n\nProcess reaping, states and zombie management implementation in this class doesn\u0027t make sense to me.","commit_id":"a263145ff97117db15ddf59a8bb28abdb28ea93e"},{"author":{"_account_id":31683,"name":"Davlet Panech","email":"davlet.panech@windriver.com","username":"dpanech"},"change_message_id":"ddc6c88e48c73b2e226f46abf4effec45ae8d4be","unresolved":true,"context_lines":[{"line_number":118,"context_line":"        log_file \u003d os.path.join(user_chroot, \u0027createChroot.log\u0027)"},{"line_number":119,"context_line":"        chroot_cmd \u003d \u0027\u0027.join([\u0027sbuild-createchroot --chroot-suffix\u003d-\u0027, user,"},{"line_number":120,"context_line":"                              \u0027 --include\u003deatmydata \u0027, DEBDIST, \u0027 \u0027,"},{"line_number":121,"context_line":"                              chroot_path, \u0027 \u003e \u0027, log_file])"},{"line_number":122,"context_line":"        self.logger.debug(\"Chroot creating command:%s\" % chroot_cmd)"},{"line_number":123,"context_line":"        subprocess.Popen(chroot_cmd, shell\u003dTrue)"},{"line_number":124,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"bddbf052_7548a8c9","line":121,"updated":"2021-08-18 14:21:19.000000000","message":"Suggest to redirect STDERR to log file too","commit_id":"a263145ff97117db15ddf59a8bb28abdb28ea93e"},{"author":{"_account_id":31683,"name":"Davlet Panech","email":"davlet.panech@windriver.com","username":"dpanech"},"change_message_id":"50164fd939b931a8d0c37179ba383b1793b86005","unresolved":false,"context_lines":[{"line_number":118,"context_line":"        log_file \u003d os.path.join(user_chroot, \u0027createChroot.log\u0027)"},{"line_number":119,"context_line":"        chroot_cmd \u003d \u0027\u0027.join([\u0027sbuild-createchroot --chroot-suffix\u003d-\u0027, user,"},{"line_number":120,"context_line":"                              \u0027 --include\u003deatmydata \u0027, DEBDIST, \u0027 \u0027,"},{"line_number":121,"context_line":"                              chroot_path, \u0027 \u003e \u0027, log_file])"},{"line_number":122,"context_line":"        self.logger.debug(\"Chroot creating command:%s\" % chroot_cmd)"},{"line_number":123,"context_line":"        subprocess.Popen(chroot_cmd, shell\u003dTrue)"},{"line_number":124,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"f542ecb3_25c0f857","line":121,"in_reply_to":"bddbf052_7548a8c9","updated":"2021-08-26 15:21:05.000000000","message":"Done","commit_id":"a263145ff97117db15ddf59a8bb28abdb28ea93e"},{"author":{"_account_id":31683,"name":"Davlet Panech","email":"davlet.panech@windriver.com","username":"dpanech"},"change_message_id":"ddc6c88e48c73b2e226f46abf4effec45ae8d4be","unresolved":true,"context_lines":[{"line_number":120,"context_line":"                              \u0027 --include\u003deatmydata \u0027, DEBDIST, \u0027 \u0027,"},{"line_number":121,"context_line":"                              chroot_path, \u0027 \u003e \u0027, log_file])"},{"line_number":122,"context_line":"        self.logger.debug(\"Chroot creating command:%s\" % chroot_cmd)"},{"line_number":123,"context_line":"        subprocess.Popen(chroot_cmd, shell\u003dTrue)"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        response[\u0027status\u0027] \u003d \u0027success\u0027"},{"line_number":126,"context_line":"        response[\u0027msg\u0027] \u003d log_file"}],"source_content_type":"text/x-python","patch_set":3,"id":"808fcd32_a4ef9236","line":123,"updated":"2021-08-18 14:21:19.000000000","message":"I think this will create a zombie process, because nothing calls .wait() on it. We probably need some kind of process reaper method that\u0027s invoked for past processes that have exited.","commit_id":"a263145ff97117db15ddf59a8bb28abdb28ea93e"},{"author":{"_account_id":31683,"name":"Davlet Panech","email":"davlet.panech@windriver.com","username":"dpanech"},"change_message_id":"815287d6d807b566b552cf4bedd0f11b0faca23b","unresolved":true,"context_lines":[{"line_number":120,"context_line":"                              \u0027 --include\u003deatmydata \u0027, DEBDIST, \u0027 \u0027,"},{"line_number":121,"context_line":"                              chroot_path, \u0027 \u003e \u0027, log_file])"},{"line_number":122,"context_line":"        self.logger.debug(\"Chroot creating command:%s\" % chroot_cmd)"},{"line_number":123,"context_line":"        subprocess.Popen(chroot_cmd, shell\u003dTrue)"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        response[\u0027status\u0027] \u003d \u0027success\u0027"},{"line_number":126,"context_line":"        response[\u0027msg\u0027] \u003d log_file"}],"source_content_type":"text/x-python","patch_set":3,"id":"c4c6d8fa_53411a8a","line":123,"in_reply_to":"0c24065e_780d4a2d","updated":"2021-09-03 14:56:02.000000000","message":"I don\u0027t see what reaps the old processes. Did you mean \"clean_env\" ? But it terminates all children, not just reaps zombies. Is \"clean_env\" meant to be called every time before \"add_task()\" ?\n\nI would suggest you describe the design of this class in more detail at the top, including state transitions and what each method does. I think there are multiple holes in the logic here.","commit_id":"a263145ff97117db15ddf59a8bb28abdb28ea93e"},{"author":{"_account_id":28410,"name":"Scott Little","email":"scott.little@windriver.com","username":"slittle1"},"change_message_id":"8096dfd69a885a2329b4e06c8e6f7e44f48e4cc6","unresolved":true,"context_lines":[{"line_number":120,"context_line":"                              \u0027 --include\u003deatmydata \u0027, DEBDIST, \u0027 \u0027,"},{"line_number":121,"context_line":"                              chroot_path, \u0027 \u003e \u0027, log_file])"},{"line_number":122,"context_line":"        self.logger.debug(\"Chroot creating command:%s\" % chroot_cmd)"},{"line_number":123,"context_line":"        subprocess.Popen(chroot_cmd, shell\u003dTrue)"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        response[\u0027status\u0027] \u003d \u0027success\u0027"},{"line_number":126,"context_line":"        response[\u0027msg\u0027] \u003d log_file"}],"source_content_type":"text/x-python","patch_set":3,"id":"2bda7853_c150e62b","line":123,"in_reply_to":"808fcd32_a4ef9236","updated":"2021-08-26 16:44:35.000000000","message":"good catch\n\nyes, he needs to wait ... or substitute subprocess.call which does the wait for you.","commit_id":"a263145ff97117db15ddf59a8bb28abdb28ea93e"},{"author":{"_account_id":32562,"name":"hqbai","display_name":"Haiqing Bai","email":"haiqing.bai@windriver.com","username":"hbai"},"change_message_id":"31b83addc5f866afb0b96953e46a08627cfac015","unresolved":true,"context_lines":[{"line_number":120,"context_line":"                              \u0027 --include\u003deatmydata \u0027, DEBDIST, \u0027 \u0027,"},{"line_number":121,"context_line":"                              chroot_path, \u0027 \u003e \u0027, log_file])"},{"line_number":122,"context_line":"        self.logger.debug(\"Chroot creating command:%s\" % chroot_cmd)"},{"line_number":123,"context_line":"        subprocess.Popen(chroot_cmd, shell\u003dTrue)"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        response[\u0027status\u0027] \u003d \u0027success\u0027"},{"line_number":126,"context_line":"        response[\u0027msg\u0027] \u003d log_file"}],"source_content_type":"text/x-python","patch_set":3,"id":"0c24065e_780d4a2d","line":123,"in_reply_to":"808fcd32_a4ef9236","updated":"2021-09-02 03:09:54.000000000","message":"self.schroot_processes[] and self.sbuild_processes[] will be used to collect all the processes and a RESTful APIs is provided to be as the process reaper to clean these processes. Thanks","commit_id":"a263145ff97117db15ddf59a8bb28abdb28ea93e"},{"author":{"_account_id":32562,"name":"hqbai","display_name":"Haiqing Bai","email":"haiqing.bai@windriver.com","username":"hbai"},"change_message_id":"07683a182f3b47044b8382971975919497571298","unresolved":true,"context_lines":[{"line_number":120,"context_line":"                              \u0027 --include\u003deatmydata \u0027, DEBDIST, \u0027 \u0027,"},{"line_number":121,"context_line":"                              chroot_path, \u0027 \u003e \u0027, log_file])"},{"line_number":122,"context_line":"        self.logger.debug(\"Chroot creating command:%s\" % chroot_cmd)"},{"line_number":123,"context_line":"        subprocess.Popen(chroot_cmd, shell\u003dTrue)"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        response[\u0027status\u0027] \u003d \u0027success\u0027"},{"line_number":126,"context_line":"        response[\u0027msg\u0027] \u003d log_file"}],"source_content_type":"text/x-python","patch_set":3,"id":"ae56deb3_68c2e89c","line":123,"in_reply_to":"c4c6d8fa_53411a8a","updated":"2021-09-07 16:20:02.000000000","message":"Thanks. I draw a simple working flow above in the answer to Scott\u0027s comments. \u0027addTask\u0027 can not be called during the first one is still running, the builder monitors the building log shared by pkgbuilder, when the first task done(success or fail), clean_env will be called to\ndo terminate and wait, then the user has the chance to launch the second task.\nMy tests shows that even I runs \u0027sbuild\u0027 on command line in docker, after building, there are still zombie exist, so I added \u0027tini\u0027 in docker image and set it the entrypoint of pkgbuilder,\n\u0027tini\u0027 is the specific \u0027init\u0027 process with PID 1 which can be the zombie reaper, my tests confirmed that there are no zombie now after building done with success or fail result, even ctrl+c to terminate all during building.","commit_id":"a263145ff97117db15ddf59a8bb28abdb28ea93e"},{"author":{"_account_id":31683,"name":"Davlet Panech","email":"davlet.panech@windriver.com","username":"dpanech"},"change_message_id":"ddc6c88e48c73b2e226f46abf4effec45ae8d4be","unresolved":true,"context_lines":[{"line_number":221,"context_line":"        if not self.has_chroot(schroot):"},{"line_number":222,"context_line":"            self.logger.critical(\"No required chroot %s\" % schroot)"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"        os.killpg(os.getpgid(self.app.pid), signal.SIGTERM)"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"        response[\u0027status\u0027] \u003d \u0027success\u0027"},{"line_number":227,"context_line":"        response[\u0027msg\u0027] \u003d \u0027Stop current building\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"eb3f0ade_642e4a68","line":224,"updated":"2021-08-18 14:21:19.000000000","message":"Zombie?","commit_id":"a263145ff97117db15ddf59a8bb28abdb28ea93e"},{"author":{"_account_id":31683,"name":"Davlet Panech","email":"davlet.panech@windriver.com","username":"dpanech"},"change_message_id":"815287d6d807b566b552cf4bedd0f11b0faca23b","unresolved":false,"context_lines":[{"line_number":221,"context_line":"        if not self.has_chroot(schroot):"},{"line_number":222,"context_line":"            self.logger.critical(\"No required chroot %s\" % schroot)"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"        os.killpg(os.getpgid(self.app.pid), signal.SIGTERM)"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"        response[\u0027status\u0027] \u003d \u0027success\u0027"},{"line_number":227,"context_line":"        response[\u0027msg\u0027] \u003d \u0027Stop current building\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"0d548180_d612d071","line":224,"in_reply_to":"ada6f8ed_00f3e43b","updated":"2021-09-03 14:56:02.000000000","message":"Done","commit_id":"a263145ff97117db15ddf59a8bb28abdb28ea93e"},{"author":{"_account_id":31683,"name":"Davlet Panech","email":"davlet.panech@windriver.com","username":"dpanech"},"change_message_id":"50164fd939b931a8d0c37179ba383b1793b86005","unresolved":false,"context_lines":[{"line_number":221,"context_line":"        if not self.has_chroot(schroot):"},{"line_number":222,"context_line":"            self.logger.critical(\"No required chroot %s\" % schroot)"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"        os.killpg(os.getpgid(self.app.pid), signal.SIGTERM)"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"        response[\u0027status\u0027] \u003d \u0027success\u0027"},{"line_number":227,"context_line":"        response[\u0027msg\u0027] \u003d \u0027Stop current building\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"e31cf78f_2a388ebd","line":224,"in_reply_to":"eb3f0ade_642e4a68","updated":"2021-08-26 15:21:05.000000000","message":"Done","commit_id":"a263145ff97117db15ddf59a8bb28abdb28ea93e"},{"author":{"_account_id":32562,"name":"hqbai","display_name":"Haiqing Bai","email":"haiqing.bai@windriver.com","username":"hbai"},"change_message_id":"31b83addc5f866afb0b96953e46a08627cfac015","unresolved":true,"context_lines":[{"line_number":221,"context_line":"        if not self.has_chroot(schroot):"},{"line_number":222,"context_line":"            self.logger.critical(\"No required chroot %s\" % schroot)"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"        os.killpg(os.getpgid(self.app.pid), signal.SIGTERM)"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"        response[\u0027status\u0027] \u003d \u0027success\u0027"},{"line_number":227,"context_line":"        response[\u0027msg\u0027] \u003d \u0027Stop current building\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"ada6f8ed_00f3e43b","line":224,"in_reply_to":"eb3f0ade_642e4a68","updated":"2021-09-02 03:09:54.000000000","message":"This will be removed and \"sbuild-abort\" and the clean env functions will be called.","commit_id":"a263145ff97117db15ddf59a8bb28abdb28ea93e"},{"author":{"_account_id":24,"name":"Chuck Short","email":"charles.short@windriver.com","username":"zulcss"},"change_message_id":"e38ed80ce5b014c974d7c8b99eead30767895888","unresolved":true,"context_lines":[{"line_number":16,"context_line":"import shutil"},{"line_number":17,"context_line":"import subprocess"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"BULLSEYE_DEFAULT_REPO \u003d \u0027http://ftp.us.debian.org/debian/bullseye \u0027"},{"line_number":20,"context_line":"BUILD_ROOT \u003d \u0027/localdisk/loadbuild/\u0027"},{"line_number":21,"context_line":"UPDATE_REPO \u003d \u0027\\\u0027/usr/local/bin/update_repo \u0027"},{"line_number":22,"context_line":"BUILD_ENGINE \u003d \u0027sbuild\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"b056b96b_eb3f3170","line":19,"updated":"2021-08-24 13:14:48.000000000","message":"Can we use \"deb.debian.org\", I think hard coded a debian mirror would not be a good idea here.","commit_id":"9df3140029e71ba7f8594d1096193d9ec057a66f"},{"author":{"_account_id":31683,"name":"Davlet Panech","email":"davlet.panech@windriver.com","username":"dpanech"},"change_message_id":"d1107832a8d8d011c92ebe173167b3c3b93ca26a","unresolved":false,"context_lines":[{"line_number":16,"context_line":"import shutil"},{"line_number":17,"context_line":"import subprocess"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"BULLSEYE_DEFAULT_REPO \u003d \u0027http://ftp.us.debian.org/debian/bullseye \u0027"},{"line_number":20,"context_line":"BUILD_ROOT \u003d \u0027/localdisk/loadbuild/\u0027"},{"line_number":21,"context_line":"UPDATE_REPO \u003d \u0027\\\u0027/usr/local/bin/update_repo \u0027"},{"line_number":22,"context_line":"BUILD_ENGINE \u003d \u0027sbuild\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"b122b5ac_cc45f71c","line":19,"in_reply_to":"992dadf1_1e7396e1","updated":"2021-09-17 16:30:27.000000000","message":"Done","commit_id":"9df3140029e71ba7f8594d1096193d9ec057a66f"},{"author":{"_account_id":32562,"name":"hqbai","display_name":"Haiqing Bai","email":"haiqing.bai@windriver.com","username":"hbai"},"change_message_id":"31b83addc5f866afb0b96953e46a08627cfac015","unresolved":true,"context_lines":[{"line_number":16,"context_line":"import shutil"},{"line_number":17,"context_line":"import subprocess"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"BULLSEYE_DEFAULT_REPO \u003d \u0027http://ftp.us.debian.org/debian/bullseye \u0027"},{"line_number":20,"context_line":"BUILD_ROOT \u003d \u0027/localdisk/loadbuild/\u0027"},{"line_number":21,"context_line":"UPDATE_REPO \u003d \u0027\\\u0027/usr/local/bin/update_repo \u0027"},{"line_number":22,"context_line":"BUILD_ENGINE \u003d \u0027sbuild\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"992dadf1_1e7396e1","line":19,"in_reply_to":"b056b96b_eb3f3170","updated":"2021-09-02 03:09:54.000000000","message":"Thanks and I checked again and found that actually \"BULLSEYE_DEFAULT_REPO\" is just assigned to self._repo, but I do not use the \"self._repo\" anywhere, I can remove this directly.","commit_id":"9df3140029e71ba7f8594d1096193d9ec057a66f"},{"author":{"_account_id":31683,"name":"Davlet Panech","email":"davlet.panech@windriver.com","username":"dpanech"},"change_message_id":"50164fd939b931a8d0c37179ba383b1793b86005","unresolved":true,"context_lines":[{"line_number":167,"context_line":"        response[\u0027msg\u0027] \u003d \u0027Task of package building launched\u0027"},{"line_number":168,"context_line":"        return response"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"    def clean_env(self, user, owner):"},{"line_number":171,"context_line":"        response \u003d {}"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"        if owner in [\u0027chroot\u0027, \u0027all\u0027]:"}],"source_content_type":"text/x-python","patch_set":5,"id":"7bc4a69a_b45efe72","line":170,"updated":"2021-08-26 15:21:05.000000000","message":"This seems to terminate and clean up child processes -- ok.\n\nBut what about the tasks that were started *and finished* in the past? Don\u0027t they need to be \"wait\"-ed on and deleted from process list periodically? I\u0027m not sure how this works in pyhthon, but in other languages, like C, we would call wait() on exited children upon receiving a SIGCHLD signal, or on a timer, or from another thread.","commit_id":"b86e7b0b13a87cca6cd1a195a68f21e973d50365"},{"author":{"_account_id":31683,"name":"Davlet Panech","email":"davlet.panech@windriver.com","username":"dpanech"},"change_message_id":"d1107832a8d8d011c92ebe173167b3c3b93ca26a","unresolved":false,"context_lines":[{"line_number":167,"context_line":"        response[\u0027msg\u0027] \u003d \u0027Task of package building launched\u0027"},{"line_number":168,"context_line":"        return response"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"    def clean_env(self, user, owner):"},{"line_number":171,"context_line":"        response \u003d {}"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"        if owner in [\u0027chroot\u0027, \u0027all\u0027]:"}],"source_content_type":"text/x-python","patch_set":5,"id":"d80b0b21_1f2f6973","line":170,"in_reply_to":"6ca18b53_528a1255","updated":"2021-09-17 16:30:27.000000000","message":"Done","commit_id":"b86e7b0b13a87cca6cd1a195a68f21e973d50365"},{"author":{"_account_id":31683,"name":"Davlet Panech","email":"davlet.panech@windriver.com","username":"dpanech"},"change_message_id":"8ee433fbbe2418da9e576c0c2a6b5d11c532a7c1","unresolved":true,"context_lines":[{"line_number":167,"context_line":"        response[\u0027msg\u0027] \u003d \u0027Task of package building launched\u0027"},{"line_number":168,"context_line":"        return response"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"    def clean_env(self, user, owner):"},{"line_number":171,"context_line":"        response \u003d {}"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"        if owner in [\u0027chroot\u0027, \u0027all\u0027]:"}],"source_content_type":"text/x-python","patch_set":5,"id":"fdfdf91d_3dd0c668","line":170,"in_reply_to":"7bc4a69a_b45efe72","updated":"2021-08-26 15:39:16.000000000","message":"I think this function can still leave zombies behind:\n* add_task calls \"sbuild\" or whatever\n* sbuild creates some child processes (gcc etc)\n* we call clean_env(), sbuild gets killed\n* since app.py is the entry point in Dockerfile, that grandchild (gcc etc) will get re-paranted to app.py\n* \u003d\u003d\u003e zombie\n\nis this possible?","commit_id":"b86e7b0b13a87cca6cd1a195a68f21e973d50365"},{"author":{"_account_id":32562,"name":"hqbai","display_name":"Haiqing Bai","email":"haiqing.bai@windriver.com","username":"hbai"},"change_message_id":"31b83addc5f866afb0b96953e46a08627cfac015","unresolved":true,"context_lines":[{"line_number":167,"context_line":"        response[\u0027msg\u0027] \u003d \u0027Task of package building launched\u0027"},{"line_number":168,"context_line":"        return response"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"    def clean_env(self, user, owner):"},{"line_number":171,"context_line":"        response \u003d {}"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"        if owner in [\u0027chroot\u0027, \u0027all\u0027]:"}],"source_content_type":"text/x-python","patch_set":5,"id":"6ca18b53_528a1255","line":170,"in_reply_to":"fdfdf91d_3dd0c668","updated":"2021-09-02 03:09:54.000000000","message":"yes, the PID 1 is the entrypoint which can\u0027t be the process reaping zombies and performing signal forwarding. I plan to add \u0027tini\u0027 to do this. The tests shows that \u0027tini\u0027 and the clean_env function almost resolved the zombie issue perfectly.","commit_id":"b86e7b0b13a87cca6cd1a195a68f21e973d50365"},{"author":{"_account_id":28410,"name":"Scott Little","email":"scott.little@windriver.com","username":"slittle1"},"change_message_id":"88e8bb967573a7a2b2bc966866acc426ad71cafc","unresolved":true,"context_lines":[{"line_number":64,"context_line":"        schroots \u003d os.popen(\u0027schroot -l\u0027)"},{"line_number":65,"context_line":"        for line in schroots:"},{"line_number":66,"context_line":"            if schroot in line.strip():"},{"line_number":67,"context_line":"                self.logger.info(\"Schroot %s exists\" % schroot)"},{"line_number":68,"context_line":"                return True"},{"line_number":69,"context_line":"        return False"},{"line_number":70,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"20d3867b_4443b197","line":67,"range":{"start_line":67,"start_character":34,"end_line":67,"end_character":41},"updated":"2021-09-09 20:04:40.000000000","message":"What is a schroot?  Why did you add the \u0027s\u0027 prefix on \u0027chroot\u0027 ?  If just in logs, maybe it\u0027s ok, but it also appears in some messages below.  The user might know what a chroot is, but what is an schroot?","commit_id":"653006ce144bb197198ce0a4672b7b57b0360b04"},{"author":{"_account_id":32562,"name":"hqbai","display_name":"Haiqing Bai","email":"haiqing.bai@windriver.com","username":"hbai"},"change_message_id":"c0dd9ca1bf3adf3830d7bd30d626b8459a9cd5d6","unresolved":true,"context_lines":[{"line_number":64,"context_line":"        schroots \u003d os.popen(\u0027schroot -l\u0027)"},{"line_number":65,"context_line":"        for line in schroots:"},{"line_number":66,"context_line":"            if schroot in line.strip():"},{"line_number":67,"context_line":"                self.logger.info(\"Schroot %s exists\" % schroot)"},{"line_number":68,"context_line":"                return True"},{"line_number":69,"context_line":"        return False"},{"line_number":70,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"03833a38_261bb1f6","line":67,"range":{"start_line":67,"start_character":34,"end_line":67,"end_character":41},"in_reply_to":"16003ef0_27bbede9","updated":"2021-09-24 07:06:12.000000000","message":"thanks Scott, I have updated all to \u0027chroot\u0027 to easy to understand.","commit_id":"653006ce144bb197198ce0a4672b7b57b0360b04"},{"author":{"_account_id":32562,"name":"hqbai","display_name":"Haiqing Bai","email":"haiqing.bai@windriver.com","username":"hbai"},"change_message_id":"7b37730b6530301a81556cc7c386cbd3e9a8bd91","unresolved":true,"context_lines":[{"line_number":64,"context_line":"        schroots \u003d os.popen(\u0027schroot -l\u0027)"},{"line_number":65,"context_line":"        for line in schroots:"},{"line_number":66,"context_line":"            if schroot in line.strip():"},{"line_number":67,"context_line":"                self.logger.info(\"Schroot %s exists\" % schroot)"},{"line_number":68,"context_line":"                return True"},{"line_number":69,"context_line":"        return False"},{"line_number":70,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"46d39ce4_761e5bda","line":67,"range":{"start_line":67,"start_character":34,"end_line":67,"end_character":41},"in_reply_to":"20d3867b_4443b197","updated":"2021-09-10 01:29:16.000000000","message":"Yes, I\u0027ve also swayed on this once, schroot is just debian tool to allow users to execute commands or interactive shells in different chroots, you can refer \n to \"https://wiki.debian.org/Schroot\". The entity is still chroot, if \u0027chroot\u0027 is more appropriate， I can update back to ‘chroot’.","commit_id":"653006ce144bb197198ce0a4672b7b57b0360b04"},{"author":{"_account_id":28410,"name":"Scott Little","email":"scott.little@windriver.com","username":"slittle1"},"change_message_id":"1a844300901541d2690a46fd5cb023fcdcb73713","unresolved":true,"context_lines":[{"line_number":64,"context_line":"        schroots \u003d os.popen(\u0027schroot -l\u0027)"},{"line_number":65,"context_line":"        for line in schroots:"},{"line_number":66,"context_line":"            if schroot in line.strip():"},{"line_number":67,"context_line":"                self.logger.info(\"Schroot %s exists\" % schroot)"},{"line_number":68,"context_line":"                return True"},{"line_number":69,"context_line":"        return False"},{"line_number":70,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"16003ef0_27bbede9","line":67,"range":{"start_line":67,"start_character":34,"end_line":67,"end_character":41},"in_reply_to":"46d39ce4_761e5bda","updated":"2021-09-23 14:49:01.000000000","message":"Ok, it seems to be a known thing in the debian world.  You can leave it.","commit_id":"653006ce144bb197198ce0a4672b7b57b0360b04"},{"author":{"_account_id":28410,"name":"Scott Little","email":"scott.little@windriver.com","username":"slittle1"},"change_message_id":"88e8bb967573a7a2b2bc966866acc426ad71cafc","unresolved":true,"context_lines":[{"line_number":182,"context_line":"        self.sbuild_processes.setdefault(user, []).append(p)"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"        response[\u0027status\u0027] \u003d \u0027success\u0027"},{"line_number":185,"context_line":"        response[\u0027msg\u0027] \u003d \u0027Task of package building launched\u0027"},{"line_number":186,"context_line":"        return response"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"    def clean_env(self, user, owner):"}],"source_content_type":"text/x-python","patch_set":6,"id":"5ea548d4_15a8100d","line":185,"range":{"start_line":185,"start_character":27,"end_line":185,"end_character":60},"updated":"2021-09-09 20:04:40.000000000","message":"Package building task launched","commit_id":"653006ce144bb197198ce0a4672b7b57b0360b04"},{"author":{"_account_id":32562,"name":"hqbai","display_name":"Haiqing Bai","email":"haiqing.bai@windriver.com","username":"hbai"},"change_message_id":"7b37730b6530301a81556cc7c386cbd3e9a8bd91","unresolved":true,"context_lines":[{"line_number":182,"context_line":"        self.sbuild_processes.setdefault(user, []).append(p)"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"        response[\u0027status\u0027] \u003d \u0027success\u0027"},{"line_number":185,"context_line":"        response[\u0027msg\u0027] \u003d \u0027Task of package building launched\u0027"},{"line_number":186,"context_line":"        return response"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"    def clean_env(self, user, owner):"}],"source_content_type":"text/x-python","patch_set":6,"id":"9db88f18_13dc7c8a","line":185,"range":{"start_line":185,"start_character":27,"end_line":185,"end_character":60},"in_reply_to":"5ea548d4_15a8100d","updated":"2021-09-10 01:29:16.000000000","message":"Ack","commit_id":"653006ce144bb197198ce0a4672b7b57b0360b04"},{"author":{"_account_id":32562,"name":"hqbai","display_name":"Haiqing Bai","email":"haiqing.bai@windriver.com","username":"hbai"},"change_message_id":"c0dd9ca1bf3adf3830d7bd30d626b8459a9cd5d6","unresolved":false,"context_lines":[{"line_number":182,"context_line":"        self.sbuild_processes.setdefault(user, []).append(p)"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"        response[\u0027status\u0027] \u003d \u0027success\u0027"},{"line_number":185,"context_line":"        response[\u0027msg\u0027] \u003d \u0027Task of package building launched\u0027"},{"line_number":186,"context_line":"        return response"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"    def clean_env(self, user, owner):"}],"source_content_type":"text/x-python","patch_set":6,"id":"700aa650_a2f585dc","line":185,"range":{"start_line":185,"start_character":27,"end_line":185,"end_character":60},"in_reply_to":"9db88f18_13dc7c8a","updated":"2021-09-24 07:06:12.000000000","message":"Done","commit_id":"653006ce144bb197198ce0a4672b7b57b0360b04"},{"author":{"_account_id":28410,"name":"Scott Little","email":"scott.little@windriver.com","username":"slittle1"},"change_message_id":"e8da31313352bb6b130862588d2bc56314570127","unresolved":true,"context_lines":[{"line_number":185,"context_line":"        response[\u0027msg\u0027] \u003d \u0027Task of package building launched\u0027"},{"line_number":186,"context_line":"        return response"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"    def clean_env(self, user, owner):"},{"line_number":189,"context_line":"        response \u003d {}"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"        if owner in [\u0027chroot\u0027, \u0027all\u0027]:"},{"line_number":192,"context_line":"            if self.ctlog:"},{"line_number":193,"context_line":"                self.ctlog.close()"},{"line_number":194,"context_line":"            if self.schroot_processes and self.schroot_processes[user]:"},{"line_number":195,"context_line":"                for p in self.schroot_processes[user]:"},{"line_number":196,"context_line":"                    self.logger.debug(\"Terminate process of schroot creating\")"},{"line_number":197,"context_line":"                    p.terminate()"},{"line_number":198,"context_line":"                    p.wait()"},{"line_number":199,"context_line":"                del self.schroot_processes[user]"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"        if owner in [\u0027sbuild\u0027, \u0027all\u0027]:"},{"line_number":202,"context_line":"            if self.sbuild_processes and self.sbuild_processes[user]:"},{"line_number":203,"context_line":"                for p in self.sbuild_processes[user]:"},{"line_number":204,"context_line":"                    self.logger.debug(\"Terminate process of pkgbuilder\")"},{"line_number":205,"context_line":"                    p.terminate()"},{"line_number":206,"context_line":"                    p.wait()"},{"line_number":207,"context_line":"                del self.sbuild_processes[user]"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"        response[\u0027status\u0027] \u003d \u0027success\u0027"},{"line_number":210,"context_line":"        response[\u0027msg\u0027] \u003d \u0027Cleaned the build env\u0027"},{"line_number":211,"context_line":"        return response"},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"    def stop_task(self, user):"},{"line_number":214,"context_line":"        response \u003d {}"}],"source_content_type":"text/x-python","patch_set":6,"id":"f00ad32a_53addf56","line":211,"range":{"start_line":188,"start_character":0,"end_line":211,"end_character":23},"updated":"2021-09-09 19:56:17.000000000","message":"So \u0027clean\u0027 just means terminate the process?  I don\u0027t see any actual cleanup in the sense of deleting files or directories.   At best this seems to be more of a \u0027kill\u0027 or \u0027abort\u0027 than a \u0027clean\u0027","commit_id":"653006ce144bb197198ce0a4672b7b57b0360b04"},{"author":{"_account_id":32562,"name":"hqbai","display_name":"Haiqing Bai","email":"haiqing.bai@windriver.com","username":"hbai"},"change_message_id":"c0dd9ca1bf3adf3830d7bd30d626b8459a9cd5d6","unresolved":false,"context_lines":[{"line_number":185,"context_line":"        response[\u0027msg\u0027] \u003d \u0027Task of package building launched\u0027"},{"line_number":186,"context_line":"        return response"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"    def clean_env(self, user, owner):"},{"line_number":189,"context_line":"        response \u003d {}"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"        if owner in [\u0027chroot\u0027, \u0027all\u0027]:"},{"line_number":192,"context_line":"            if self.ctlog:"},{"line_number":193,"context_line":"                self.ctlog.close()"},{"line_number":194,"context_line":"            if self.schroot_processes and self.schroot_processes[user]:"},{"line_number":195,"context_line":"                for p in self.schroot_processes[user]:"},{"line_number":196,"context_line":"                    self.logger.debug(\"Terminate process of schroot creating\")"},{"line_number":197,"context_line":"                    p.terminate()"},{"line_number":198,"context_line":"                    p.wait()"},{"line_number":199,"context_line":"                del self.schroot_processes[user]"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"        if owner in [\u0027sbuild\u0027, \u0027all\u0027]:"},{"line_number":202,"context_line":"            if self.sbuild_processes and self.sbuild_processes[user]:"},{"line_number":203,"context_line":"                for p in self.sbuild_processes[user]:"},{"line_number":204,"context_line":"                    self.logger.debug(\"Terminate process of pkgbuilder\")"},{"line_number":205,"context_line":"                    p.terminate()"},{"line_number":206,"context_line":"                    p.wait()"},{"line_number":207,"context_line":"                del self.sbuild_processes[user]"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"        response[\u0027status\u0027] \u003d \u0027success\u0027"},{"line_number":210,"context_line":"        response[\u0027msg\u0027] \u003d \u0027Cleaned the build env\u0027"},{"line_number":211,"context_line":"        return response"},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"    def stop_task(self, user):"},{"line_number":214,"context_line":"        response \u003d {}"}],"source_content_type":"text/x-python","patch_set":6,"id":"ea83fec7_91b2e9c6","line":211,"range":{"start_line":188,"start_character":0,"end_line":211,"end_character":23},"in_reply_to":"833edaa6_f83e51e8","updated":"2021-09-24 07:06:12.000000000","message":"Done","commit_id":"653006ce144bb197198ce0a4672b7b57b0360b04"},{"author":{"_account_id":32562,"name":"hqbai","display_name":"Haiqing Bai","email":"haiqing.bai@windriver.com","username":"hbai"},"change_message_id":"7b37730b6530301a81556cc7c386cbd3e9a8bd91","unresolved":true,"context_lines":[{"line_number":185,"context_line":"        response[\u0027msg\u0027] \u003d \u0027Task of package building launched\u0027"},{"line_number":186,"context_line":"        return response"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"    def clean_env(self, user, owner):"},{"line_number":189,"context_line":"        response \u003d {}"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"        if owner in [\u0027chroot\u0027, \u0027all\u0027]:"},{"line_number":192,"context_line":"            if self.ctlog:"},{"line_number":193,"context_line":"                self.ctlog.close()"},{"line_number":194,"context_line":"            if self.schroot_processes and self.schroot_processes[user]:"},{"line_number":195,"context_line":"                for p in self.schroot_processes[user]:"},{"line_number":196,"context_line":"                    self.logger.debug(\"Terminate process of schroot creating\")"},{"line_number":197,"context_line":"                    p.terminate()"},{"line_number":198,"context_line":"                    p.wait()"},{"line_number":199,"context_line":"                del self.schroot_processes[user]"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"        if owner in [\u0027sbuild\u0027, \u0027all\u0027]:"},{"line_number":202,"context_line":"            if self.sbuild_processes and self.sbuild_processes[user]:"},{"line_number":203,"context_line":"                for p in self.sbuild_processes[user]:"},{"line_number":204,"context_line":"                    self.logger.debug(\"Terminate process of pkgbuilder\")"},{"line_number":205,"context_line":"                    p.terminate()"},{"line_number":206,"context_line":"                    p.wait()"},{"line_number":207,"context_line":"                del self.sbuild_processes[user]"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"        response[\u0027status\u0027] \u003d \u0027success\u0027"},{"line_number":210,"context_line":"        response[\u0027msg\u0027] \u003d \u0027Cleaned the build env\u0027"},{"line_number":211,"context_line":"        return response"},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"    def stop_task(self, user):"},{"line_number":214,"context_line":"        response \u003d {}"}],"source_content_type":"text/x-python","patch_set":6,"id":"833edaa6_f83e51e8","line":211,"range":{"start_line":188,"start_character":0,"end_line":211,"end_character":23},"in_reply_to":"f00ad32a_53addf56","updated":"2021-09-10 01:29:16.000000000","message":"agree，\u0027clean’ is vague, here just invoke process \u0027terminate\u0027. Whether or not to delete these stuff on site are depends by the config item \u0027--purge\u003d[always|nerver|success]\u0027 of sbuild. Thanks.","commit_id":"653006ce144bb197198ce0a4672b7b57b0360b04"},{"author":{"_account_id":28410,"name":"Scott Little","email":"scott.little@windriver.com","username":"slittle1"},"change_message_id":"88e8bb967573a7a2b2bc966866acc426ad71cafc","unresolved":true,"context_lines":[{"line_number":227,"context_line":"        os.system(\u0027sbuild_abort\u0027)"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"        response[\u0027status\u0027] \u003d \u0027success\u0027"},{"line_number":230,"context_line":"        response[\u0027msg\u0027] \u003d \u0027Stop current building\u0027"},{"line_number":231,"context_line":"        return response"}],"source_content_type":"text/x-python","patch_set":6,"id":"024c2980_59be191e","line":230,"range":{"start_line":230,"start_character":27,"end_line":230,"end_character":48},"updated":"2021-09-09 20:04:40.000000000","message":"Stopped current build","commit_id":"653006ce144bb197198ce0a4672b7b57b0360b04"},{"author":{"_account_id":32562,"name":"hqbai","display_name":"Haiqing Bai","email":"haiqing.bai@windriver.com","username":"hbai"},"change_message_id":"7b37730b6530301a81556cc7c386cbd3e9a8bd91","unresolved":true,"context_lines":[{"line_number":227,"context_line":"        os.system(\u0027sbuild_abort\u0027)"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"        response[\u0027status\u0027] \u003d \u0027success\u0027"},{"line_number":230,"context_line":"        response[\u0027msg\u0027] \u003d \u0027Stop current building\u0027"},{"line_number":231,"context_line":"        return response"}],"source_content_type":"text/x-python","patch_set":6,"id":"4a34f8ca_c3a6505a","line":230,"range":{"start_line":230,"start_character":27,"end_line":230,"end_character":48},"in_reply_to":"024c2980_59be191e","updated":"2021-09-10 01:29:16.000000000","message":"Ack","commit_id":"653006ce144bb197198ce0a4672b7b57b0360b04"},{"author":{"_account_id":32562,"name":"hqbai","display_name":"Haiqing Bai","email":"haiqing.bai@windriver.com","username":"hbai"},"change_message_id":"c0dd9ca1bf3adf3830d7bd30d626b8459a9cd5d6","unresolved":false,"context_lines":[{"line_number":227,"context_line":"        os.system(\u0027sbuild_abort\u0027)"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"        response[\u0027status\u0027] \u003d \u0027success\u0027"},{"line_number":230,"context_line":"        response[\u0027msg\u0027] \u003d \u0027Stop current building\u0027"},{"line_number":231,"context_line":"        return response"}],"source_content_type":"text/x-python","patch_set":6,"id":"b49b790f_a66ff5f6","line":230,"range":{"start_line":230,"start_character":27,"end_line":230,"end_character":48},"in_reply_to":"4a34f8ca_c3a6505a","updated":"2021-09-24 07:06:12.000000000","message":"Done","commit_id":"653006ce144bb197198ce0a4672b7b57b0360b04"},{"author":{"_account_id":28410,"name":"Scott Little","email":"scott.little@windriver.com","username":"slittle1"},"change_message_id":"1a844300901541d2690a46fd5cb023fcdcb73713","unresolved":true,"context_lines":[{"line_number":182,"context_line":"        self.sbuild_processes.setdefault(user, []).append(p)"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"        response[\u0027status\u0027] \u003d \u0027success\u0027"},{"line_number":185,"context_line":"        response[\u0027msg\u0027] \u003d \u0027Task of package build launched\u0027"},{"line_number":186,"context_line":"        return response"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"    def kill_task(self, user, owner):"}],"source_content_type":"text/x-python","patch_set":7,"id":"e4c34319_91068f41","line":185,"range":{"start_line":185,"start_character":27,"end_line":185,"end_character":57},"updated":"2021-09-23 14:49:01.000000000","message":"sbuild package building task launched","commit_id":"af095fc040fba20d2d3b10ef38be43454bee6139"},{"author":{"_account_id":32562,"name":"hqbai","display_name":"Haiqing Bai","email":"haiqing.bai@windriver.com","username":"hbai"},"change_message_id":"c0dd9ca1bf3adf3830d7bd30d626b8459a9cd5d6","unresolved":false,"context_lines":[{"line_number":182,"context_line":"        self.sbuild_processes.setdefault(user, []).append(p)"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"        response[\u0027status\u0027] \u003d \u0027success\u0027"},{"line_number":185,"context_line":"        response[\u0027msg\u0027] \u003d \u0027Task of package build launched\u0027"},{"line_number":186,"context_line":"        return response"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"    def kill_task(self, user, owner):"}],"source_content_type":"text/x-python","patch_set":7,"id":"1031427c_aa4d93f4","line":185,"range":{"start_line":185,"start_character":27,"end_line":185,"end_character":57},"in_reply_to":"e4c34319_91068f41","updated":"2021-09-24 07:06:12.000000000","message":"Done","commit_id":"af095fc040fba20d2d3b10ef38be43454bee6139"},{"author":{"_account_id":28410,"name":"Scott Little","email":"scott.little@windriver.com","username":"slittle1"},"change_message_id":"1a844300901541d2690a46fd5cb023fcdcb73713","unresolved":true,"context_lines":[{"line_number":191,"context_line":"        if owner in [\u0027chroot\u0027, \u0027all\u0027]:"},{"line_number":192,"context_line":"            if self.ctlog:"},{"line_number":193,"context_line":"                self.ctlog.close()"},{"line_number":194,"context_line":"            if self.chroot_processes and self.chroot_processes[user]:"},{"line_number":195,"context_line":"                for p in self.chroot_processes[user]:"},{"line_number":196,"context_line":"                    self.logger.debug(\"Terminate process of chroot related\")"},{"line_number":197,"context_line":"                    p.terminate()"}],"source_content_type":"text/x-python","patch_set":7,"id":"15d4c84d_767da096","line":194,"range":{"start_line":194,"start_character":0,"end_line":194,"end_character":69},"updated":"2021-09-23 14:49:01.000000000","message":"question:   Should sbuild process terminate before chroot process?\n\nIt appears above that sbuild process can\u0027t be launched until chroot is up and running.  This suggests to me that sbuild should terminate first.","commit_id":"af095fc040fba20d2d3b10ef38be43454bee6139"},{"author":{"_account_id":32562,"name":"hqbai","display_name":"Haiqing Bai","email":"haiqing.bai@windriver.com","username":"hbai"},"change_message_id":"c0dd9ca1bf3adf3830d7bd30d626b8459a9cd5d6","unresolved":false,"context_lines":[{"line_number":191,"context_line":"        if owner in [\u0027chroot\u0027, \u0027all\u0027]:"},{"line_number":192,"context_line":"            if self.ctlog:"},{"line_number":193,"context_line":"                self.ctlog.close()"},{"line_number":194,"context_line":"            if self.chroot_processes and self.chroot_processes[user]:"},{"line_number":195,"context_line":"                for p in self.chroot_processes[user]:"},{"line_number":196,"context_line":"                    self.logger.debug(\"Terminate process of chroot related\")"},{"line_number":197,"context_line":"                    p.terminate()"}],"source_content_type":"text/x-python","patch_set":7,"id":"1f47239d_4b3a41a6","line":194,"range":{"start_line":194,"start_character":0,"end_line":194,"end_character":69},"in_reply_to":"15d4c84d_767da096","updated":"2021-09-24 07:06:12.000000000","message":"Done","commit_id":"af095fc040fba20d2d3b10ef38be43454bee6139"},{"author":{"_account_id":28410,"name":"Scott Little","email":"scott.little@windriver.com","username":"slittle1"},"change_message_id":"1a844300901541d2690a46fd5cb023fcdcb73713","unresolved":true,"context_lines":[{"line_number":193,"context_line":"                self.ctlog.close()"},{"line_number":194,"context_line":"            if self.chroot_processes and self.chroot_processes[user]:"},{"line_number":195,"context_line":"                for p in self.chroot_processes[user]:"},{"line_number":196,"context_line":"                    self.logger.debug(\"Terminate process of chroot related\")"},{"line_number":197,"context_line":"                    p.terminate()"},{"line_number":198,"context_line":"                    p.wait()"},{"line_number":199,"context_line":"                del self.chroot_processes[user]"}],"source_content_type":"text/x-python","patch_set":7,"id":"986ddb00_d668d8ba","line":196,"range":{"start_line":196,"start_character":39,"end_line":196,"end_character":74},"updated":"2021-09-23 14:49:01.000000000","message":"Terminating chroot process","commit_id":"af095fc040fba20d2d3b10ef38be43454bee6139"},{"author":{"_account_id":32562,"name":"hqbai","display_name":"Haiqing Bai","email":"haiqing.bai@windriver.com","username":"hbai"},"change_message_id":"c0dd9ca1bf3adf3830d7bd30d626b8459a9cd5d6","unresolved":false,"context_lines":[{"line_number":193,"context_line":"                self.ctlog.close()"},{"line_number":194,"context_line":"            if self.chroot_processes and self.chroot_processes[user]:"},{"line_number":195,"context_line":"                for p in self.chroot_processes[user]:"},{"line_number":196,"context_line":"                    self.logger.debug(\"Terminate process of chroot related\")"},{"line_number":197,"context_line":"                    p.terminate()"},{"line_number":198,"context_line":"                    p.wait()"},{"line_number":199,"context_line":"                del self.chroot_processes[user]"}],"source_content_type":"text/x-python","patch_set":7,"id":"c00cdb59_ce7ac560","line":196,"range":{"start_line":196,"start_character":39,"end_line":196,"end_character":74},"in_reply_to":"986ddb00_d668d8ba","updated":"2021-09-24 07:06:12.000000000","message":"Done","commit_id":"af095fc040fba20d2d3b10ef38be43454bee6139"},{"author":{"_account_id":28410,"name":"Scott Little","email":"scott.little@windriver.com","username":"slittle1"},"change_message_id":"1a844300901541d2690a46fd5cb023fcdcb73713","unresolved":true,"context_lines":[{"line_number":195,"context_line":"                for p in self.chroot_processes[user]:"},{"line_number":196,"context_line":"                    self.logger.debug(\"Terminate process of chroot related\")"},{"line_number":197,"context_line":"                    p.terminate()"},{"line_number":198,"context_line":"                    p.wait()"},{"line_number":199,"context_line":"                del self.chroot_processes[user]"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"        if owner in [\u0027sbuild\u0027, \u0027all\u0027]:"}],"source_content_type":"text/x-python","patch_set":7,"id":"5fbfc99d_c0000673","line":198,"range":{"start_line":198,"start_character":20,"end_line":198,"end_character":28},"updated":"2021-09-23 14:49:01.000000000","message":"after wait .... \nself.logger.debug(\"Chroot process terminated\")","commit_id":"af095fc040fba20d2d3b10ef38be43454bee6139"},{"author":{"_account_id":32562,"name":"hqbai","display_name":"Haiqing Bai","email":"haiqing.bai@windriver.com","username":"hbai"},"change_message_id":"c0dd9ca1bf3adf3830d7bd30d626b8459a9cd5d6","unresolved":false,"context_lines":[{"line_number":195,"context_line":"                for p in self.chroot_processes[user]:"},{"line_number":196,"context_line":"                    self.logger.debug(\"Terminate process of chroot related\")"},{"line_number":197,"context_line":"                    p.terminate()"},{"line_number":198,"context_line":"                    p.wait()"},{"line_number":199,"context_line":"                del self.chroot_processes[user]"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"        if owner in [\u0027sbuild\u0027, \u0027all\u0027]:"}],"source_content_type":"text/x-python","patch_set":7,"id":"3d4a2287_f04a2b21","line":198,"range":{"start_line":198,"start_character":20,"end_line":198,"end_character":28},"in_reply_to":"5fbfc99d_c0000673","updated":"2021-09-24 07:06:12.000000000","message":"Done","commit_id":"af095fc040fba20d2d3b10ef38be43454bee6139"},{"author":{"_account_id":28410,"name":"Scott Little","email":"scott.little@windriver.com","username":"slittle1"},"change_message_id":"1a844300901541d2690a46fd5cb023fcdcb73713","unresolved":true,"context_lines":[{"line_number":201,"context_line":"        if owner in [\u0027sbuild\u0027, \u0027all\u0027]:"},{"line_number":202,"context_line":"            if self.sbuild_processes and self.sbuild_processes[user]:"},{"line_number":203,"context_line":"                for p in self.sbuild_processes[user]:"},{"line_number":204,"context_line":"                    self.logger.debug(\"Terminate process of sbuild related\")"},{"line_number":205,"context_line":"                    p.terminate()"},{"line_number":206,"context_line":"                    p.wait()"},{"line_number":207,"context_line":"                del self.sbuild_processes[user]"}],"source_content_type":"text/x-python","patch_set":7,"id":"301721a9_bc327973","line":204,"range":{"start_line":204,"start_character":39,"end_line":204,"end_character":74},"updated":"2021-09-23 14:49:01.000000000","message":"Terminating package build process","commit_id":"af095fc040fba20d2d3b10ef38be43454bee6139"},{"author":{"_account_id":32562,"name":"hqbai","display_name":"Haiqing Bai","email":"haiqing.bai@windriver.com","username":"hbai"},"change_message_id":"c0dd9ca1bf3adf3830d7bd30d626b8459a9cd5d6","unresolved":false,"context_lines":[{"line_number":201,"context_line":"        if owner in [\u0027sbuild\u0027, \u0027all\u0027]:"},{"line_number":202,"context_line":"            if self.sbuild_processes and self.sbuild_processes[user]:"},{"line_number":203,"context_line":"                for p in self.sbuild_processes[user]:"},{"line_number":204,"context_line":"                    self.logger.debug(\"Terminate process of sbuild related\")"},{"line_number":205,"context_line":"                    p.terminate()"},{"line_number":206,"context_line":"                    p.wait()"},{"line_number":207,"context_line":"                del self.sbuild_processes[user]"}],"source_content_type":"text/x-python","patch_set":7,"id":"74d2755a_a2d85ce8","line":204,"range":{"start_line":204,"start_character":39,"end_line":204,"end_character":74},"in_reply_to":"301721a9_bc327973","updated":"2021-09-24 07:06:12.000000000","message":"Done","commit_id":"af095fc040fba20d2d3b10ef38be43454bee6139"},{"author":{"_account_id":28410,"name":"Scott Little","email":"scott.little@windriver.com","username":"slittle1"},"change_message_id":"1a844300901541d2690a46fd5cb023fcdcb73713","unresolved":true,"context_lines":[{"line_number":203,"context_line":"                for p in self.sbuild_processes[user]:"},{"line_number":204,"context_line":"                    self.logger.debug(\"Terminate process of sbuild related\")"},{"line_number":205,"context_line":"                    p.terminate()"},{"line_number":206,"context_line":"                    p.wait()"},{"line_number":207,"context_line":"                del self.sbuild_processes[user]"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"        response[\u0027status\u0027] \u003d \u0027success\u0027"}],"source_content_type":"text/x-python","patch_set":7,"id":"3fc08881_090da199","line":206,"range":{"start_line":206,"start_character":9,"end_line":206,"end_character":28},"updated":"2021-09-23 14:49:01.000000000","message":"after wait .... \nself.logger.debug(\"Package build process terminated\")","commit_id":"af095fc040fba20d2d3b10ef38be43454bee6139"},{"author":{"_account_id":32562,"name":"hqbai","display_name":"Haiqing Bai","email":"haiqing.bai@windriver.com","username":"hbai"},"change_message_id":"c0dd9ca1bf3adf3830d7bd30d626b8459a9cd5d6","unresolved":false,"context_lines":[{"line_number":203,"context_line":"                for p in self.sbuild_processes[user]:"},{"line_number":204,"context_line":"                    self.logger.debug(\"Terminate process of sbuild related\")"},{"line_number":205,"context_line":"                    p.terminate()"},{"line_number":206,"context_line":"                    p.wait()"},{"line_number":207,"context_line":"                del self.sbuild_processes[user]"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"        response[\u0027status\u0027] \u003d \u0027success\u0027"}],"source_content_type":"text/x-python","patch_set":7,"id":"0516bfd7_57cf474b","line":206,"range":{"start_line":206,"start_character":9,"end_line":206,"end_character":28},"in_reply_to":"3fc08881_090da199","updated":"2021-09-24 07:06:12.000000000","message":"Done","commit_id":"af095fc040fba20d2d3b10ef38be43454bee6139"}]}
