Project

General

Profile

Actions

action #53762

closed

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

Added by okurz over 5 years ago. Updated over 4 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Regressions/Crashes
Target version:
Start date:
2019-07-03
Due date:
% Done:

0%

Estimated time:

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"

Files

Screenshot_20190703_110831.png (24.5 KB) Screenshot_20190703_110831.png okurz, 2019-07-03 09:10
before.png (41.5 KB) before.png Xiaojing_liu, 2020-01-23 08:55
after.png (42 KB) after.png Xiaojing_liu, 2020-01-23 08:55
Actions #1

Updated by coolo over 5 years 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 :(

Actions #2

Updated by okurz almost 5 years ago

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

Updated by Xiaojing_liu almost 5 years ago

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

Actions #4

Updated by okurz almost 5 years ago

yes, that's how it should look like.

Actions #5

Updated by livdywan almost 5 years ago

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

Updated by Xiaojing_liu almost 5 years ago

  • Status changed from Workable to In Progress
Actions #8

Updated by okurz over 4 years 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?

Actions #9

Updated by Xiaojing_liu over 4 years 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.

Actions #10

Updated by Xiaojing_liu over 4 years 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.

Actions #11

Updated by okurz over 4 years 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!

Actions #12

Updated by okurz over 4 years 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 :)

Actions

Also available in: Atom PDF