From 63753dc97ef5b8ee7b760c9a8d4ad8b54efd27ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C5=A1a=20Tomi=C4=87?= Date: Fri, 3 Jan 2025 12:49:11 +0100 Subject: [PATCH] fix(release-controller): remove suppression of stdout and stderr in Git commands (#1172) --- release-controller/git_repo.py | 18 ------------------ scripts/host-os-release-notes.py | 6 ------ 2 files changed, 24 deletions(-) diff --git a/release-controller/git_repo.py b/release-controller/git_repo.py index 6b5d45619..b4429fe27 100644 --- a/release-controller/git_repo.py +++ b/release-controller/git_repo.py @@ -71,8 +71,6 @@ def ensure_branches(self, branches: list[str]): subprocess.check_call( ["git", "checkout", branch], cwd=self.dir, - stdout=subprocess.DEVNULL, - stderr=subprocess.DEVNULL, ) except subprocess.CalledProcessError: print("Branch {} does not exist".format(branch)) @@ -80,8 +78,6 @@ def ensure_branches(self, branches: list[str]): subprocess.check_call( ["git", "checkout", self.main_branch], cwd=self.dir, - stdout=subprocess.DEVNULL, - stderr=subprocess.DEVNULL, ) def show(self, obj: str) -> Commit | None: @@ -146,14 +142,10 @@ def fetch(self): subprocess.check_call( ["git", "fetch"], cwd=self.dir, - stdout=subprocess.DEVNULL, - stderr=subprocess.DEVNULL, ) subprocess.check_call( ["git", "reset", "--hard", f"origin/{self.main_branch}"], cwd=self.dir, - stdout=subprocess.DEVNULL, - stderr=subprocess.DEVNULL, ) else: os.makedirs(self.dir, exist_ok=True) @@ -164,8 +156,6 @@ def fetch(self): self.repo, self.dir, ], - stdout=subprocess.DEVNULL, - stderr=subprocess.DEVNULL, ) subprocess.check_call( [ @@ -173,8 +163,6 @@ def fetch(self): "fetch", "--all", ], - stdout=subprocess.DEVNULL, - stderr=subprocess.DEVNULL, cwd=self.dir, ) @@ -397,8 +385,6 @@ def push_release_tags(repo: GitRepo, release: Release): "origin", f"{v.version}:refs/remotes/origin/{v.version}-commit", ], - stdout=subprocess.DEVNULL, - stderr=subprocess.DEVNULL, cwd=repo.dir, ) tag = version_name(release.rc_name, v.name) @@ -410,8 +396,6 @@ def push_release_tags(repo: GitRepo, release: Release): v.version, "-f", ], - stdout=subprocess.DEVNULL, - stderr=subprocess.DEVNULL, cwd=repo.dir, ) tag_version = ( @@ -441,8 +425,6 @@ def push_release_tags(repo: GitRepo, release: Release): tag, "-f", ], - stdout=subprocess.DEVNULL, - stderr=subprocess.DEVNULL, cwd=repo.dir, ) diff --git a/scripts/host-os-release-notes.py b/scripts/host-os-release-notes.py index 1ac6a5c0c..2f30f58fb 100644 --- a/scripts/host-os-release-notes.py +++ b/scripts/host-os-release-notes.py @@ -334,15 +334,11 @@ def main(): subprocess.check_call( ["git", "fetch"], cwd=ic_repo_path, - stdout=subprocess.DEVNULL, - stderr=subprocess.DEVNULL, ) print("Resetting HEAD to latest origin/master.") subprocess.check_call( ["git", "reset", "--hard", "origin/master"], cwd=ic_repo_path, - stdout=subprocess.DEVNULL, - stderr=subprocess.DEVNULL, ) else: print("Cloning IC repo to {}".format(ic_repo_path)) @@ -353,8 +349,6 @@ def main(): "https://github.com/dfinity/ic.git", ic_repo_path, ], - stdout=subprocess.DEVNULL, - stderr=subprocess.DEVNULL, ) if last_commit == "":