ublue-os / bluefin

The next generation Linux workstation, designed for reliability, performance, and sustainability.
https://projectbluefin.io
Apache License 2.0
1.25k stars 162 forks source link

`ujust rollback-helper` doesn't display the latest images #1821

Closed GyrosOfWar closed 3 weeks ago

GyrosOfWar commented 1 month ago

Describe the bug

I tried rolling back to an earlier image because of nvidia driver issues and when I tried selecting a date, I only got the following list of images:

Which Tag would you like to rebase to?
The default selection is gts, stable (weekly builds) and stable-daily (daily builds) are for enthusiasts, and latest is for testers
Warning: This will pin you to a specific version, do not forget to rebase back to a channel to resume receiving updates.
  40-20240530
  40-20240528
  40-20240527
  40-20240526
  40-20240525
  40-20240524
  40-20240523
  40-20240522
  40-20240521
  40-20240520
  40-20240519
  40-20240518
  40-20240517
  40-20240516
  40-20240515
  40-20240514
  40-20240513
  40-20240512
  40-20240511
  40-20240510
  40-20240509
  40-20240508
  40-20240507
  40-20240506
  40-20240505
  40-20240504
  40-20240503
  40-20240502
  40-20240501
  40-20240430
  40-20240429
  40-20240428
  40-20240427
  40-20240426
  40-20240425
  40-20240424
  40-20240423
  40-20240422
  40-20240421
  40-20240420
  40-20240419
  40-20240418
  40-20240417
  40-20240416
  40-20240415
  40-20240414
  40-20240413
  40-20240412
  40-20240411
  40-20240410
  40-20240409

What did you expect to happen?

I'd expect the list of images to contain the latest images instead of the (I assume) oldest ones in the repository.

Output of rpm-ostree status

State: idle
AutomaticUpdates: stage; rpm-ostreed-automatic.timer: no runs since boot
Deployments:
● ostree-image-signed:docker://ghcr.io/ublue-os/aurora-dx-nvidia:40-20241017
                   Digest: sha256:7eb3512fdb3af15ecad3d36c2c743cd9c30bee5babed9e10698be7ab6186f1ec
                  Version: 40.20241016.0 (2024-10-17T22:40:23Z)

  ostree-image-signed:docker://ghcr.io/ublue-os/aurora-dx-nvidia:stable
                   Digest: sha256:3634de91f7e148fead7dd8e4db44070793440f96355905a6d960d5698c1f6b54
                  Version: 40.20241019.0 (2024-10-20T05:47:55Z)

Output of groups

martin wheel incus-admin lxd docker libvirt

Extra information or context

No response

befanyt commented 1 month ago

It seems that the tag list from which you can choose is too large, resulting in this kind of behavior. At the time of writing, it returns 171 dates to choose from, and this number is only expected to increase.

~ ❯ skopeo list-tags docker://ghcr.io/ublue-os/aurora-dx-nvidia | grep -E --color=never -- "40-([0-9]+)" | sort -rV | wc -l
171

Limiting the results to a more reasonable number, such as using head -n 31 to provide a maximum of 31 days to choose from, would likely resolve this behavior.

https://github.com/ublue-os/bluefin/blob/78bbc1a5c08b8b1e6905f42c8c289e25c8ea0de3/system_files/shared/usr/bin/ublue-rollback-helper#L11