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

Improve logging #1

Open
dave62 opened this issue Aug 6, 2019 · 4 comments
Open

Improve logging #1

dave62 opened this issue Aug 6, 2019 · 4 comments
Labels
enhancement New feature or request

Comments

@dave62
Copy link

dave62 commented Aug 6, 2019

As first "guinean pig" tester of this great solution to accelerate C8y assets/objects management across tenants, I encountered few hiccups during my first objects migration from an existing pilot tenant to my own PoC/internal tenant. Unfortunately the error message was very evasive as shown in the attached screenshot and no logging available to further debug the issue and trace down problematic object/migration step, forcing me to do a painful "try and error" migration approach almost object by object:
migration_tool_issue

For more complex migrations involving multiple objects and dependencies it would greatly help to have some logging functionality wrapped around the web app itself, or maybe as part of a contained microservice app to subscribe in the tenant with status and log options (vs just a web app and like what we have for fieldbus etc for instance).

@rpeach-sag rpeach-sag added the enhancement New feature or request label Aug 6, 2019
@rpeach-sag
Copy link
Contributor

Hi Dave,

I agree that the error logging probably need improving

You'll probably find that the error in the browser console (F12 on windows) is more informative - or at least may be useful for me. If you have a moment to recreate the issue then a copy of the browser console log would be really useful.

Any idea what it didn't like migrating?

Thanks for being the guinea pig and taking time to file an issue

@rpeach-sag rpeach-sag added the bug Something isn't working label Aug 6, 2019
@rpeach-sag
Copy link
Contributor

Following up from an email with the logs...

TypeError: n.body is undefined\n[188]/p</e.prototype.getBinaryBlob

The migration tool can't get the binary for the application because the cockpit application (being built in) does not store its binary on cumulocity.

This shouldn't be a problem because the cockpit application is installed on all tenants and doesn't need to be migrated.

The logging however is a valid concern

@rpeach-sag rpeach-sag removed the bug Something isn't working label Aug 7, 2019
@rpeach-sag
Copy link
Contributor

Debugged the actual code - turns out in this case it was a custom cockpit and the binary was available this was a bug and is captured in a separate issue: #2

@rpeach-sag
Copy link
Contributor

rpeach-sag commented Aug 7, 2019

Changes to be made to logging:

  • Change the Error: [Object object] popup to better display errors
  • Log which object caused the migration to fail
  • Store the full migration log in the user's browser for them to see/debug
  • Maybe: Store the logs on the server?

@rpeach-sag rpeach-sag changed the title Enhancement proposal: logging feature to help debugging tool runtime issues Enhancement: Improve logging Aug 7, 2019
@rpeach-sag rpeach-sag changed the title Enhancement: Improve logging Improve logging Aug 7, 2019
rpeach-sag added a commit that referenced this issue Jan 7, 2020
rpeach-sag added a commit that referenced this issue Jan 27, 2020
 - Each step now logs
 - Failure will print failed step and may include reason for failure (if c8y api is descriptive)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants