Samsung/Universum

Ambigous exception messages for P4

Closed this issue · 0 comments

Some examples:

[14:44:55] :		 [Step 1/2] ==> Run: python3.7 -u -m universum --no-diff --p4-client <client> --p4-force-clean --vcs-type p4
[14:44:56] :		 [Step 1/2] ==> Universum 0.19.2 started execution
[14:44:56] :		 [Step 1/2] 1. Preparing repository
[14:44:56] :			 [1. Preparing repository] ==> Adding file REPOSITORY_STATE.txt to artifacts...
[14:44:56] :			 [1. Preparing repository] 1.1. Connecting
[14:44:56] :				 [1.1. Connecting] 1.1.1. Disconnecting
[14:44:56] :			 [1. Preparing repository] 1.2. Creating workspace
[14:44:56] :		 [Step 1/2] 2. Finalizing (1s)
[14:44:56] :			 [2. Finalizing] 2.1. Connecting
[14:44:56] :				 [2.1. Connecting] 2.1.1. Disconnecting
[14:44:56] :			 [2. Finalizing] 2.2. Cleaning workspace (1s)
[14:44:57] :			 [2. Finalizing] 2.3. Disconnecting
[14:44:57] :			 [2. Finalizing] 2.4. Disconnecting
[14:44:57] :		 [Step 1/2] ==> Universum 0.19.2 finished execution
[14:44:57]W:		 [Step 1/2] Traceback (most recent call last):
[14:44:57]W:		 [Step 1/2]   File "/usr/local/lib/python3.7/dist-packages/universum/lib/utils.py", line 164, in excepted_function
[14:44:57]W:		 [Step 1/2]     func(*args, **kwargs)
[14:44:57]W:		 [Step 1/2]   File "/usr/local/lib/python3.7/dist-packages/universum/main.py", line 72, in execute
[14:44:57]W:		 [Step 1/2]     self.vcs.prepare_repository()
[14:44:57]W:		 [Step 1/2]   File "/usr/local/lib/python3.7/dist-packages/universum/lib/utils.py", line 187, in function_in_block
[14:44:57]W:		 [Step 1/2]     return self.structure.run_in_block(func, block_name, pass_errors, self, *args, **kwargs)
[14:44:57]W:		 [Step 1/2]   File "/usr/local/lib/python3.7/dist-packages/universum/modules/structure_handler.py", line 121, in run_in_block
[14:44:57]W:		 [Step 1/2]     result = operation(*args, **kwargs)
[14:44:57]W:		 [Step 1/2]   File "/usr/local/lib/python3.7/dist-packages/universum/modules/vcs/vcs.py", line 173, in prepare_repository
[14:44:57]W:		 [Step 1/2]     self.driver.prepare_repository()
[14:44:57]W:		 [Step 1/2]   File "/usr/local/lib/python3.7/dist-packages/universum/modules/vcs/perforce_vcs.py", line 558, in prepare_repository
[14:44:57]W:		 [Step 1/2]     self.create_workspace()
[14:44:57]W:		 [Step 1/2]   File "/usr/local/lib/python3.7/dist-packages/universum/lib/utils.py", line 187, in function_in_block
[14:44:57]W:		 [Step 1/2]     return self.structure.run_in_block(func, block_name, pass_errors, self, *args, **kwargs)
[14:44:57]W:		 [Step 1/2]   File "/usr/local/lib/python3.7/dist-packages/universum/modules/structure_handler.py", line 121, in run_in_block
[14:44:57]W:		 [Step 1/2]     result = operation(*args, **kwargs)
[14:44:57]W:		 [Step 1/2]   File "/usr/local/lib/python3.7/dist-packages/universum/lib/utils.py", line 105, in function_to_run
[14:44:57]W:		 [Step 1/2]     result = function(*args, **kwargs)
[14:44:57]W:		 [Step 1/2]   File "/usr/local/lib/python3.7/dist-packages/universum/modules/vcs/perforce_vcs.py", line 370, in create_workspace
[14:44:57]W:		 [Step 1/2]     self.expand_workspace_parameters()
[14:44:57]W:		 [Step 1/2]   File "/usr/local/lib/python3.7/dist-packages/universum/modules/vcs/perforce_vcs.py", line 351, in expand_workspace_parameters
[14:44:57]W:		 [Step 1/2]     self.depots.append({"path": splat_entry[0], "cl": splat_entry[1]})
[14:44:57]W:		 [Step 1/2] IndexError: list index out of range
  • got by passing two different CLs to CL_SYNC;
