Skip to content

Snapshots diff sometimes returns null side with older package #287

Description

@fpytloun

I have two snapshots, older one (_tcp-1440157930) and newer (_tcp-1440161185). Only difference between them is that newer snapshot contains package python-aptly 0.5.2

When I compare these snapshots, I always get null on the side of older snapshot:

$ curl http://localhost:8080/api/snapshots/_tcp-1440157930/diff/_tcp-1440161185
[{"Left":null,"Right":"Pall python-aptly 0.5.2 c0f4a0c3fc9e22c5"}]
$ curl http://localhost:8080/api/snapshots/_tcp-1440161185/diff/_tcp-1440157930
[{"Left":"Pall python-aptly 0.5.2 c0f4a0c3fc9e22c5","Right":null}]

So it seems that version comparison like 0.5.2 > 0.5 doesn't work.
Expected output would be:

[{"Left":"Pall python-aptly 0.5 f0dfd70e4a936c2f","Right":"Pall python-aptly 0.5.2 c0f4a0c3fc9e22c5"}]

This is how newer snapshot looks like:

$ curl -sss http://localhost:8080/api/snapshots/_tcp-1440161185/packages|json_pp|grep python-aptly|sort
   "Pall python-aptly 0.2.2 cbd9cf268ece7eb2",
   "Pall python-aptly 0.3.1 8142186f92d78d20",
   "Pall python-aptly 0.4.1 950bac934669ffac",
   "Pall python-aptly 0.4.2 984dd9ec9b30e4bf",
   "Pall python-aptly 0.4.3 dc6e6adee37a0486",
   "Pall python-aptly 0.4.4 d943dbd2a4bf39c9",
   "Pall python-aptly 0.4.6 98288a131f1b253b",
   "Pall python-aptly 0.4 864efe6993977f7f",
   "Pall python-aptly 0.5.2 c0f4a0c3fc9e22c5",
   "Pall python-aptly 0.5 f0dfd70e4a936c2f",

And the older one:

$ curl -sss http://localhost:8080/api/snapshots/_tcp-1440157930/packages|json_pp|grep python-aptly|sort
   "Pall python-aptly 0.2.2 cbd9cf268ece7eb2",
   "Pall python-aptly 0.3.1 8142186f92d78d20",
   "Pall python-aptly 0.4.1 950bac934669ffac",
   "Pall python-aptly 0.4.2 984dd9ec9b30e4bf",
   "Pall python-aptly 0.4.3 dc6e6adee37a0486",
   "Pall python-aptly 0.4.4 d943dbd2a4bf39c9",
   "Pall python-aptly 0.4.6 98288a131f1b253b",
   "Pall python-aptly 0.4 864efe6993977f7f",
   "Pall python-aptly 0.5 f0dfd70e4a936c2f",

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions