#2 Add "since" into the API
Closed 4 years ago by decathorpe. Opened 4 years ago by frantisekz.

We'd love to use sort of "since" information in the repochecker HTTP api for sorting by time in Packager dashboard.

Would that be possible?

Thanks a lot!


This is a nice idea.

I'll think about a way to calculate / store and to provide this information via the API. Beware that the "time resolution" for the "since" field won't be more accurate than the standard refresh interval, which is currently 4 hours. If that's enough, then adding a since field into the individual entries shouldn't be too difficult.

To clarify, I would add a "since": "<date_time>" field into the objects in the response array, so it would only indicate the first time an individual package had broken dependencies, not the first time a specific broken dependency showed up, like this:

[
  {
    "source": "Java-WebSocket",
    "package": "Java-WebSocket",
    "epoch": "0",
    "version": "1.3.8",
    "release": "4.fc31",
    "arch": "noarch",
    "admin": "orphan",
    "repo": "rawhide",
    "repo_arch": "x86_64",
    "broken": [
      "mvn(net.iharder:base64)"
    ],
    "since": "2020-01-01T20:15:42T+00:00"
  },
  {
    "source": "Java-WebSocket",
    "package": "Java-WebSocket",
    "epoch": "0",
    "version": "1.3.8",
    "release": "4.fc31",
    "arch": "noarch",
    "admin": "orphan",
    "repo": "rawhide",
    "repo_arch": "aarch64",
    "broken": [
      "mvn(net.iharder:base64)"
    ],
    "since": "2020-04-01T20:15:42T+00:00"
  },
# (...)
]

I've implemented a version of this in commit https://pagure.io/ironthree/repochecker/c/bf437d82dc8c92980fa4c120cbac87ce9566edba?branch=master.

Does this sound good to you?

  • combinations of package+repo+repo_arch are checked for already existing entries, and if one exists, the existing timestamp is reused, otherwise, "now" is set for the timestamp
  • if no timestamp is available, the API returns a null value for "since" (should only occur in the few minutes before the initial data refresh with the new functionality is done)

Released as repochecker 0.2.0, and "deployed to production" (on a friday!).

Metadata Update from @decathorpe:
- Issue status updated to: Closed (was: Open)

4 years ago

The initial refresh is done, data with "since" fields are now returned by the API.

It's all initialized to be "since now" since I don't have any historical data, but it will become more interesting the longer the service runs :)

(on a friday!).

What a madman... :D

Thanks a lot. Oraculum/Packager Dashboard is already using it :)

Log in to comment on this ticket.

Metadata