Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

deployment: Reinitialize spawned process in loop to clear stderr #924

Merged
merged 1 commit into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions flecs/modules/deployments/src/types/deployment_compose.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ auto compose_t::do_download_app(std::shared_ptr<apps::app_t> app, std::optional<
auto pull_process = process_t{};
auto pull_attempts = 3;
while (pull_attempts-- > 0) {
pull_process = process_t{};
pull_process.stdin(compose_json.dump());
const auto res = pull_process.spawnp("docker-compose", "-p", project_name, "-f", "-", "pull");
if (res != 0) {
Expand Down
1 change: 1 addition & 0 deletions flecs/modules/deployments/src/types/deployment_docker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,7 @@ auto docker_t::do_download_app(std::shared_ptr<apps::app_t> app, std::optional<T
auto pull_process = process_t{};
auto pull_attempts = 3;
while (pull_attempts-- > 0) {
pull_process = process_t{};
pull_process.spawnp("docker", "pull", app->manifest()->image_with_tag());
pull_process.wait(true, true);
if (pull_process.exit_code() == 0) {
Expand Down
Loading