#2784 Tolerate floats in metadata timestamps
Merged a year ago by tkopecek. Opened a year ago by alexi.
alexi/koji issue_2783  into  master

Tolerate floats in metadata timestamps
Alex Iribarren • a year ago  
file modified
+1 -1
@@ -460,7 +460,7 @@ 

                  r = requests.get(arch_url, timeout=5)

                  root = ElementTree.fromstring(r.text)

                  ts_elements = root.iter('{http://linux.duke.edu/metadata/repo}timestamp')

-                 arch_ts = max([int(child.text) for child in ts_elements])

+                 arch_ts = max([round(float(child.text)) for child in ts_elements])

                  self.external_repo_ts[arch_url] = arch_ts

                  max_ts = max(max_ts, arch_ts)

              except Exception:

Metadata Update from @tkopecek:
- Pull-request tagged with: testing-ready

a year ago

#2785 has already been merged, so I guess this can be closed?

No, I've just closed mine without merging as I've noticed yours.

Anyway, I was thinking about just float conversion. We can miss some updates (very hypothetically). If I've 123 timestamp for koji's repo and and external repo is 123.45 it will be ignored.

I added the round in case anything else depended on the timestamp being an int, although it didn't look like it would be an issue. Anyway, float(child.text) should be fine.

Metadata Update from @mfilip:
- Pull-request tagged with: testing-done

a year ago

Commit d8c46e8 fixes this pull-request

Pull-Request has been merged by tkopecek

a year ago