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

fedora-bot: Continue after failure #55

Merged
merged 1 commit into from
Sep 10, 2024
Merged
Changes from all commits
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
38 changes: 21 additions & 17 deletions fedora_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,24 +317,28 @@ def main():
parser.error(f"Invalid component format, must be PACKAGE:NUM_TESTS : {component_numtests}")

print(f"\n--- {component} ---\n")
if args.apikey:
msg_info(f"Checking for open pull requests of {component}...")
merge_open_pull_requests(args, component, num_tests)
else:
msg_info("No Fedora account API key supplied - skipping merging of pull requests.")

if args.user and args.password: # Only check Bodhi if credentials were supplied
msg_info(f"Checking for missing updates of '{component}'...")
missing_updates = get_missing_updates(component, fedoras)

if missing_updates:
msg_info(f"Found missing updates in Bodhi: {missing_updates}")
publish_updates(args, component, missing_updates)
msg_ok(f"Tried to update {missing_updates}.")
try:
if args.apikey:
msg_info(f"Checking for open pull requests of {component}...")
merge_open_pull_requests(args, component, num_tests)
else:
msg_ok("No releases found with missing updates.")
else:
msg_info("No Fedora credentials supplied - skipping Bodhi updates.")
msg_info("No Fedora account API key supplied - skipping merging of pull requests.")

if args.user and args.password: # Only check Bodhi if credentials were supplied
msg_info(f"Checking for missing updates of '{component}'...")
missing_updates = get_missing_updates(component, fedoras)

if missing_updates:
msg_info(f"Found missing updates in Bodhi: {missing_updates}")
publish_updates(args, component, missing_updates)
msg_ok(f"Tried to update {missing_updates}.")
else:
msg_ok("No releases found with missing updates.")
else:
msg_info("No Fedora credentials supplied - skipping Bodhi updates.")
except Exception as error:
print(f"Failure in processing component [{component}] - skipping")
print(f"Exception: {error=}, {type(error)=}")


if __name__ == "__main__":
Expand Down
Loading