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

CICD asks for analytics, no way to opt out #1846

Closed
1 task done
christian-hess-94 opened this issue Jul 29, 2024 · 10 comments · Fixed by #1848
Closed
1 task done

CICD asks for analytics, no way to opt out #1846

christian-hess-94 opened this issue Jul 29, 2024 · 10 comments · Fixed by #1848
Assignees
Labels
bug Something isn't working P0 Critical issues that affect many users regression-v1.37.x Issue introduced in the 1.37.x release

Comments

@christian-hess-94
Copy link

Is there an existing issue for this?

  • I have searched the existing issues and didn't find mine.

Steps to reproduce

We are pushing a RN update in our app. We use maestro for running visual regression screenshot tests, and the branch that has the update is getting stuck when maestro asks us to opt into analytics:
image

Actual results

The CICD workflow gets stuck after bundling the app and running maestro, as maestro asks for us to opt into analytics:
image

Expected results

We would like to know if we can modify the command to run maestro to automatically opt out of analytics (we do not wish to opt in at this point)

About app

The app is closed source. The issue with maestro is happening only when running out visual regression suites via github actions CICD runners.

About environment

The workflow runs on ubuntu, I don't know which specific version

Logs

Logs
BUILD SUCCESSFUL in 11m 46s
983 actionable tasks: 983 executed

Build successful!
Starting emulator...
Waiting for emulator to start...
Installing APK on emulator...
Performing Streamed Install
Success

App installed successfully!
Waiting for the simulator to start...
===== Run E2E Attempt: 1 ====
Maestro CLI would like to collect anonymous usage data to improve the product.
Enable analytics? [Y/n] 
Error: The operation was canceled.

Maestro version

1.33.1

How did you install Maestro?

install script (https://get.maestro.mobile.dev)

Anything else?

This is the step where we are installing maestro in our CICD machine:

@bartekpacia
Copy link
Contributor

Hey @christian-hess-94, sorry about this!

For now, this should work: printf 'n\n' | maestro <...>

@christian-hess-94
Copy link
Author

hi @bartekpacia! Thanks for the response. This is the way we are running the maestro command:

const MAESTRO_TEST_COMMAND = `${process.env.HOME}/.maestro/bin/maestro test .maestro/storybook.yml`;
...
const child = spawn(MAESTRO_TEST_COMMAND , [], { ...options, shell: true });

So i'd change it to:

const MAESTRO_TEST_COMMAND = `printf 'n\n' | ${process.env.HOME}/.maestro/bin/maestro test .maestro/storybook.yml`;
...
const child = spawn(MAESTRO_TEST_COMMAND , [], { ...options, shell: true });`

@bartekpacia
Copy link
Contributor

Hey @christian-hess-94, v1.37.4 is out and this problem should no longer occur on CIs.

To disable analytics collection (and asking for it), set MAESTRO_CLI_NO_ANALYTICS environment variable to any value, for example:

MAESTRO_CLI_NO_ANALYTICS=1

Please let me know if the issue persists.

@bartekpacia bartekpacia reopened this Jul 30, 2024
@bartekpacia bartekpacia added bug Something isn't working waiting for customer response More information is needed from the customer before we can progress on the issue labels Jul 30, 2024
@christian-hess-94
Copy link
Author

awesome thanks for the quick response, I'll try to implement it here and circle back to you!

@github-actions github-actions bot removed the waiting for customer response More information is needed from the customer before we can progress on the issue label Jul 30, 2024
@christian-hess-94
Copy link
Author

christian-hess-94 commented Jul 30, 2024

@bartekpacia would this work as a way to set the analytics env variable?
image
So basically setting it during install, so it goes over to when we eventually execute maestro using node

@bartekpacia
Copy link
Contributor

Nope. On GitHub Actions you set env vars in a bit different way - see here

@christian-hess-94
Copy link
Author

christian-hess-94 commented Jul 30, 2024

oh ok got it thanks! I have modified like so:
image

the yarn test:visual:android line is the script that executes maestro:
"test:visual:android": "node .maestro/scripts/visual-testing.js compareScreenshots --platform=android",

this leads to the code snippets I sent originally:

const MAESTRO_TEST_COMMAND = `${process.env.HOME}/.maestro/bin/maestro test .maestro/storybook.yml`;
...
const child = spawn(MAESTRO_TEST_COMMAND , [], { ...options, shell: true });

does this make sense?

@bartekpacia
Copy link
Contributor

Yes, that should work.

If it solves your problem, please close the issue. Cheers!

@bartekpacia bartekpacia self-assigned this Jul 31, 2024
@bartekpacia bartekpacia added P0 Critical issues that affect many users regression-v1.37.x Issue introduced in the 1.37.x release labels Jul 31, 2024
@bartekpacia
Copy link
Contributor

This was released in v1.37.4.

If this issue still occurs to you, please comment.

Copy link

github-actions bot commented Aug 7, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar problem, please file a new issue. Make sure to follow the template and provide all the information necessary to reproduce the issue.
Thank you for helping keep us our issue tracker clean!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working P0 Critical issues that affect many users regression-v1.37.x Issue introduced in the 1.37.x release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants