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

move connectionless email depreciation warning #31216

Closed

Conversation

ITJamie
Copy link

@ITJamie ITJamie commented May 11, 2023

depreciation warning was located inside the wrong block.
now it will warn if there is no conn_id assigned

closes: #19805

warning was located inside the wrong block. now it will warn if there is no conn_id assigned
@boring-cyborg
Copy link

boring-cyborg bot commented May 11, 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:/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.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: [email protected]
    Slack: https://s.apache.org/airflow-slack

@ITJamie ITJamie changed the title move depreciation warning move connectionless email depreciation warning May 11, 2023
except AirflowException:
pass
if smtp_user is None or smtp_password is None:
Copy link
Member

Choose a reason for hiding this comment

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

I am taking a look at the issue trail and wondering if we only need an else block here with keeping all the existing code as it is.

Copy link
Member

Choose a reason for hiding this comment

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

I’d argue the smtp_... = airflow_conn... lines should be moved to the else block as well.

Copy link
Author

Choose a reason for hiding this comment

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

I am taking a look at the issue trail and wondering if we only need an else block here with keeping all the existing code as it is.

I dont see how we would do that and be certain that the smtp creds came from the connection and not from the conf file without rework

Copy link
Contributor

@eladkal eladkal left a comment

Choose a reason for hiding this comment

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

Holding till review from @hussein-awala as email/smtp is under refactor.

@hussein-awala can you please review?

Comment on lines +269 to +270
if smtp_user is None or smtp_password is None:
log.debug("No user/password found for SMTP, so logging in with no authentication.")
Copy link
Member

Choose a reason for hiding this comment

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

Why move this one?

Copy link
Author

Choose a reason for hiding this comment

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

Because its a valid warning that no creds were supplied in the connection and will be using non authentication smtp

Copy link
Member

Choose a reason for hiding this comment

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

No I mean does it not do its job at its original location? Why not?

Copy link
Author

Choose a reason for hiding this comment

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

We want it to trigger after ether a connection has been found or failback to airflow.cfg variables have been parsed

So i moved it after the above had been completed

@github-actions
Copy link

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale Stale PRs per the .github/workflows/stale.yml policy file label Jun 27, 2023
@github-actions github-actions bot closed this Jul 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Stale PRs per the .github/workflows/stale.yml policy file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

EMAIL: deprecation warning on mail servers with no authentication
4 participants