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

Error while editing dictionary entry #61

Closed
myroslav opened this issue Jun 3, 2013 · 9 comments
Closed

Error while editing dictionary entry #61

myroslav opened this issue Jun 3, 2013 · 9 comments
Assignees
Milestone

Comments

@myroslav
Copy link
Contributor

myroslav commented Jun 3, 2013

If one adds/modifies Dictionary entry on /zato/kvdb/data-dict/dictionary/ of web-admin the following error is in logs:

2013-06-04 02:07:53,916 - INFO - 9224:Dummy-85 - zato.kvdb.data-dict.dictionary.edit:22 - cid:[K131435394561131870982197202555370559375], name:[zato.kvdb.data-dict.dictionary.edit], SIO request:[{u'value': u'1', u'system': u'crm', u'key': u'customer:test', u'id': 3}]
2013-06-04 02:07:53,918 - ERROR - 9224:Dummy-85 - zato.server.connection.http_soap.channel:171 - Caught an exception, cid:[K131435394561131870982197202555370559375], status_code:[500], _format_exc:[Traceback (most recent call last):
  File "/home/zatotest/src/zato/code/zato-server/src/zato/server/connection/http_soap/channel.py", line 142, in dispatch
    self.simple_io_config, data_format, path_info)
  File "/home/zatotest/src/zato/code/zato-server/src/zato/server/connection/http_soap/channel.py", line 262, in handle
    worker_store, cid, simple_io_config, service_info=service_info, wsgi_environ=wsgi_environ)
  File "/home/zatotest/src/zato/code/zato-server/src/zato/server/service/__init__.py", line 585, in update_handle
    service.handle()
  File "/home/zatotest/src/zato/code/zato-server/src/zato/server/service/internal/service.py", line 266, in handle
    response = func(id_, payload, channel, data_format, transport, serialize=True)
  File "/home/zatotest/src/zato/code/zato-server/src/zato/server/service/__init__.py", line 606, in invoke
    return self.invoke_by_impl_name(self.server.service_store.name_to_impl_name[name], *args, **kwargs)
  File "/home/zatotest/src/zato/code/zato-server/src/zato/server/service/__init__.py", line 603, in invoke_by_impl_name
    self.cid, self.request.simple_io_config, serialize=serialize, as_bunch=as_bunch)
  File "/home/zatotest/src/zato/code/zato-server/src/zato/server/service/__init__.py", line 585, in update_handle
    service.handle()
  File "/home/zatotest/src/zato/code/zato-server/src/zato/server/service/internal/kvdb/data_dict/dictionary.py", line 74, in handle
    if self._validate_entry(item, id):
  File "/home/zatotest/src/zato/code/zato-server/src/zato/server/service/internal/kvdb/data_dict/dictionary.py", line 51, in _validate_entry
    raise ZatoException(self.cid, msg)
ZatoException: System and key may contain only letters, digits and an underscore, failed to validate [customer:test] against the regular expression \w+
]

However the error is not exposed on UI and mis-informed as success "Successfully updated the dictionary entry system:[crm], key:[customer:test], value:[1]".

@myroslav
Copy link
Contributor Author

myroslav commented Jun 3, 2013

The bigger problem is with creating entries, as creation process "never ends" with spinning "Please wait..." status message and same traceback but coming from zato.kvdb.data-dict.dictionary.create service.

@dsuch
Copy link
Collaborator

dsuch commented Jun 3, 2013

ZatoException: System and key may contain only letters, digits and an underscore,

Right, zato.admin.web.views.CreateEdit.call should check if response is OK and if it's not, it should raise an exception that will be caught by the method's final 'except Exception, e:' block.

@dsuch
Copy link
Collaborator

dsuch commented Jun 3, 2013

The bigger problem is with creating entries, as creation process "never ends"

Sorry, I can't reproduce it - I can create entries just fine. Can you please put the server in DEBUG mode and post the logs?

@dsuch
Copy link
Collaborator

dsuch commented Jun 3, 2013

Ah, OK, you mean entries with values outside of what is allowed. Mhm, you're right.

So this is a bug in the web admin as confirmed in a comment above and for now I will update docs to make it clear such values are not allowed. The docs should state it in any case.

This bug is trivial to fix so if anyone feels like contributing a patch - feel free to send a pull request!

@myroslav
Copy link
Contributor Author

myroslav commented Jun 3, 2013

The server "never finishes" creating entries with invalid chars

On Tue, Jun 4, 2013 at 2:24 AM, Dariusz Suchojad
notifications@github.comwrote:

The bigger problem is with creating entries, as creation process "never
ends"

Sorry, I can't reproduce it - I can create entries just fine. Can you
please put the server in DEBUG mode and post the logs?


Reply to this email directly or view it on GitHubhttps://github.com//issues/61#issuecomment-18880148
.

....................................................................................................................................
Myroslav Opyr ▪ CTO ▪ Quintagroup ▪ +1.917.475.4725 ▪
http://quintagroup.com
˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙

@dsuch
Copy link
Collaborator

dsuch commented Jun 4, 2013

The server "never finishes" creating entries with invalid chars

I don't understand it - are they created or not? Can you please post the logs? I just don't understand what "never finishes" means. Do you mean the worker hangs?

@myroslav
Copy link
Contributor Author

myroslav commented Jun 4, 2013

Entries with invalid keys are not created.

"Never finishes" is visually, the dialog stays open, the status message
"Please wait..." with spinning throbber is displayed. Reloading the page
helps to restore page to initial state. Log shows the same traceback like
when editing. Once, while trying to convince Zato Web UI to create entry
I'd managed to hang the web UI (ie it stopped to responding to HTML
requests with no further info in logs) but after that I'd tried to
reproduce the hang and failed.

On Tue, Jun 4, 2013 at 10:50 AM, Dariusz Suchojad
notifications@github.comwrote:

The server "never finishes" creating entries with invalid chars

I don't understand it - are they created or not? Can you please post the
logs? I just don't understand what "never finishes" means. Do you mean the
worker hangs?


Reply to this email directly or view it on GitHubhttps://github.com//issues/61#issuecomment-18894060
.

....................................................................................................................................
Myroslav Opyr ▪ CTO ▪ Quintagroup ▪ +1.917.475.4725 ▪
http://quintagroup.com
˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙

@dsuch
Copy link
Collaborator

dsuch commented Jun 4, 2013

OK, so this is a bug in web admin which doesn't check if response from servers is OK.

Django always returns a success message to JavaScript and JS attempts to access elements that don't exist, hence the GUI hangs.

OK, thanks for confirming everything is fine on the server side. This is GUI that needs a fix and documentation too because such names are really not allowed - this should be documented.

@ghost ghost assigned dsuch Jun 5, 2013
dsuch pushed a commit that referenced this issue Jun 17, 2013
@dsuch
Copy link
Collaborator

dsuch commented Jun 17, 2013

Thanks @myroslav, this is fixed in e78cc6e and a hotfix has been released too!

dsuch pushed a commit that referenced this issue Jun 23, 2013
@dsuch dsuch closed this as completed Jun 24, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants