Skip to content

Commit

Permalink
Make tag fetching when preparing providers optional. (#25236)
Browse files Browse the repository at this point in the history
* Make tag fetching when preparing providers optional.

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.

* Update dev/provider_packages/prepare_provider_packages.py

Co-authored-by: Josh Fell <[email protected]>

Co-authored-by: Josh Fell <[email protected]>
(cherry picked from commit 1aaf206)
  • Loading branch information
potiuk committed Aug 4, 2022
1 parent 36f691e commit 3fedad0
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 @@ -731,10 +731,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 3fedad0

Please sign in to comment.