Re: FBR: Push a fix to clean_amis.py in fedimg box

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



+1

-re

On 3/27/19 5:57 AM, Sayan Chowdhury wrote:
I need to push a fix to run the clean_amis script. The diff is as follows:

diff --git a/roles/fedimg/files/clean-amis.py b/roles/fedimg/files/clean-amis.py
index d0a491824..8e8cfff91 100644
--- a/roles/fedimg/files/clean-amis.py
+++ b/roles/fedimg/files/clean-amis.py
@@ -116,7 +116,7 @@ def get_page(page, delta, topic, start=None, end=None):
      return resp.json()


-def _get_two_week_atomic_released_compose_id(delta, start=None, end=None):
+def _get_two_week_released_atomic_compose_id(delta, start=None, end=None):
      """ Returns the release compose ids for last n days """

      topic = "org.fedoraproject.prod.releng.atomic.twoweek.complete"
@@ -136,7 +136,7 @@ def
_get_two_week_atomic_released_compose_id(delta, start=None, end=None):
      for msg in messages:
          # This is to support the older-format fedmsg messages
          if "atomic_raw" in msg:
-            released_atomic_compose_ids.append(["atomic_raw"]["compose_id"])
+            released_atomic_compose_ids.append(msg["atomic_raw"]["compose_id"])
          # We are just trying here multiple archs to get the compose id
          elif "aarch64" in msg:
              released_atomic_compose_ids.append(
@@ -186,7 +186,7 @@ def _get_nightly_amis_nd(delta, start=None, end=None):

          # Sometimes the compose label is None
          # and they can be blindly put in for deletion
-        if compose_label is None:
+        if not compose_label:
              amis.append((compose_id, ami_id, region))

          if compose_id in released_atomic_compose_ids:
@@ -209,7 +209,7 @@ def _get_nightly_amis_nd(delta, start=None, end=None):
  def delete_amis_nd(deletetimestamp, dry_run=False):
      """ Delete the give list of nightly AMIs

-    :args deletetimestamp: the timestamp for the delete
+    :args deletetimestamp: the timestamp for the delete
      :args dry_run: dry run the flow
      """
      log.info("Deleting AMIs")

The PR to this diff is merged into releng repo[1].

+1s

[1] https://pagure.io/releng/pull-request/8193#request_diff


_______________________________________________
infrastructure mailing list -- infrastructure@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to infrastructure-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/infrastructure@xxxxxxxxxxxxxxxxxxxxxxx




[Index of Archives]     [Fedora Development]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux