#36 Adapt to a new fedora-health-check
Merged 2 years ago by frantisekz. Opened 2 years ago by frantisekz.

@@ -29,6 +29,7 @@ 

  PACKAGE_MAINTAINERS_JSON_URL = "https://src.fedoraproject.org/extras/pagure_owner_alias.json"

  ORPHANS_JSON_URL = "https://churchyard.fedorapeople.org/orphans.json"

  KOSCHEI_API_URL = "https://koschei.fedoraproject.org/api/v1/packages"

+ HEALTH_CHECK_URL = "https://repochecker.decathorpe.com/data/"

  

  EPEL_RELEASES = [7, 8]

  

file modified
+1
@@ -57,6 +57,7 @@ 

      PACKAGE_MAINTAINERS_JSON_URL = 'https://src.fedoraproject.org/extras/pagure_owner_alias.json'

      ORPHANS_JSON_URL = 'https://churchyard.fedorapeople.org/orphans.json'

      KOSCHEI_API_URL = 'https://koschei.fedoraproject.org/api/v1/packages'

+     HEALTH_CHECK_URL = 'https://repochecker.decathorpe.com/data/'

  

      EPEL_RELEASES = [7, 8]

  

file modified
+6 -9
@@ -501,8 +501,8 @@ 

      {"package": {"arch": ["reason_a", "reason_b"], "arch_b": ["reason_a, reason_c"]}, "package_b"...}

      """

      data = defaultdict(dict)

-     for single_closure in json_data["closure"]:

-         data[single_closure["package"]][single_closure["arch"]] = single_closure["deps"]

+     for single_closure in json_data:

+         data[single_closure["package"]][single_closure["arch"]] = single_closure["broken"]

      return data

  

  def get_health_check_data():
@@ -519,11 +519,9 @@ 

      releases = CACHE.get('fedora_releases')["values"]

      for release in releases[:-1]: # Process every release but rawhide

          release = str(release)

-         data[release] = process_health_check_json(get_json(

-             "https://pagure.io/fedora-health-check/raw/master/f/data/report-%s.json" % release))

-         data[release + "-testing"] = process_health_check_json(get_json(

-             "https://pagure.io/fedora-health-check/raw/master/f/data/report-%s-testing.json" % release))

-     data["rawhide"] = process_health_check_json(get_json("https://pagure.io/fedora-health-check/raw/master/f/data/report-rawhide.json"))

+         data[release] = process_health_check_json(get_json(app.config["HEALTH_CHECK_URL"] + release))

+         data[release + "-testing"] = process_health_check_json(get_json(app.config["HEALTH_CHECK_URL"] + release + "-testing"))

+     data["rawhide"] = process_health_check_json(get_json(app.config["HEALTH_CHECK_URL"] + "rawhide"))

      return data

  

  def get_repo_for_health_check(release):
@@ -557,8 +555,7 @@ 

              if package in fti_data[release]:

                  data[package].append({"release": release_from_number(release.replace("-testing", "")), # We need to cut -testing,

                                        "repo": get_repo_for_health_check(release),

-                                       "reason": fti_data[release][package],

-                                       "url": "https://pagure.io/fedora-health-check/blob/master/f/reports/report-%s.md" % release})

+                                       "reason": fti_data[release][package]})

      return data

  

  

1 new commit added

  • Drop url key from health-check
2 years ago

Pull-Request has been merged by frantisekz

2 years ago