[14:46:21] :		 [Step 1/2] ==> Run: python3.7 -u -m universum --no-diff --p4-client <client> --p4-force-clean --vcs-type p4
[14:46:21] :		 [Step 1/2] ==> Universum 0.19.2 started execution
[14:46:21] :		 [Step 1/2] 1. Preparing repository (32s)
[14:46:21] :			 [1. Preparing repository] ==> Adding file REPOSITORY_STATE.txt to artifacts...
[14:46:21] :			 [1. Preparing repository] 1.1. Connecting
[14:46:21] :				 [1.1. Connecting] 1.1.1. Disconnecting
[14:46:21] :			 [1. Preparing repository] 1.2. Creating workspace (3s)
[14:46:21] :				 [1.2. Creating workspace] 1.2.1. Cleaning workspace (1s)
[14:46:25] :				 [1.2. Creating workspace] ==> Workspace <client> created/updated.
[14:46:25] :			 [1. Preparing repository] 1.3. Downloading (28s)
[14:46:25] :				 [1.3. Downloading] ==> Getting latest CL number for '<branch>'
[14:46:25] :				 [1.3. Downloading] ==> Latest CL: 20198455
[14:46:25] :				 [1.3. Downloading] ==> Downloading <branch>@20198455
[14:46:53] :				 [1.3. Downloading] ==> Downloaded 2960 files.
[14:46:53] :			 [1. Preparing repository] 1.4. Unshelving
[14:46:53] :				 [1.4. Unshelving] ==> Unshelve CL 20125154
[14:46:54]W:		 [Step 1/2] 2. Finalizing (4s)
[14:46:54] :			 [2. Finalizing] 2.1. Connecting
[14:46:54] :				 [2.1. Connecting] 2.1.1. Disconnecting
[14:46:54] :			 [2. Finalizing] 2.2. Cleaning workspace (4s)
[14:46:58] :			 [2. Finalizing] 2.3. Disconnecting
[14:46:58] :			 [2. Finalizing] 2.4. Disconnecting
[14:46:58]W:			 [2. Finalizing] 2.5. Cleaning copied sources
[14:46:58]W:				 [2.5. Cleaning copied sources] Traceback (most recent call last):
[14:46:58]W:				 [2.5. Cleaning copied sources]   File "/usr/local/lib/python3.7/dist-packages/universum/modules/vcs/perforce_vcs.py", line 433, in p4unshelve
[14:46:58]W:				 [2.5. Cleaning copied sources]     result = self.p4.run_unshelve(*args, **kwargs)
[14:46:58]W:				 [2.5. Cleaning copied sources]   File "/usr/local/lib/python3.7/dist-packages/P4.py", line 497, in <lambda>
[14:46:58]W:				 [2.5. Cleaning copied sources]     return lambda *args, **kargs: self.run(cmd, *args, **kargs)
[14:46:58]W:				 [2.5. Cleaning copied sources]   File "/usr/local/lib/python3.7/dist-packages/P4.py", line 611, in run
[14:46:58]W:				 [2.5. Cleaning copied sources]     raise e
[14:46:58]W:				 [2.5. Cleaning copied sources]   File "/usr/local/lib/python3.7/dist-packages/P4.py", line 605, in run
[14:46:58]W:				 [2.5. Cleaning copied sources]     result = P4API.P4Adapter.run(self, *flatArgs)
[14:46:58]W:				 [2.5. Cleaning copied sources] P4.P4Exception: [P4#run] Errors during command execution( "p4 unshelve -s 20125154 -f" )
[14:46:58]W:				 [2.5. Cleaning copied sources] 
[14:46:58]W:				 [2.5. Cleaning copied sources] 	[Error]: 'Change 20125154 is already committed.'
[14:46:58] :		 [Step 1/2] ==> Universum 0.19.2 finished execution
[14:46:58]W:		 [Step 1/2] During handling of the above exception, another exception occurred:
[14:46:58]W:		 [Step 1/2] 
[14:46:58]W:		 [Step 1/2] Traceback (most recent call last):
[14:46:58]W:		 [Step 1/2]   File "/usr/local/lib/python3.7/dist-packages/universum/lib/utils.py", line 164, in excepted_function
[14:46:58]W:		 [Step 1/2]     func(*args, **kwargs)
[14:46:58]W:		 [Step 1/2]   File "/usr/local/lib/python3.7/dist-packages/universum/main.py", line 72, in execute
[14:46:58]W:		 [Step 1/2]     self.vcs.prepare_repository()
[14:46:58]W:		 [Step 1/2]   File "/usr/local/lib/python3.7/dist-packages/universum/lib/utils.py", line 187, in function_in_block
[14:46:58]W:		 [Step 1/2]     return self.structure.run_in_block(func, block_name, pass_errors, self, *args, **kwargs)
[14:46:58]W:		 [Step 1/2]   File "/usr/local/lib/python3.7/dist-packages/universum/modules/structure_handler.py", line 121, in run_in_block
[14:46:58]W:		 [Step 1/2]     result = operation(*args, **kwargs)
[14:46:58]W:		 [Step 1/2]   File "/usr/local/lib/python3.7/dist-packages/universum/modules/vcs/vcs.py", line 173, in prepare_repository
[14:46:58]W:		 [Step 1/2]     self.driver.prepare_repository()
[14:46:58]W:		 [Step 1/2]   File "/usr/local/lib/python3.7/dist-packages/universum/modules/vcs/perforce_vcs.py", line 560, in prepare_repository
[14:46:58]W:		 [Step 1/2]     self.unshelve()
[14:46:58]W:		 [Step 1/2]   File "/usr/local/lib/python3.7/dist-packages/universum/lib/utils.py", line 187, in function_in_block
[14:46:58]W:		 [Step 1/2]     return self.structure.run_in_block(func, block_name, pass_errors, self, *args, **kwargs)
[14:46:58]W:		 [Step 1/2]   File "/usr/local/lib/python3.7/dist-packages/universum/modules/structure_handler.py", line 121, in run_in_block
[14:46:58]W:		 [Step 1/2]     result = operation(*args, **kwargs)
[14:46:58]W:		 [Step 1/2]   File "/usr/local/lib/python3.7/dist-packages/universum/lib/utils.py", line 105, in function_to_run
[14:46:58]W:		 [Step 1/2]     result = function(*args, **kwargs)
[14:46:58]W:		 [Step 1/2]   File "/usr/local/lib/python3.7/dist-packages/universum/modules/vcs/perforce_vcs.py", line 450, in unshelve
[14:46:58]W:		 [Step 1/2]     report = self.p4unshelve("-s", cl, "-f")
[14:46:58]W:		 [Step 1/2]   File "/usr/local/lib/python3.7/dist-packages/universum/modules/vcs/perforce_vcs.py", line 440, in p4unshelve
[14:46:58]W:		 [Step 1/2]     raise P4Exception from e
[14:46:58]W:		 [Step 1/2] TypeError: __init__() missing 1 required positional argument: 'value'
  • got by trying to unshelve an already committed CL.

The problem is, these exception messages do not explain what is the problem, and make finding a reason of a failure more difficult. Should be fixed.