Project

General

Profile

Actions

action #55634

closed

Trying to delete single asset over /admin/assets does not seem to have any effect

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

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

0%

Estimated time:

Description

Observation

On https://openqa.suse.de/admin/assets I tried to delete the assets "iso/SLE12-SP5-Staging:P-Test-Server-DVD-x86_64-BuildP.34.3-Media.iso" and "iso/SLE12-SP5-Staging:P-Test-Server-DVD-x86_64-BuildP.34.2-Media.iso" which do not reference any latest job nor group. I clicked the little "x" button but there is no effect. Refreshing the page showed the assets again. Also I could not see anything related in logfiles, neither /var/log/openqa nor system journal.

Actions #1

Updated by coolo over 4 years ago

  • Target version set to Ready
Actions #2

Updated by Xiaojing_liu over 4 years ago

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

Updated by Xiaojing_liu over 4 years ago

I read the code and did test in my environment. The asset had been removed from the database and the asset file (e.g xxx.iso or xxx.qcow2) had also been removed. The web page did not show successful information. And seems there is also something wrong in deleting the table tr. If my understanding is correct, the assets data shown in the table is come form the asset cache file, but after removing assets, the asset cache file is not refreshed. So, should the cache file be refreshed after removing assets by clicking the 'x' picture?

Actions #4

Updated by mkittler over 4 years ago

This is a problem I've (knowingly) introduced when implementing the cache. The reason is that it just takes quite long to generate the asset table's contents. So refreshing the entire table after contents deleting a single row makes no sense.

@okurz Did you check whether the asset has been removed from the database table and from the file system? If that works it is sufficient in my opinion. We could add a note so people are aware of that limitation. It should also be possible to re-trigger the cache generation. This should refresh the view.

If we really wanted to fix this we needed to have all information in the database (without the need to compute data on the fly). At the time I thought it wasn't worth the effort. Note that removing an asset also has an impact on the size compution and on the list under the table. That would go "out-of-sync" when one just deletes the row from the database. So making this work altogether is quite a task and again I'm not sure whether it is worth the effort.

@Xiaojing_liu To answer your concrete questions:

The asset had been removed from the database and the asset file (e.g xxx.iso or xxx.qcow2) had also been removed.

That's good and actually good enough in my opinion.

If my understanding is correct, the assets data shown in the table is come form the asset cache file, but after removing assets, the asset cache file is not refreshed.

That's correct.

So, should the cache file be refreshed after removing assets by clicking the 'x' picture?

No, it would take annoyingly long to refresh the entire cache.

Actions #5

Updated by okurz over 4 years ago

mkittler wrote:

This is a problem I've (knowingly) introduced when implementing the cache. The reason is that it just takes quite long to generate the asset table's contents. So refreshing the entire table after contents deleting a single row makes no sense.

@okurz Did you check whether the asset has been removed from the database table and from the file system? If that works it is sufficient in my opinion. We could add a note so people are aware of that limitation. It should also be possible to re-trigger the cache generation. This should refresh the view.
[…]

Hm, now I am not sure anymore if the asset got actually deleted but did just not disappear from the table view or if I had to delete the files manually myself. I think a message that just shows confirmation of the delete request would be fine. Maybe we can hint to clicking the "Trigger asset cleanup" button to make the change and visual representation effective. Then the longer processing time is acceptable as it is explicitly triggered by the user.

Actions #7

Updated by Xiaojing_liu over 4 years ago

  • Status changed from New to In Progress
Actions #8

Updated by Xiaojing_liu over 4 years ago

  • Status changed from In Progress to Feedback
Actions #9

Updated by Xiaojing_liu over 4 years ago

  • Status changed from Feedback to Resolved
Actions

Also available in: Atom PDF