You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2019/12/27 19:50:08 UTC

[GitHub] [airflow] kaxil opened a new pull request #6932: [AIRFLOW-6374] Automate sending emails for Release management

kaxil opened a new pull request #6932: [AIRFLOW-6374] Automate sending emails for Release management
URL: https://github.com/apache/airflow/pull/6932
 
 
   Make sure you have checked _all_ steps below.
   
   ### Jira
   
   - [x] My PR addresses the following [Airflow Jira](https://issues.apache.org/jira/browse/AIRFLOW/) issues and references them in the PR title. For example, "\[AIRFLOW-XXX\] My Airflow PR"
     - https://issues.apache.org/jira/browse/AIRFLOW-6374
   
   
   ### Description
   
   - [x] Here are some details about my PR, including screenshots of any UI changes:
   Currently, the release process involves sending some emails to Dev List, User List etc.
   
   It would be ideal to have a script that automates the email part and gives us the text that we can copy-paste for Slack
   
   ### Tests
   
   - [ ] My PR adds the following unit tests __OR__ does not need testing for this extremely good reason:
   n/a
   
   ### Commits
   
   - [x] My commits all reference Jira issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "[How to write a good git commit message](http://chris.beams.io/posts/git-commit/)":
     1. Subject is separated from body by a blank line
     1. Subject is limited to 50 characters (not including Jira issue reference)
     1. Subject does not end with a period
     1. Subject uses the imperative mood ("add", not "adding")
     1. Body wraps at 72 characters
     1. Body explains "what" and "why", not "how"
   
   ### Documentation
   
   - [ ] In case of new functionality, my PR adds documentation that describes how to use it.
     - All the public functions and the classes in the PR contain docstrings that explain what it does
     - If you implement backwards incompatible changes, please leave a note in the [Updating.md](https://github.com/apache/airflow/blob/master/UPDATING.md) so we can assign it to a appropriate release
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] nuclearpinguin commented on a change in pull request #6932: [AIRFLOW-6374] Automate sending emails for Release management

Posted by GitBox <gi...@apache.org>.
nuclearpinguin commented on a change in pull request #6932: [AIRFLOW-6374] Automate sending emails for Release management
URL: https://github.com/apache/airflow/pull/6932#discussion_r361735056
 
 

 ##########
 File path: dev/send_email.py
 ##########
 @@ -0,0 +1,321 @@
+#!/usr/bin/python3
+#
+# 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.
+
+# This tool is based on the Superset send_email script:
+# https://github.com/apache/incubator-superset/blob/master/RELEASING/send_email.py
+
+import smtplib
+import ssl
+from typing import List, Union
+
+try:
+    import jinja2
+except ModuleNotFoundError:
+    exit("Jinja2 is a required dependency for this script")
+try:
+    import click
+except ModuleNotFoundError:
+    exit("Click is a required dependency for this script")
+
+
+SMTP_PORT = 587
+SMTP_SERVER = "mail-relay.apache.org"
+PROJECT_NAME = "Airflow"
+PROJECT_MODULE = "airflow"
+PROJECT_DESCRIPTION = "Apache Airflow - A platform to programmatically author, " \
+                      "schedule, and monitor workflows"
+TWITTER_HANDLE = "@ApacheAirflow"
+MAILING_LIST = {
+    "dev": f"dev@{PROJECT_MODULE}.apache.org",
+    "users": f"users@{PROJECT_MODULE}.apache.org"
+}
+
+
+def string_comma_to_list(message: str) -> List[str]:
+    """
+    Split string to list
+    """
+    if not message:
+        return []
+    return message.split(",")
 
 Review comment:
   ```suggestion
       return message.split(",") if message else []
   ```
   Maybe we can use one-liner? 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] kaxil merged pull request #6932: [AIRFLOW-6374] Automate sending emails for Release management

Posted by GitBox <gi...@apache.org>.
kaxil merged pull request #6932: [AIRFLOW-6374] Automate sending emails for Release management
URL: https://github.com/apache/airflow/pull/6932
 
 
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services