Skip to content

Commit 2198b6a

Browse files
committed
fix importerror due do previous customization
1 parent efd42b3 commit 2198b6a

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

tests/ci/version_helper.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@
44
from pathlib import Path
55
from typing import Any, Dict, Iterable, List, Literal, Optional, Set, Tuple, Union
66

7-
from pr_info import PRInfo # grype scan needs to know the PR number
7+
try:
8+
# grype scan needs to know the PR number
9+
# But non-grype jobs might be missing dependencies
10+
from pr_info import PRInfo
11+
except ImportError:
12+
PRInfo = None
813

914
from git_helper import TWEAK, Git, get_tags, git_runner, removeprefix, VersionType
1015

@@ -540,10 +545,11 @@ def main():
540545
update_cmake_version(version)
541546

542547
# grype scan needs to know the PR number
543-
pr_info = PRInfo()
544-
print(f"PR_NUMBER={pr_info.number}")
545-
if args.export:
546-
print(f"export PR_NUMBER")
548+
if PRInfo:
549+
pr_info = PRInfo()
550+
print(f"PR_NUMBER={pr_info.number}")
551+
if args.export:
552+
print(f"export PR_NUMBER")
547553

548554
for k, v in version.as_dict().items():
549555
name = f"CLICKHOUSE_VERSION_{k.upper()}"

0 commit comments

Comments
 (0)