Project

General

Profile

Bug #25183

error creatiing a new login when making a new campaign.

Added by Marc Mengel 2 months ago. Updated 12 days ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
Start date:
11/09/2020
Due date:
% Done:

0%

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

Description

I receive a vague error message whenever I attempt to create a new login or type when making a new campaign. See attached

POMS_oops_login (1).png (60.5 KB) POMS_oops_login (1).png Marc Mengel, 11/09/2020 12:04 PM
POMS_oops_login_2 (1).png (96.5 KB) POMS_oops_login_2 (1).png Marc Mengel, 11/09/2020 12:05 PM

History

#1 Updated by Marc Mengel 2 months ago

I do note that in both the example images the user sent, they did not check any boxes in the list of items to update, which may have been the cause of the error; but the error message clearly needs work.

We probably want the items to default to checked, and the error message to be specific if none of them are...

#2 Updated by Marc Mengel 25 days ago

  • Target version set to v4_3_0

#3 Updated by Marc Mengel 25 days ago

Vito also reported this from poms_client calls
vito:house_with_garden: 2:38 PM
I also tried to implement a login_setup_edit function, using job_type_edit as an example,
def login_setup_edit(launch_host, launch_account, launch_setup, pc_username=None,
action=None, name=None, experiment=None, test_client=False, role=None, configfile=None):
logging.debug("in get launch_jobs test_client = " + repr(test_client))
method = "login_setup_edit"
ae_launch_host = launch_host
ae_launch_account = launch_account
ae_launch_setup = launch_setup
ae_launch_name = name
data, status_code = make_poms_call(pcl_call=1,
method=method,
pc_username=pc_username,
action=action,
ae_launch_name=ae_launch_name,
experiment=experiment,
role=role,
ae_launch_host=ae_launch_host,
ae_launch_account=ae_launch_account,
ae_launch_setup=ae_launch_setup,
test_client=test_client,
configfile=configfile)
return "status_code", status_code
and in the error log logs/poms/error.log I get (edited)
2:38
2020-12-09 12:49:53,511 <13698.140216480278272> {'name_1': 'vito_login_test'}
2020-12-09 12:49:53,513 <13698.140216480278272> Permissions.log: permissions: got data: []
2020-12-09 12:49:53,513 <13698.140216480278272> Permissions.log: can_modify: LoginSetup cur: vito, sbnd, analysis; item: None, None, None
2020-12-09 12:49:53,514 <13698.140216480278272> Permissions.log: can_modify: resp: ok
2020-12-09 12:49:53,515 <13698.140216480278272> SELECT experimenters.experimenter_id AS experimenters_experimenter_id, experimenters.first_name AS experimenters_first_name, experimenters.last_name AS experimenters_last_name, experimenters.username AS experimenters_username, experimenters.last_login AS experimenters_last_login, experimenters.session_experiment AS experimenters_session_experiment, experimenters.session_role AS experimenters_session_role, experimenters.root AS experimenters_root
FROM experimenters
WHERE experimenters.username = %(username_1)s
LIMIT %(param_1)s
2020-12-09 12:49:53,515 <13698.140216480278272> {'username_1': 'vito', 'param_1': 1}
2020-12-09 12:49:53,516 <13698.140216480278272> MiscPOMS.log: login_setup_edit: action is: edit , args {'pcl_call': '1', 'ae_launch_name': 'vito_login_test', 'ae_launch_host': 'testhost', 'ae_launch_account': 'test_account', 'ae_launch_setup': 'source /grid/fermiapp/products/common/etc/setups.sh; setup fife_utils v3_3'}
2020-12-09 12:49:53,517 <13698.140216480278272> SELECT login_setups.login_setup_id AS login_setups_login_setup_id, login_setups.name AS login_setups_name, login_setups.experiment AS login_setups_experiment, login_setups.launch_host AS login_setups_launch_host, login_setups.launch_account AS login_setups_launch_account, login_setups.launch_setup AS login_setups_launch_setup, login_setups.creator AS login_setups_creator, login_setups.created AS login_setups_created, login_setups.updater AS login_setups_updater, login_setups.updated AS login_setups_updated, login_setups.creator_role AS login_setups_creator_role, login_setups.active AS login_setups_active
FROM login_setups
WHERE login_setups.experiment = %(experiment_1)s AND login_setups.name = %(name_1)s
LIMIT %(param_1)s
2020-12-09 12:49:53,517 <13698.140216480278272> {'experiment_1': 'sbnd', 'name_1': 'vito_login_test', 'param_1': 1}
2020-12-09 12:49:53,518 <13698.140216480278272> MiscPOMS.log: login_setup_edit: add,edit case
2020-12-09 12:49:53,519 <13698.140216480278272> rewriting:
Traceback (most recent call last):
File "/home/poms/current/poms/poms/webservice/poms_method.py", line 49, in wrapper
return f(*args, **kwargs)
File "/home/poms/current/poms/poms/webservice/poms_method.py", line 214, in method
values = func(self, **kwargs)
File "/home/poms/current/poms/poms/webservice/poms_service.py", line 260, in login_setup_edit
res = {"data": self.miscPOMS.login_setup_edit(ctx, **kwargs)}
File "/home/poms/current/poms/poms/webservice/MiscPOMS.py", line 134, in login_setup_edit
.filter(LoginSetup.experiment == experiment)
NameError: name 'experiment' is not defined
2020-12-09 12:49:53,519 <13698.140216480278272> poms_service.wrapper Method End
2020-12-09 12:49:53,519 <13698.140216480278272> ROLLBACK
<13698> 131.225.240.175 - - [09/Dec/2020:12:49:53] "POST /poms/login_setup_edit HTTP/1.1" 400 239 "" "python-requests/2.9.1"
not sure why it complains that experiment is not defined

#4 Updated by Marc Mengel 25 days ago

So I believe this was fixed in 111b98ab which is rolled into production.

There is still and OOPS in the gui; but the new login_setup now gets added properly.

#5 Updated by Marc Mengel 25 days ago

  • Assignee set to Marc Mengel
  • Status changed from New to Resolved

#6 Updated by Marc Mengel 12 days ago

Tested.

Also available in: Atom PDF