Skip to content

Commit

Permalink
Make tag fetching when preparing providers optional.
Browse files Browse the repository at this point in the history
Tag fetching is only needed to make sure we do not generate
packages that have already been generated. However this is just
an optimisation for CI runs. There is no harm if the tags are
not refreshed and we generate the package again locally.

Tag fetching might faile in various cases - for example when
you are in corporate environment and require specific certificates
to be available or when you are working from a worktree.

After this change fetching tag will produce warning when there is
an error and instruction on how you can fetch tags manually.
  • Loading branch information
potiuk committed Jul 22, 2022
1 parent be7cb1e commit e2977cb
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions dev/provider_packages/prepare_provider_packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -710,10 +710,16 @@ def make_sure_remote_apache_exists_and_fetch(git_update: bool, verbose: bool):
fetch_command.append("--unshallow")
if verbose:
console.print(f"Running command: '{' '.join(fetch_command)}'")
subprocess.check_call(
fetch_command,
stderr=subprocess.DEVNULL,
)
try:
subprocess.check_call(
fetch_command,
)
except subprocess.CalledProcessError as e:
console.print(
'[yellow]Error when fetching tags from remote. Your tags might not be refreshed. '
f'please refresh the tags manually via {" ".join(fetch_command)}\n'
)
console.print(f'[yellow]The error was: {e}')


def get_git_log_command(
Expand Down

0 comments on commit e2977cb

Please sign in to comment.