Skip to content

CI fails with error: ValueError: time data 'latest' does not match format '%Y%m%d' #164

Open

Description

@aagbsn

FAILED tests/test_updaters.py::test_end_to_end - ValueError: time data 'latest' does not match format '%Y%m%d'

it looks like some external data changed, but this breaks CI for unrelated changes.

Activity

  1. aagbsn commented on Jun 29, 2026

    @aagbsn
    ContributorAuthor

    per @LDiazN

    AS_ORG_MAP_URL = "https://archive.org/download/ip2country-as/all_as_org_map.json"

    the dataset: https://archive.org/download/ip2country-as/all_as_org_map.json
    seems to have changed

  2. LDiazN commented on Jun 29, 2026

    @LDiazN
    Contributor

    Here's a sample of the json downloaded from that URL:

    {  "1": [
        [
          "Level 3 Communications, Inc.",
          "US",
          "20040604",
          "LVLT-1",
          "ARIN"
        ],
        [
          "Level 3 Parent, LLC",
          "US",
          "20180220",
          "LVLT-1",
          "ARIN"
        ]
      ],
    ...

    And this is the expected format:

    rows.append(
    {
    "asn": asn,
    "org_name": v[0],
    "cc": v[1],
    "changed": changed,
    "aut_name": v[3],
    "source": v[4],
    }

    The conflicting entry looks like this:

    "3288": [
        [
          "MACAM-MOFET Institute, Israel",
          "",
          "20000101",
          "MOFET-AS",
          "RIPE"
        ],
        [
          "Mofet Institute",
          "",
          "20000101",
          "MOFET-AS",
          "RIPE"
        ],
        [
          "Mofet Institute",
          "IL",
          "20000101",
          "MOFET-AS",
          "RIPE"
        ],
        [
          "Zipcom Communications LTD",
          "IL",
          "20260601",
          "MOFET-AS",
          "RIPE"
        ],
        [
          "Mofet Institute",
          "IL",
          "latest",
          "MOFET-AS",
          "RIPE"
        ]
      ],

    Seems like the most recent one is expressed with a "latest" in some cases, breaking this line:

    changed = datetime.strptime(v[2], "%Y%m%d").date()

  3. aagbsn commented on Jun 29, 2026

    @aagbsn
    ContributorAuthor

    'latest' isn't very descriptive, but maybe we can guess it from the current release version

  4. added a commit that references this issue on Jun 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions