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

[Tooling]: Running tooling in CI/CD is interrupted by cookie/analytics message #2221

Open
barthje opened this issue Mar 3, 2025 · 0 comments
Labels
bug Something isn't working tooling

Comments

@barthje
Copy link

barthje commented Mar 3, 2025

Describe the bug
The first time genkit runs it will show the following message:

Genkit CLI and Developer UI use cookies and similar technologies from Google
to deliver and enhance the quality of its services and to analyze usage.
Learn more at https://policies.google.com/technologies/cookies

Press "enter" to continue.

This breaks the flow when I want to run Evaluations in CI/CD. I've seen in the code it uses a method:

function isAnalyticsEnabled(): boolean {
  return (
    !process.argv.includes('--non-interactive') &&
    !getUserSettings()[ANALYTICS_OPT_OUT_CONFIG_TAG]
  );
}

but adding --non-interactive doesn't work because it doesn't know the option. Opting out doesn't seem to work either because when using npx genkit to change the configuration it also shows the same error message.

I've found a workaround by adding the configstore "tools-common.json" to the home folder so it skipps the message.

to determine if analytics should be enabled
To Reproduce
Steps to reproduce the behavior:

  1. Make sure ./config/configstore/@genkit-ai/tools-common.json is unset
  2. Run genkit with --non-interactive
  3. Get invalid option
  4. Run genkit without option
  5. Get the analytics message and "press to continue"

Expected behavior
I expect someway to pass this message by either using an option or setting an env variable.

Screenshots
File where the analytics code happens: https://github.com/firebase/genkit/blob/main/genkit-tools/common/src/utils/analytics.ts

@barthje barthje added bug Something isn't working tooling labels Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working tooling
Projects
Status: No status
Development

No branches or pull requests

1 participant