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

noisy warning: Flag "[name]" accessed without a request, which is likely in the context of a celery task. #320

Open
Tracked by #32888
DanielVZ96 opened this issue Oct 24, 2023 · 3 comments

Comments

@DanielVZ96
Copy link

DanielVZ96 commented Oct 24, 2023

This warning is appearing 29 times during provisioning in the edx-platform repo. It clutters logs and hinders dev experience (openedx/edx-platform#32888).

@regisb does this still need to be a warning? I'm trying to figure if I should ignore it in the edx-platform logs, or even if it should be moved to info/debug here.

Specific line of the warning: https://github.com/openedx/edx-toggles/blob/b93431d/edx_toggles/toggles/internal/waffle/flag.py#L79-L83

@DanielVZ96 DanielVZ96 changed the title Noisy warning: Flag "[name]" accessed without a request, which is likely in the context of a celery task. noisy warning: Flag "[name]" accessed without a request, which is likely in the context of a celery task. Oct 26, 2023
@regisb
Copy link
Contributor

regisb commented Oct 27, 2023

@regisb does this still need to be a warning?

I think it should still be a warning, but it should be deactivated in the context of provisioning.

@DanielVZ96
Copy link
Author

@regisb hmm, should we just disable all python warnings during provisioning? I think at this point any relevant warning is lost in the huge amount of logs.

cc: @Agrendalath

@regisb
Copy link
Contributor

regisb commented Nov 6, 2023

I don't think so, no. Python warnings are useful, when used correctly. They indicate deprecated packages, soon-to-be-changing APIs, etc. In general, warnings should be resolved, not muted.

In the case at hand, if it is correct behaviour to access a particular flag without a request, then the logging level should be lowered to something like INFO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants