Skip to content

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

Open
@barthje

Description

@barthje

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtooling

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions