-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add PREFECT_LOGGING_ORION_WHEN_MISSING_FLOW
setting to handle error raised when logs outside of flow run context
#8311
Conversation
✅ Deploy Preview for prefect-orion ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
Looks like a good start! |
PREFECT_LOGGING_ORION_WHEN_MISSING_FLOW
setting to handle error raised when logs outside of flow run context
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Minor suggested edit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Minor comment on the docs change.
Co-authored-by: Michael Adkins <michael@prefect.io>
… raised when logs outside of flow run context (#8311) Co-authored-by: Michael Adkins <michael@prefect.io>
…erm-testing * 'main' of https://github.com/prefecthq/prefect: (40 commits) Expand `work_queue` table to accommodate work pools (PrefectHQ#8264) Update issue label workflow (PrefectHQ#8334) Add `PREFECT_LOGGING_ORION_WHEN_MISSING_FLOW` setting to handle error raised when logs outside of flow run context (PrefectHQ#8311) Fix tests for scheduled flow runs CLI `--start-at` option (PrefectHQ#8330) allow snakecase in maps folder (PrefectHQ#8322) Bump @prefecthq/vue-compositions from 1.3.0 to 1.3.3 in /orion-ui (PrefectHQ#8328) Bump typescript from 4.9.4 to 4.9.5 in /orion-ui (PrefectHQ#8325) Bump @prefecthq/orion-design from 1.2.8 to 1.2.9 in /orion-ui (PrefectHQ#8326) Mention reverse proxy for PREFECT_API_URL config (PrefectHQ#8240) Update Issue bot (PrefectHQ#8297) Fix Prefect Cloud typo in FAQ (PrefectHQ#8317) Remove unused Cloud Getting Started page (PrefectHQ#8291) Bump @playwright/test from 1.29.2 to 1.30.0 in /orion-ui (PrefectHQ#8313) Add role permissions regarding block secrets (PrefectHQ#8309) [maintenance] Update isort to fix errors in CI (PrefectHQ#8298) Add assertion for single notification and expand notification test suite (PrefectHQ#7504) Bump @prefecthq/orion-design from 1.2.7 to 1.2.8 in /orion-ui (PrefectHQ#8303) Bump @prefecthq/vue-compositions from 1.2.9 to 1.3.0 in /orion-ui (PrefectHQ#8302) Bump @prefecthq/prefect-design from 1.2.2 to 1.2.3 in /orion-ui (PrefectHQ#8301) Bump @prefecthq/eslint-config from 1.0.22 to 1.0.23 in /orion-ui (PrefectHQ#8300) ...
… raised when logs outside of flow run context (#8311) Co-authored-by: Michael Adkins <michael@prefect.io>
… raised when logs outside of flow run context (#8311) Co-authored-by: Michael Adkins <michael@prefect.io>
Overview
Closes #7851. Currently a
MissingContextError
is raised when logging outside of a flow run context, but users would still like to have a logger for reasons listed in #7851.This change adds a
PREFECT_LOGGING_ORION_WHEN_MISSING_FLOW
setting that defaults towarn
when a custom logger attempts to send logs outside of a flow run context. Users can toggle this setting toignore
,warn
, orerror
.Docs preview
Example
This change would handle the reproduction inside #7851 like so:
PREFECT_LOGGING_ORION_WHEN_MISSING_FLOW=ignore
produces no warnings or errors when running the reproduction script.PREFECT_LOGGING_ORION_WHEN_MISSING_FLOW=error
raises an error when running the reproduction script.PREFECT_LOGGING_ORION_WHEN_MISSING_FLOW=warn
returns a warning for each attempted log when running the reproduction script.Default
PREFECT_LOGGING_ORION_WHEN_MISSING_FLOW
setting returns a warning for each attempted log when running the reproduction script (same as above).Checklist
<link to issue>
"fix
,feature
,enhancement