You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "romsharon98 (via GitHub)" <gi...@apache.org> on 2023/11/28 17:44:04 UTC
[PR] Draft:remove redirect [airflow]
romsharon98 opened a new pull request, #35929:
URL: https://github.com/apache/airflow/pull/35929
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<!--
Thank you for contributing! Please make sure that your code changes
are covered with tests. And in case of new features or big changes
remember to adjust the documentation.
Feel free to ping committers for the review!
In case of an existing issue, reference it using one of the following:
closes: #ISSUE
related: #ISSUE
How to write a good git commit message:
http://chris.beams.io/posts/git-commit/
-->
<!-- Please keep an empty line above the dashes. -->
---
**^ Add meaningful description above**
Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst#pull-request-guidelines)** for more information.
In case of fundamental code changes, an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals)) is needed.
In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
In case of backwards incompatible changes please leave a note in a newsfragment file, named `{pr_number}.significant.rst` or `{issue_number}.significant.rst`, in [newsfragments](https://github.com/apache/airflow/tree/main/newsfragments).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Allow DagProcessorLogging print to file and also to stdout [airflow]
Posted by "romsharon98 (via GitHub)" <gi...@apache.org>.
romsharon98 closed pull request #35929: Allow DagProcessorLogging print to file and also to stdout
URL: https://github.com/apache/airflow/pull/35929
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Allow DagProcessorLogging print to file and also to stdout [airflow]
Posted by "romsharon98 (via GitHub)" <gi...@apache.org>.
romsharon98 commented on PR #35929:
URL: https://github.com/apache/airflow/pull/35929#issuecomment-1841282515
> I think this PR is quite wrong.
>
> Dag File process does what it does for a good reason. Each of the Dag Files is processed by a separately forked process. If we try to print logs from mulitple DAG file processor processes to the same stdout we will have a total garbage as outputs from those multiple processes will be effectively multiplexed and indistinguishable.
>
> I tthink @romsharon98 you need to explain what you want to achieve and why you think deleting the code that is responsible for doing it would be a good idea.
Thanks for your reply.
Last start from the end, I want the dag processor manager logs to print to stdout and to file.
Today the logs are print to stdout or to file but not to both of them.
To be honest I saw this if statement that making the decision of the output of the logs, tried to remove it and it works.
Maybe I miss something or didn't understand deeply the meaning of removing it.
If you can guid me what should I do to make it happen in a better way I will appreciate this :)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Allow DagProcessorLogging print to file and also to stdout [airflow]
Posted by "eladkal (via GitHub)" <gi...@apache.org>.
eladkal commented on code in PR #35929:
URL: https://github.com/apache/airflow/pull/35929#discussion_r1414468016
##########
airflow/dag_processing/processor.py:
##########
@@ -168,18 +168,8 @@ def _handle_dag_file_processing():
result_channel.send(result)
try:
- DAG_PROCESSOR_LOG_TARGET = conf.get_mandatory_value("logging", "DAG_PROCESSOR_LOG_TARGET")
Review Comment:
I believe the logic here is since scheduler dump logs to both stdout and file without LOG_TARGET variable then why dag processor needs one.
So I wonder why the dag processor log logic was designed this way in the first place?
(Also not sure if we can just ignore `DAG_PROCESSOR_LOG_TARGET` that way.. we may need to set newsfragment)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Allow DagProcessorLogging print to file and also to stdout [airflow]
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #35929:
URL: https://github.com/apache/airflow/pull/35929#issuecomment-1841328314
> To be honest I saw this if statement that making the decision of the output of the logs, tried to remove it and it works.
You can't just randomly remove stuff without understanding what you are doing. Please don't do it.
> Maybe I miss something or didn't understand deeply the meaning of removing it.
> If you can guid me what should I do to make it happen in a better way I will appreciate this :)
Well. I am arguing that what you try do is wrong. So I cannot tell you a "better" way if I explain why we do not want to do what you try to achieve. Let me repeat again what I already wrote:
> Dag File process does what it does for a good reason. Each of the Dag Files is processed by a separately forked process. If we try to print logs from mulitple DAG file processor processes to the same stdout we will have a total garbage as outputs from those multiple processes will be effectively multiplexed and indistinguishable.
Please explain what you are going to do. IMHO having DAG file processr write to stdout makes no sense for the reson explained above. But maybe you can explain why it makes sense after reading it. I think it explain what the removed code does pretty well. Do you agree with it or not?
You seem to want to achieve something that I just explained why it's a bad idea, but if you have good reasoning why you want to do what you want to do and how you are going to solve the problem I just explained, I am all ears.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org