Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent behaviour during repository path removal/insert #8959

Open
doccaz opened this issue Jan 16, 2020 · 2 comments
Open

Inconsistent behaviour during repository path removal/insert #8959

doccaz opened this issue Jan 16, 2020 · 2 comments
Labels
Bug Frontend Things related to the OBS RoR app

Comments

@doccaz
Copy link
Contributor

doccaz commented Jan 16, 2020

Issue Description

Using OBS 2.10 (Staging), sometimes when I try to add/remove paths from a project's repository using the WebUI, the repository is added/removed from multiple enabled distributions associated with the project.

For example, I have a project with both SLE-12-SP4 and SLE-15-SP1.
If I add a path named "containers" on SLE-12-SP4, it get added to SLE-15-SP1. Same thing when removing this path.

I enabled the debug flags, and got this on my production.log after removing the path from one of the repositories:

D, [2020-01-16T12:01:55.622176 #64171] DEBUG -- : [10dfadaf-a0ca-4436-aa85-39469080e73d] [64171:80.98]   Repository Load (0.3ms)  SELECT  `repositories`.* FROM `repositories` WHERE `reposit
ories`.`db_project_id` = 75 AND `repositories`.`id` = 1391 LIMIT 1
D, [2020-01-16T12:01:55.623402 #64171] DEBUG -- : [10dfadaf-a0ca-4436-aa85-39469080e73d] [64171:80.98]   PathElement Load (0.4ms)  SELECT  `path_elements`.* FROM `path_elements` WHERE `path
_elements`.`parent_id` = 1391 AND `path_elements`.`id` = 2348 ORDER BY position LIMIT 1
D, [2020-01-16T12:01:55.623973 #64171] DEBUG -- : [10dfadaf-a0ca-4436-aa85-39469080e73d] [64171:80.98]    (0.2ms)  BEGIN
D, [2020-01-16T12:01:55.625202 #64171] DEBUG -- : [10dfadaf-a0ca-4436-aa85-39469080e73d] [64171:80.98]   PathElement Load (0.3ms)  SELECT  `path_elements`.* FROM `path_elements` WHERE `path
_elements`.`id` = 2348 LIMIT 1
D, [2020-01-16T12:01:55.626133 #64171] DEBUG -- : [10dfadaf-a0ca-4436-aa85-39469080e73d] [64171:80.98]   PathElement Destroy (0.3ms)  DELETE FROM `path_elements` WHERE `path_elements`.`id` 
= 2348
D, [2020-01-16T12:01:55.633349 #64171] DEBUG -- : [10dfadaf-a0ca-4436-aa85-39469080e73d] [64171:80.99]   PathElement Update All (0.2ms)  UPDATE `path_elements` SET `position` = (`path_eleme
nts`.`position` - 1) WHERE `path_elements`.`parent_id` = 1391 AND (`path_elements`.`position` > 4)
D, [2020-01-16T12:01:55.636221 #64171] DEBUG -- : [10dfadaf-a0ca-4436-aa85-39469080e73d] [64171:80.99]    (2.6ms)  COMMIT
D, [2020-01-16T12:01:55.637535 #64171] DEBUG -- : [10dfadaf-a0ca-4436-aa85-39469080e73d] [64171:80.99]   Flag Load (0.3ms)  SELECT `flags`.* FROM `flags` WHERE `flags`.`project_id` = 75
D, [2020-01-16T12:01:55.639747 #64171] DEBUG -- : [10dfadaf-a0ca-4436-aa85-39469080e73d] [64171:80.99]   Project Exists (0.2ms)  SELECT  1 AS one FROM `projects` WHERE `projects`.`name` = '
BB:TMF-AG' AND `projects`.`id` != 75 LIMIT 1
D, [2020-01-16T12:01:55.640252 #64171] DEBUG -- : [10dfadaf-a0ca-4436-aa85-39469080e73d] [64171:80.99]    (0.1ms)  BEGIN
D, [2020-01-16T12:01:55.641196 #64171] DEBUG -- : [10dfadaf-a0ca-4436-aa85-39469080e73d] [64171:81.00]   CACHE Project Exists (0.0ms)  SELECT  1 AS one FROM `projects` WHERE `projects`.`nam
e` = 'BB:TMF-AG' AND `projects`.`id` != 75 LIMIT 1

Note that the DELETE statement does NOT include a parent_id, which may be causing the issue, since the might be other path entries with the same ID for a different parent_id.

This is a private instance OBS, and is causing a lot of problems to the users.

Steps to reproduce

  1. Add the path "containers-update" to SLE-12-SP4
    image

It gets added to BOTH SLE-12-SP4 and SLE-15-SP1.

  1. Remove the path "containers-update" from SLE-12-SP4
    image

It gets removed from BOTH SLE-12-SP4 and SLE-15-SP1.

@doccaz
Copy link
Contributor Author

doccaz commented Jan 16, 2020

I noticed that the tables appear to be correct (9 elements for SLE-15-SP1 and 4 elements for SLE-12-SP4).
However, it shows 10 elements for SLE-15-SP1 (with the "extra" containers-update repo from SLE-12-SP4).
So it COULD be an WebUI issue only.

@hennevogel hennevogel added Frontend Things related to the OBS RoR app Bug P2 If possible, assign this to yourself and fix it ASAP labels Jan 17, 2020
@doccaz
Copy link
Contributor Author

doccaz commented Jan 20, 2020

Another side effect we saw today (and could be related):
image

Some files that no longer exist are showing up in the WebUI, even though checking via osc shows that everything's okay. Perhaps this is a caching issue on the WebUI?

@hennevogel hennevogel removed the P2 If possible, assign this to yourself and fix it ASAP label Jan 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Frontend Things related to the OBS RoR app
Projects
None yet
Development

No branches or pull requests

2 participants