Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid checking outdated branches during manifest update #4867

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/manifests_workflow/input_manifests.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,16 @@ def update(
with TemporaryDirectory(keep=keep, chdir=True) as work_dir:
logging.info(f"Checking out components into {work_dir.name}")

# check out and build #main, 1.x, etc.
branches = sorted(min_klass.branches())
outdated_branches = ["1.0", "1.1", "1.2"]

# check out and build #main, 1.x, etc.
# ignore branches that are outdated and not maintained anymore
# ex: 1.0 failed due to certain dependencies not available anymore: https://github.com/avast/gradle-docker-compose-plugin/issues/446
all_branches = sorted(min_klass.branches())
branches = [b for b in all_branches if not any(b.startswith(o) for o in outdated_branches)]
logging.info(f"Checking {self.name} {branches} branches")
logging.info(f"Ignoring {self.name} {sorted(set(all_branches) - set(branches))} branches as they are outdated")

for branch in branches:
min_component_klass = min_klass.checkout(
path=os.path.join(work_dir.name, self.name.replace(" ", ""), branch),
Expand Down
Loading