Closed Bug 1566230 Opened 6 years ago Closed 5 years ago

devicepool infinite loop when duplicate projects

Categories

(Infrastructure & Operations :: RelOps: General, defect, P3)

Production
defect

Tracking

(Not tracked)

RESOLVED FIXED
Future

People

(Reporter: aerickson, Assigned: aerickson)

Details

Also, figure out why duplicate projects are being created.

Jul 15 21:48:19 bitbar-devicepool-0 bash[26376]: Traceback (most recent call last):
Jul 15 21:48:19 bitbar-devicepool-0 bash[26376]:   File "/home/bitbar/mozilla-bitbar-devicepool/mozilla_bitbar_devicepool/main.py", line 170, in <module>
Jul 15 21:48:19 bitbar-devicepool-0 bash[26376]:     main()
Jul 15 21:48:19 bitbar-devicepool-0 bash[26376]:   File "/home/bitbar/mozilla-bitbar-devicepool/mozilla_bitbar_devicepool/main.py", line 167, in main
Jul 15 21:48:19 bitbar-devicepool-0 bash[26376]:     args.func(args)
Jul 15 21:48:19 bitbar-devicepool-0 bash[26376]:   File "/home/bitbar/mozilla-bitbar-devicepool/mozilla_bitbar_devicepool/main.py", line 55, in test_run_manager
Jul 15 21:48:19 bitbar-devicepool-0 bash[26376]:     configuration.configure(bitbar_configpath, filespath=args.files, update_bitbar=args.update_bitbar)
Jul 15 21:48:19 bitbar-devicepool-0 bash[26376]:   File "/home/bitbar/mozilla-bitbar-devicepool/mozilla_bitbar_devicepool/configuration.py", line 74, in configure
Jul 15 21:48:19 bitbar-devicepool-0 bash[26376]:     configure_projects(update_bitbar=update_bitbar)
Jul 15 21:48:19 bitbar-devicepool-0 bash[26376]:   File "/home/bitbar/mozilla-bitbar-devicepool/mozilla_bitbar_devicepool/configuration.py", line 174, in configure_projects
Jul 15 21:48:19 bitbar-devicepool-0 bash[26376]:     raise Exception('project {} has {} duplicates'.format(project_name, len(bitbar_projects) - 1))
Jul 15 21:48:19 bitbar-devicepool-0 bash[26376]: Exception: project mozilla-gw-unittest-g5 has 1 duplicates
Assignee: nobody → aerickson

The priority flag is not set for this bug.
:bc, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(bob)

P3 to be handled as time permits.

I believe we figured out the why... the bitbar rest api sometimes fails and returns an empty list when searching for a project without indication that a failure occurred. We discussed attempting multiple times during the configuration step as a work around for the hidden failure to reduce the chance of creating a new project with a duplicate name. It would be nice to be more robust however.

However it should be simple to make the detection of a duplicate project a fatal error that terminates the script. This should be extended to making duplicate device groups and devices fail also.

We investigate a better approach of preventing duplicate projects, device groups or devices from being created.

Flags: needinfo?(bob)
Priority: -- → P3
Component: Autophone → RelOps: General
Product: Testing → Infrastructure & Operations
QA Contact: klibby
Target Milestone: --- → Future
Version: Version 3 → Production

PR to exit on duplicate projects (https://github.com/bclary/mozilla-bitbar-devicepool/pull/89) has been landed.

I think we've permanently squashed our duplicate project issues (was due to finding other user's projects and we now only search for the current user). Closing.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.