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 #3638

Merged
merged 4 commits into from
Jul 6, 2022
Merged

Improve logging #3638

merged 4 commits into from
Jul 6, 2022

Conversation

mifi
Copy link
Contributor

@mifi mifi commented Apr 11, 2022

When I was debugging the dynamic oauth I was struggling to understand why the provider auth window was just closing without any feedback. Turns out the errors were being logged at console.debug level, which did not show up the javascript console.

This PR will change the logging levels to error, so it's more clear what went wrong. Also added some helper code in developer Dashboard for easier testing of dynamic oauth

@mifi
Copy link
Contributor Author

mifi commented Apr 11, 2022

@mifi mifi requested review from goto-bus-stop and Murderlon April 11, 2022 11:08
@mifi
Copy link
Contributor Author

mifi commented Apr 11, 2022

@Murderlon seems like another unstable e2e test:

     AssertionError: Timed out retrying after 12000ms: Expected to find element: `.uppy-Informer p[role="alert"]`, but never found it.

I thought we increased the timeout to 60 seconds

Comment on lines 50 to 52
const companionAllowedHosts = undefined
// If you want to test dynamic OAuth, instead use:
// const companionAllowedHosts = Transloadit.COMPANION_PATTERN
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use import.meta.env.VITE_COMPANION_ALLOWED_HOSTS instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, but then we cannot use the special Transloadit.COMPANION_PATTERN constant, so we would need to duplicate that value inside .env, not sure if that's the best solution?

Copy link
Contributor

@goto-bus-stop goto-bus-stop Apr 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Transloadit.COMPANION_PATTERN should work for the vbox as well as prod, so I think it's the only one we're likely to use?

I guess having it en/disable-able from the env would be useful so you can do it in the same place as the VITE_COMPANION_URL.

@arturi
Copy link
Contributor

arturi commented Jun 15, 2022

@mifi can we merge this?

@mifi
Copy link
Contributor Author

mifi commented Jun 16, 2022

yes, after another round of reviews maybe

@mifi mifi requested review from goto-bus-stop and aduh95 June 16, 2022 05:42
private/dev/Dashboard.js Outdated Show resolved Hide resolved
@aduh95 aduh95 merged commit 3277ac3 into main Jul 6, 2022
@aduh95 aduh95 deleted the improve-logging branch July 6, 2022 14:28
@github-actions github-actions bot mentioned this pull request Jul 6, 2022
github-actions bot added a commit that referenced this pull request Jul 6, 2022
| Package              | Version | Package              | Version |
| -------------------- | ------- | -------------------- | ------- |
| @uppy/companion      |   3.7.0 | @uppy/transloadit    |   2.3.2 |
| @uppy/locales        |   2.1.1 | @uppy/robodog        |   2.8.2 |
| @uppy/provider-views |   2.1.2 | uppy                 |  2.12.2 |

- @uppy/provider-views: improve logging (Mikael Finstad / #3638)
- docs: de-dupe companion dev docs (Mikael Finstad / #3852)
- @uppy/companion: Getkey safe behavior (Mikael Finstad / #3592)
- website: fix broken links (YukeshShr / #3861)
- @uppy/companion: doc: fix Google Drive example (Antoine du Hamel / #3855)
- @uppy/locales,@uppy/transloadit: Fix undefined error in in onTusError (Merlijn Vos / #3848)
- @uppy/companion: build an ARM64 container (Stuart Auld / #3841)
- @uppy/locales: Add missing translations and reorder nl_NL locale (Kasper Meinema / #3839)
- docs: Fix typo in aws-s3-multipart.md (Ikko Ashimine / #3838)
- meta: do not rebase when preparing beta candidates (Antoine du Hamel)
- meta: fix hard-coded branch name in release script (Antoine du Hamel)
HeavenFox pushed a commit to docsend/uppy that referenced this pull request Jun 27, 2023
| Package              | Version | Package              | Version |
| -------------------- | ------- | -------------------- | ------- |
| @uppy/companion      |   3.7.0 | @uppy/transloadit    |   2.3.2 |
| @uppy/locales        |   2.1.1 | @uppy/robodog        |   2.8.2 |
| @uppy/provider-views |   2.1.2 | uppy                 |  2.12.2 |

- @uppy/provider-views: improve logging (Mikael Finstad / transloadit#3638)
- docs: de-dupe companion dev docs (Mikael Finstad / transloadit#3852)
- @uppy/companion: Getkey safe behavior (Mikael Finstad / transloadit#3592)
- website: fix broken links (YukeshShr / transloadit#3861)
- @uppy/companion: doc: fix Google Drive example (Antoine du Hamel / transloadit#3855)
- @uppy/locales,@uppy/transloadit: Fix undefined error in in onTusError (Merlijn Vos / transloadit#3848)
- @uppy/companion: build an ARM64 container (Stuart Auld / transloadit#3841)
- @uppy/locales: Add missing translations and reorder nl_NL locale (Kasper Meinema / transloadit#3839)
- docs: Fix typo in aws-s3-multipart.md (Ikko Ashimine / transloadit#3838)
- meta: do not rebase when preparing beta candidates (Antoine du Hamel)
- meta: fix hard-coded branch name in release script (Antoine du Hamel)
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

Successfully merging this pull request may close these issues.

4 participants