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

kedro-telemetry causes error in read-only environments #781

Closed
astrojuanlu opened this issue Jul 23, 2024 · 5 comments
Closed

kedro-telemetry causes error in read-only environments #781

astrojuanlu opened this issue Jul 23, 2024 · 5 comments
Assignees
Labels
bug Something isn't working telemetry

Comments

@astrojuanlu
Copy link
Member

Description

Details still TBC, but there are hints that kedro-telemetry>=0.3.1 can produce an error when running on a read-only environment.

Context

https://linen-slack.kedro.org/t/22727587/hi-everyone-i-am-new-to-kedro-and-i-am-wondering-how-we-can-#66d97df5-5f59-4c93-a9f1-f68b5cef416f

The user was trying to run a pipeline on Google App Engine like this:

from kedro.framework.session import KedroSession
from kedro.framework.startup import bootstrap_project
from pathlib import Path
bootstrap_project(Path.cwd())
with KedroSession.create(save_on_close=False) as session:
    session.run()

(Following this link: https://docs.kedro.org/en/stable/kedro_project_setup/session.html)

cc @oscarvilla

@astrojuanlu astrojuanlu added bug Something isn't working telemetry labels Jul 23, 2024
@ElenaKhaustova
Copy link
Contributor

Reached out to the user to get some details.

@oscarvilla
Copy link

For completeness, I'm running the pipeline just with kedro run.

And when I remove telemetry from the requirements.txt passed into the App Engine builder/deployer, the read-only error disappears.

@ElenaKhaustova
Copy link
Contributor

ElenaKhaustova commented Jul 23, 2024

Thank you, @oscarvilla!

Some additional context:

  1. The user sees a log.error message that we output, but the error itself is caught, so it does not affect the execution
  2. That's the expected behaviour for read-only environments; here is how we handle it:
  3. In this case, project_id is considered as not set

It doesn't look like any immediate fixes are required, but we can consider the following:

  1. Change the log level from error to warning so it doesn't look scary to users.
  2. Show it only once for read-only environments now we log it every time we collect the telemetry
  3. Do not show it to users at all but log it at telemetry, so we know it's a read-only environment

@astrojuanlu
Copy link
Member Author

Agreed with all the points @ElenaKhaustova !

@merelcht
Copy link
Member

Also flagged by a user: kedro-org/kedro#4066

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working telemetry
Projects
None yet
Development

No branches or pull requests

4 participants