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

WDIOService logs to file and upload to server #11580

Merged

Conversation

kamal-kaur04
Copy link
Contributor

Proposed changes

Writing all the WDIOService logs to File and upload to the server.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Checklist

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • I have added proper type definitions for new commands (if appropriate)

Further comments

Reviewers: @webdriverio/project-committers

@kamal-kaur04 kamal-kaur04 marked this pull request as draft November 3, 2023 05:09
@kamal-kaur04 kamal-kaur04 marked this pull request as ready for review November 3, 2023 09:41
@@ -1120,3 +1133,26 @@ export async function pushDataToQueue(data: UploadType, requestQueueHandler: Req
}

export const sleep = (ms = 100) => new Promise((resolve) => setTimeout(resolve, ms))

export async function uploadLogs(user: string | undefined, key: string | undefined, clientBuildUuid: string) {
Copy link
Member

Choose a reason for hiding this comment

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

Is the request actually succeeding if no user and key is provided? if you only allow undefined so it doesn't throw a type issue I recommend to have something like:

if (user && key) {
    uploadLogs(...)
}

packages/wdio-browserstack-service/src/util.ts Outdated Show resolved Hide resolved
Copy link
Member

@christian-bromann christian-bromann left a comment

Choose a reason for hiding this comment

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

LGTM 👍
Thanks a lot!

@christian-bromann christian-bromann added the PR: New Feature 🚀 PRs that contain new features label Nov 6, 2023
@christian-bromann christian-bromann merged commit 7ed8367 into webdriverio:main Nov 6, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: New Feature 🚀 PRs that contain new features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants