| |
@@ -37,7 +37,7 @@
|
| |
|
| |
data = {
|
| |
"title": title,
|
| |
- "content": content,
|
| |
+ "issue_content": content,
|
| |
"tag": tag,
|
| |
}
|
| |
headers = {
|
| |
@@ -46,7 +46,9 @@
|
| |
|
| |
req = requests.post(url, data=data, headers=headers)
|
| |
if not req.ok:
|
| |
- print(f"Error when trying to open a ticket at: {url} to report the failure")
|
| |
+ print(f"Error when trying to open a ticket at: {url} to report the failure", flush=True)
|
| |
+ print(f"Request to {url} with data={data} returned: {req.status_code}", flush=True)
|
| |
+ print(f"Output: {req.text}", flush=True)
|
| |
|
| |
|
| |
def blocking_issues(project, tags):
|
| |
@@ -60,14 +62,17 @@
|
| |
issues = []
|
| |
try:
|
| |
r = requests.get(api)
|
| |
- issues = r.json()["issues"]
|
| |
- if tags:
|
| |
- t = set(tags[1:])
|
| |
- issues = [i for i in issues if t & set(i["tags"])]
|
| |
- for i in issues:
|
| |
- print(f"Found blocking issue https://pagure.io/{project}/issue/{i['id']}")
|
| |
+ if not r.ok:
|
| |
+ print(f"Failed to query: {api} -- returned : {r.status_code}", flush=True)
|
| |
+ else:
|
| |
+ issues = r.json()["issues"]
|
| |
+ if tags:
|
| |
+ t = set(tags[1:])
|
| |
+ issues = [i for i in issues if t & set(i["tags"])]
|
| |
+ for i in issues:
|
| |
+ print(f"Found blocking issue https://pagure.io/{project}/issue/{i['id']}", flush=True)
|
| |
except Exception as e:
|
| |
- print(f"Error when querying pagure for blocking issues: {e}")
|
| |
+ print(f"Error when querying pagure for blocking issues: {e}", flush=True)
|
| |
return issues
|
| |
|
| |
|
| |
@@ -153,7 +158,7 @@
|
| |
run_command([command, "switch-branch", f"{name}"], cwd=folder)
|
| |
self.print_user(info_log, success=True)
|
| |
except MonitoringException:
|
| |
- self.failed("fedpkg")
|
| |
+ self.failed.append("fedpkg")
|
| |
self.print_user(info_log, success=False)
|
| |
|
| |
def bump_release(self, name, folder):
|
| |
@@ -165,7 +170,7 @@
|
| |
run_command(["rpmdev-bumpspec", f"{name}.spec"], cwd=folder)
|
| |
self.print_user(info_log, success=True)
|
| |
except MonitoringException:
|
| |
- self.failed("rpmdev-bumspec")
|
| |
+ self.failed.append("rpmdev-bumpspec")
|
| |
self.print_user(info_log, success=False)
|
| |
|
| |
def commit_changes(self, commit_log, folder):
|
| |
@@ -178,7 +183,7 @@
|
| |
run_command(["git", "commit", "-asm", commit_log], cwd=folder)
|
| |
self.print_user(info_log, success=True)
|
| |
except MonitoringException:
|
| |
- self.failed("git")
|
| |
+ self.failed.append("git")
|
| |
self.print_user(info_log, success=False)
|
| |
|
| |
def push_changes(self, folder, target, branch, force=False):
|
| |
@@ -193,7 +198,7 @@
|
| |
run_command(cmd, cwd=folder)
|
| |
self.print_user(info_log, success=True)
|
| |
except MonitoringException:
|
| |
- self.failed("git/dist-git")
|
| |
+ self.failed.append("git/dist-git")
|
| |
self.print_user(info_log, success=False)
|
| |
|
| |
def pull_changes(self, folder, target, branch):
|
| |
@@ -206,7 +211,7 @@
|
| |
run_command(cmd, cwd=folder)
|
| |
self.print_user(info_log, success=True)
|
| |
except MonitoringException:
|
| |
- self.failed("git/dist-git")
|
| |
+ self.failed.append("git/dist-git")
|
| |
self.print_user(info_log, success=False)
|
| |
|
| |
def open_pullrequest(self, base_url, username, namespace, name, branch, token):
|
| |
@@ -234,7 +239,7 @@
|
| |
success = False
|
| |
pr_id = None
|
| |
pr_uid = None
|
| |
- self.failed("dist-git")
|
| |
+ self.failed.append("dist-git")
|
| |
else:
|
| |
output = req.json()
|
| |
pr_id = str(output["id"])
|
| |
@@ -257,7 +262,7 @@
|
| |
self.print_user(info_log, success=True)
|
| |
return nevr.strip().decode("utf-8")
|
| |
except MonitoringException:
|
| |
- self.failed("fedpkg")
|
| |
+ self.failed.append("fedpkg")
|
| |
self.print_user(info_log, success=False)
|
| |
|
| |
def build_package(self, command, folder, target=None):
|
| |
@@ -272,7 +277,7 @@
|
| |
run_command(command, cwd=folder)
|
| |
self.print_user(info_log, success=True)
|
| |
except MonitoringException:
|
| |
- self.failed("koji")
|
| |
+ self.failed.append("koji")
|
| |
self.print_user(info_log, success=False)
|
| |
|
| |
def chain_build_packages(self, command, packages, folder, target=None):
|
| |
@@ -292,7 +297,7 @@
|
| |
run_command(command, cwd=folder)
|
| |
self.print_user(info_log, success=True)
|
| |
except MonitoringException:
|
| |
- self.failed("koji")
|
| |
+ self.failed.append("koji")
|
| |
self.print_user(info_log, success=False)
|
| |
|
| |
def get_build_tags(self, koji_url, nevr, expected_ends):
|
| |
@@ -350,7 +355,7 @@
|
| |
|
| |
info_log = f"Retrieving koji tags: {tags}"
|
| |
if not success:
|
| |
- self.failed("koji")
|
| |
+ self.failed.append("koji")
|
| |
self.print_user(info_log, success=success)
|
| |
|
| |
def create_update(
|
| |
@@ -384,7 +389,7 @@
|
| |
run_command(command)
|
| |
self.print_user(info_log, success=True)
|
| |
except MonitoringException:
|
| |
- self.failed("bodhi")
|
| |
+ self.failed.append("bodhi")
|
| |
self.print_user(info_log, success=False)
|
| |
|
| |
def get_update_id(self, nevr, url):
|
| |
@@ -405,7 +410,7 @@
|
| |
|
| |
if (datetime.datetime.utcnow() - start).seconds > (15 * 60):
|
| |
success = False
|
| |
- self.failed("bodhi")
|
| |
+ self.failed.append("bodhi")
|
| |
info_log = f"Update for {nevr} not created within 15 minutes"
|
| |
break
|
| |
|
| |
@@ -565,7 +570,7 @@
|
| |
info_log += f" - ran for: {(end - start_lookup).seconds}s"
|
| |
self.print_user(info_log, success=success)
|
| |
if not success:
|
| |
- self.failed("datagrepper")
|
| |
+ self.failed.append("datagrepper")
|
| |
|
| |
def lookup_ci_resultsdb(self, nevr, name, url):
|
| |
""" Check the CI results in the specified resultsdb for results about
|
| |
@@ -616,7 +621,7 @@
|
| |
info_log += f" - ran for: {(end - start).seconds}s"
|
| |
self.print_user(info_log, success=success)
|
| |
if not success:
|
| |
- self.failed("resultsdb")
|
| |
+ self.failed.append("resultsdb")
|
| |
|
| |
def waive_update(self, command, updateid, prod=True, username=None, password=None):
|
| |
""" Waive all the tests results for the specified update using bodhi's
|
| |
@@ -642,7 +647,7 @@
|
| |
run_command(command)
|
| |
self.print_user(info_log, success=True)
|
| |
except MonitoringException:
|
| |
- self.failed("waiverdb")
|
| |
+ self.failed.append("waiverdb")
|
| |
self.print_user(info_log, success=False)
|
| |
|
| |
def get_pr_flag(
|
| |
@@ -698,7 +703,7 @@
|
| |
|
| |
self.print_user(info_log, success=success)
|
| |
if not success:
|
| |
- self.failed("dist-git")
|
| |
+ self.failed.append("dist-git")
|
| |
|
| |
def merge_pr(self, base_url, username, namespace, name, pr_id, token):
|
| |
""" Merge the specified PR
|
| |
@@ -719,7 +724,7 @@
|
| |
|
| |
self.print_user(info_log, success=success)
|
| |
if not success:
|
| |
- self.failed("dist-git")
|
| |
+ self.failed.append("dist-git")
|
| |
|
| |
def finalize(self, start):
|
| |
""" End data returned. """
|
| |
@@ -742,7 +747,7 @@
|
| |
self.print_user(info_log, success=True)
|
| |
except (MonitoringException, Exception) as err:
|
| |
print(err)
|
| |
- self.failed("dist-git")
|
| |
+ self.failed.append("dist-git")
|
| |
self.print_user(info_log, success=False)
|
| |
return side_tag_name
|
| |
|
| |