Project

General

Profile

Feature #21955

poms client submit a job by campaign

Added by Yuyi Guo 11 months ago. Updated 9 months ago.

Status:
Closed
Priority:
High
Assignee:
Target version:
Start date:
02/22/2019
Due date:
% Done:

100%

Estimated time:
Scope:
Internal
Experiment:
-
Stakeholders:
Duration:

Description

the current submission function is at stage level. We should allow to submit by campaign and it will start the first stage of the campaign.

Marc, I have to mark all the new features with high priority because Project-py depends on these.

History

#1 Updated by Marc Mengel 11 months ago

  • Status changed from New to Resolved

We now have:

def launch_campaign_stage_jobs(campaign_stage_id, test=None, experiment=None, configfile=None):
def launch_campaign_jobs(campaign_id, test=None, experiment=None, configfile=None):

to launch a specific stage, or to launch a campaign at the beginning.

#2 Updated by Yuyi Guo 11 months ago

2019-03-08 11:02:44,917 - ERROR - Failed to submit a campaign.
Traceback (most recent call last):
File "/Users/yuyi2/PycharmProjects/project-py/bin/poms_cli.py", line 250, in <module>
experiment=my_experiment)
File "/Users/yuyi2/PycharmProjects/poms/poms_client/python/poms_client.py", line 133, in launch_campaign_jobs
experiment=experiment)
File "/Users/yuyi2/PycharmProjects/poms/poms_client/python/poms_client.py", line 478, in make_poms_call
raise RuntimeError( "POMS call %s error: HTTP status: %d\n%s" % ( method, status_code, res ))
RuntimeError: POMS call launch_campaign error: HTTP status: 500
Traceback (most recent call last):
File "/home/poms/venvs/poms36_venv/lib/python3.6/site-packages/cherrypy/_cprequest.py", line 630, in respond
self._do_respond(path_info)
File "/home/poms/venvs/poms36_venv/lib/python3.6/site-packages/cherrypy/_cprequest.py", line 689, in _do_respond
response.body = self.handler()
File "/home/poms/venvs/poms36_venv/lib/python3.6/site-packages/cherrypy/lib/encoding.py", line 221, in call
self.body = self.oldhandler(*args, **kwargs)
File "/home/poms/venvs/poms36_venv/lib/python3.6/site-packages/cherrypy/_cpdispatch.py", line 54, in call
return self.callable(*self.args, **self.kwargs)
File "/home/poms/poms_releases/current/poms/poms/webservice/poms_service.py", line 123, in wrapper
return f(*args, **kwargs)
File "/home/poms/poms_releases/current/poms/poms/webservice/logit.py", line 18, in wrapper
return function(*args, **kwargs)
File "/home/poms/poms_releases/current/poms/poms/webservice/poms_service.py", line 1093, in launch_campaign
output_commands=output_commands)
File "/home/poms/poms_releases/current/poms/poms/webservice/CampaignsPOMS.py", line 402, in launch_campaign
experiment, test_launch, output_commands
File "/home/poms/poms_releases/current/poms/poms/webservice/TaskPOMS.py", line 1191, in launch_jobs
launch_time = launch_time)
File "/home/poms/poms_releases/current/poms/poms/webservice/TaskPOMS.py", line 407, in get_task_id_for
s = Submission(campaign_stage_id=cs.campaign_stage_id,
AttributeError: 'NoneType' object has no attribute 'campaign_stage_id'

ERROR:__main__:Failed to submit a campaign.
Traceback (most recent call last):
File "/Users/yuyi2/PycharmProjects/project-py/bin/poms_cli.py", line 250, in <module>
experiment=my_experiment)
File "/Users/yuyi2/PycharmProjects/poms/poms_client/python/poms_client.py", line 133, in launch_campaign_jobs
experiment=experiment)
File "/Users/yuyi2/PycharmProjects/poms/poms_client/python/poms_client.py", line 478, in make_poms_call
raise RuntimeError( "POMS call %s error: HTTP status: %d\n%s" % ( method, status_code, res ))
RuntimeError: POMS call launch_campaign error: HTTP status: 500
Traceback (most recent call last):
File "/home/poms/venvs/poms36_venv/lib/python3.6/site-packages/cherrypy/_cprequest.py", line 630, in respond
self._do_respond(path_info)
File "/home/poms/venvs/poms36_venv/lib/python3.6/site-packages/cherrypy/_cprequest.py", line 689, in _do_respond
response.body = self.handler()
File "/home/poms/venvs/poms36_venv/lib/python3.6/site-packages/cherrypy/lib/encoding.py", line 221, in call
self.body = self.oldhandler(*args, **kwargs)
File "/home/poms/venvs/poms36_venv/lib/python3.6/site-packages/cherrypy/_cpdispatch.py", line 54, in call
return self.callable(*self.args, **self.kwargs)
File "/home/poms/poms_releases/current/poms/poms/webservice/poms_service.py", line 123, in wrapper
return f(*args, **kwargs)
File "/home/poms/poms_releases/current/poms/poms/webservice/logit.py", line 18, in wrapper
return function(*args, **kwargs)
File "/home/poms/poms_releases/current/poms/poms/webservice/poms_service.py", line 1093, in launch_campaign
output_commands=output_commands)
File "/home/poms/poms_releases/current/poms/poms/webservice/CampaignsPOMS.py", line 402, in launch_campaign
experiment, test_launch, output_commands
File "/home/poms/poms_releases/current/poms/poms/webservice/TaskPOMS.py", line 1191, in launch_jobs
launch_time = launch_time)
File "/home/poms/poms_releases/current/poms/poms/webservice/TaskPOMS.py", line 407, in get_task_id_for
s = Submission(campaign_stage_id=cs.campaign_stage_id,
AttributeError: 'NoneType' object has no attribute 'campaign_stage_id'

mac-131688:test-project-py yuyi2$

#3 Updated by Marc Mengel 11 months ago

Yuyi,

You got this because you were trying to launch Nova campaigns as a uboone user.
(id 2386 = nova's prod_mcgen_fd_genie_fhc_fluxswap_cosmic_overlay
id 2836 = nova's MiniProd4_FDCosmicOverlay_FHC_170920_v3)

The database queried for a uboone campaign stage with that Id and got nothing back.

#4 Updated by Yuyi Guo 11 months ago

  • Status changed from Resolved to Feedback

Oh ! The campaign should be 3286, but I wrote 2386. After that was corrected, I was able to submit the campaign. 2836 is actually is a campaign stage id in uboone. Everything works now.

I would like to ask to send out meaning for errors when the user gave something wrong, such as HTTP 400 or something like you id is not valid.

#5 Updated by Marc Mengel 10 months ago

  • % Done changed from 0 to 100
  • Status changed from Feedback to Resolved

#6 Updated by Stephen White 9 months ago

  • Status changed from Resolved to Closed


Also available in: Atom PDF