action #53762

/admin/needles can be misleading in mentioning needle as "never used" when it is referenced from a symlinked needles repo

Added by okurz 9 months ago. Updated 14 days ago.

Status:ResolvedStart date:03/07/2019
Priority:NormalDue date:
Assignee:okurz% Done:

0%

Category:Concrete Bugs
Target version:Current Sprint
Difficulty:
Duration:

Description

Observation

See

Screenshot_20190703_110831.png

showing the search results for a needle "user_settings_root-inst-rootpassword-20190306.json" that appears twice even though it is the same needle. It is reported as correctly used within the directory "opensuse" but "never/never" for "kubic-Tumbleweed". The bigger problem is when I limit using the provided filters which can cause one of the entries to not show at all. This can mislead the user into thinking a needle can be deleted when it is actually actively used by the other "directory" aka. "distri".

This mislead me into deleting quite some needles which caused a lot of tests to fail on o3 and I had to recover all these needles :D

Acceptance criteria

  • AC1: Needles that are recently referenced as in use by any symlinked repo are not reported as "never used" within /admin/needles

Suggestions

  • Dereference symlinks when loading needles for evaluating if they are still used
  • Ensure the same needle files are either only referenced once or shown with the use information regardless of the used "distri"

Screenshot_20190703_110831.png (24.5 KB) okurz, 03/07/2019 09:10 am

before.png (41.5 KB) Xiaojing_liu, 23/01/2020 08:55 am

after.png (42 KB) Xiaojing_liu, 23/01/2020 08:55 am

8267
9341
9344

History

#1 Updated by coolo 8 months ago

  • Priority changed from High to Normal
  • Target version set to Ready

I don't think it's high prio as not many people actually bother to delete needles - and those who do learn about this obstacle quickly :(

#2 Updated by okurz 4 months ago

  • Description updated (diff)
  • Status changed from New to Workable

#3 Updated by Xiaojing_liu 2 months ago

I added two picture, does the result shown in after.png work as expected?

#4 Updated by okurz 2 months ago

yes, that's how it should look like.

#5 Updated by cdywan 2 months ago

  • Assignee set to Xiaojing_liu
  • Target version changed from Ready to Current Sprint

#6 Updated by Xiaojing_liu 2 months ago

  • Status changed from Workable to In Progress

#8 Updated by okurz about 1 month ago

PR is merged and deployed on o3 but https://openqa.opensuse.org/admin/needles still shows a lot of needles with "Never" which I doubt is true. Do we need to wait for something to update the references? Like only after the next tests make actual use of the needles?

#9 Updated by Xiaojing_liu about 1 month ago

okurz wrote:

PR is merged and deployed on o3 but https://openqa.opensuse.org/admin/needles still shows a lot of needles with "Never" which I doubt is true. Do we need to wait for something to update the references? Like only after the next tests make actual use of the needles?

There is a problem in the PR. I did the symlink convert only in the needles those were queried by the same time. For example, the needle page once loads 10 needles info in one time, the realpath search only in those ten, so there are many "Never" in openqa.opensuse.org. I will give an solution about this. I am sorry that I did not consider this situation.

#10 Updated by Xiaojing_liu 16 days ago

  • Status changed from In Progress to Feedback
  • Assignee deleted (Xiaojing_liu)

PR https://github.com/os-autoinst/openQA/pull/2793 had been merged. And I checked the result on OSD and o3, seems it works as expected.
There is also a pr https://github.com/os-autoinst/openQA/pull/2825 used to improve the code as follow-up.

#11 Updated by okurz 15 days ago

  • Assignee set to okurz

ok, taking over for https://github.com/os-autoinst/openQA/pull/2825 which of course is only a minor addition. You did the major share, great work!

#12 Updated by okurz 14 days ago

  • Status changed from Feedback to Resolved

https://github.com/os-autoinst/openQA/pull/2825 was merged and auto-deployed to o3 . Tried out on https://openqa.opensuse.org/admin/needles by deleting some needles that are referenced within "opensuse" and "kubic" symlinked repo working copies. All looks good now :)

Also available in: Atom PDF