Skip to content

Commit c9a3f87

Browse files
authored
chore(idx): don't gitignore ci/src/artifacts (#4039)
This edits the `.gitignore` to only ignore `artifacts` in the top-level directory. Otherwise, directories like `ci/src/artifacts` are ignored by git. This also formats some Python files that are now taken into account by the formatting checks (were previously git ignored).
1 parent 87f0431 commit c9a3f87

File tree

3 files changed

+4
-10
lines changed

3 files changed

+4
-10
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ cpp/**/infogetty.o
8888
cpp/**/network_info.o
8989

9090
# Various build artifacts
91-
artifacts
91+
/artifacts
9292
**/build
9393
**/build-tmp
9494
**/build-out

ci/src/artifacts/rclone_download.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ def local_repo(self):
6565
return self._local_repo
6666

6767
def _merge_base(self, merge_base) -> str:
68-
6968
self._git_fetch_branch(merge_base)
7069
return self.local_repo.merge_base(merge_base, self.local_repo.head.commit)
7170

ci/src/artifacts/rclone_upload.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,7 @@ def _upload(self, local_path, remote_subdir, other_options=[]):
5252

5353
for i in range(MAX_RCLONE_ATTEMPTS):
5454
try:
55-
subprocess.check_output(
56-
cmd, stderr=subprocess.STDOUT, timeout=self.timeout
57-
)
55+
subprocess.check_output(cmd, stderr=subprocess.STDOUT, timeout=self.timeout)
5856
break
5957
except subprocess.CalledProcessError as e:
6058
# stop-gap solution to IDX-2477
@@ -65,9 +63,7 @@ def _upload(self, local_path, remote_subdir, other_options=[]):
6563
e.output,
6664
e,
6765
)
68-
logging.warning(
69-
"Tried to modify a file that already exists. Failing open, see IDX-2477"
70-
)
66+
logging.warning("Tried to modify a file that already exists. Failing open, see IDX-2477")
7167
break
7268
logging.warning(
7369
"rclone failed (%d) with exception: %s\n%s",
@@ -151,8 +147,7 @@ def main():
151147
version = args.version or os.environ.get("CI_COMMIT_SHA")
152148
if not version:
153149
logging.error(
154-
"Cannot determine version string either from --version nor "
155-
"from CI_COMMIT_SHA environment variable"
150+
"Cannot determine version string either from --version nor " "from CI_COMMIT_SHA environment variable"
156151
)
157152

158153
rclone.upload_artifacts(local_path, args.remote_subdir, version)

0 commit comments

Comments
 (0)