Skip to content

Conversation

@dkim010
Copy link
Contributor

@dkim010 dkim010 commented Sep 6, 2023

  • reuse the kubernetes connection not to re-consume the logs
    • If a failure occurs while consuming logs through PodLogsConsumer, a new PodLogsConsumer is created.
    • But, at this time there are duplicated logs even though they have already been consumed.
    • To fix the duplicated logs, PodLogsConsumer instance is created initially at once and is to reused
      when a failure occurs to prevent duplicate logs from occurring.

^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
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.

@boring-cyborg boring-cyborg bot added area:providers provider:cncf-kubernetes Kubernetes (k8s) provider related issues labels Sep 6, 2023
@boring-cyborg
Copy link

boring-cyborg bot commented Sep 6, 2023

Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst)
Here are some useful points:

  • Pay attention to the quality of your code (ruff, mypy and type annotations). Our pre-commits will help you with that.
  • In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example DAG that shows how users should use it.
  • Consider using Breeze environment for testing locally, it's a heavy docker but it ships with a working Airflow and a lot of integrations.
  • Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
  • Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
  • Be sure to read the Airflow Coding style.
  • Always keep your Pull Requests rebased, otherwise your build might fail due to changes not related to your commits.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: dev@airflow.apache.org
    Slack: https://s.apache.org/airflow-slack

@dkim010 dkim010 marked this pull request as draft September 8, 2023 14:23
* reuse the kubernetes connection not to re-consume the logs
  * If a failure occurs while consuming logs through `PodLogsConsumer`, a new `PodLogsConsumer` is created.
  * But, at this time there are duplicated logs even though they have already been consumed.
  * To fix the duplicated logs, `PodLogsConsumer` instance is created initially at once and is to reused
    when a failure occurs to prevent duplicate logs from occurring.

Signed-off-by: 김동원 <dongwon.kim@toss.im>
@dkim010 dkim010 force-pushed the patch/reuse-connection-to-dedup-logs branch from e1220a4 to 053ebae Compare September 11, 2023 05:46
Signed-off-by: 김동원 <dongwon.kim@toss.im>
@dkim010 dkim010 marked this pull request as ready for review September 11, 2023 07:38
@dkim010 dkim010 requested review from eladkal and potiuk September 12, 2023 21:14
@dkim010
Copy link
Contributor Author

dkim010 commented Sep 17, 2023

I am waiting! Would you review this pull request? @hussein-awala @jedcunningham

Copy link
Member

@hussein-awala hussein-awala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you a unit test for this change?

김동원 added 2 commits September 18, 2023 23:11
Signed-off-by: 김동원 <dongwon.kim@toss.im>
Signed-off-by: 김동원 <dongwon.kim@toss.im>
@dkim010
Copy link
Contributor Author

dkim010 commented Sep 25, 2023

@hussein-awala Hussein, I am still waiting~~!!
If this pull request should have more supplements, please tell me.

Copy link
Member

@hussein-awala hussein-awala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dkim010
Copy link
Contributor Author

dkim010 commented Oct 1, 2023

@jedcunningham Would you review this pull request?

@eladkal eladkal merged commit cbb04e5 into apache:main Oct 1, 2023
@boring-cyborg
Copy link

boring-cyborg bot commented Oct 1, 2023

Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions.

dstandish added a commit that referenced this pull request Nov 13, 2023
We were passing around the `logs` variable (actually PodLogConsumer object) for no reason.  And the `termination_timeout` param was not used.  It seems that the passing around of the object was first introduced in #34127,  then perhaps accidentally removed in #34127.  Someone may want to try to re-introduce the original fix.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers provider:cncf-kubernetes Kubernetes (k8s) provider related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants