-
Notifications
You must be signed in to change notification settings - Fork 17.5k
Migrate DagFileProcessorManager._deactivate_stale_dags to Internal API #28476
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
f10c9a2
Migrate DagFileProcessorManager._deactivate_stale_dags to Internal API
vincbeck f2f10c3
Create static logger for static methods
vincbeck e3272aa
Provide logger if not provided
vincbeck 316ccf3
Merge branch 'main' into vincbeck/_deactivate_stale_dags
vincbeck 769817b
Merge branch 'main' into vincbeck/_deactivate_stale_dags
vincbeck bf2de60
Merge branch 'main' into vincbeck/_deactivate_stale_dags
vincbeck 52e99aa
Merge branch 'main' into vincbeck/_deactivate_stale_dags
vincbeck 1cdec2c
Merge branch 'main' into vincbeck/_deactivate_stale_dags
vincbeck b791a89
Remove log parameter
vincbeck File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Does it work if the method doesn't have "log" parameter?
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.
Oh! That's a good point! I guess not. I dont think we should handle logs this way then. The simplest way would be to create a logger
log = logging.getLogger(__name__)inairflow/dag_processing/manager.pyand use this logger in static methods. The only downside is the logger would be the same whether or not internal API in turn onThere 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.
I hoped that we can detect that the method has "log" argument and add it then.
If it's not possible to detect then we can send addition parameter from client(like "inject_log=true") and when seen on server-side then add "log" to params
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.
I implemented a solution which detects if the parameter "log" exists. If it does, then provide one specific to internal API
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.
This looks great! Thanks!