Skip to content

[🐛 Bug]: Sauce Service uploads log files from other instances #10349

@alexplischke

Description

@alexplischke

Have you read the Contributing Guidelines on issues?

WebdriverIO Version

latest

Node.js Version

18

Mode

Standalone Mode

Which capabilities are you using?

No response

What happened?

Using the Sauce Service and setting uploadLogs: true results in unrelated log files from other instances to be uploaded.

The issue lies here:

file.startsWith(`wdio-${this._cid}`) 

Running more than 10 specs means that a pattern like wdio-0-1 is also going to apply to wdio-0-10.log, wdio-0-155.log etc.

What is your expected behavior?

Only log files from the relevant instances are uploaded.

How to reproduce the bug.

To reproduce the bug, ensure that you use the Sauce service (wdio.conf.js):

    uploadLogs: true,
    outputDir: './logs',
    user: process.env.SAUCE_USERNAME,
    key: process.env.SAUCE_ACCESS_KEY,
    services: ['sauce'],

A test of any kind of will suffice, but you need to have more than 10 specs.

Relevant log output

No relevant log output.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Is there an existing issue for this?

  • I have searched the existing issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions