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 2018/08/07 02:19:26 UTC

[GitHub] yrqls21 commented on issue #3698: [AIRFLOW-2855] Check Cron Expression Validity in DagBag.process_file()

yrqls21 commented on issue #3698: [AIRFLOW-2855] Check Cron Expression Validity in DagBag.process_file()
URL: https://github.com/apache/incubator-airflow/pull/3698#issuecomment-410911196
 
 
   Definitely, looking forward for more of your good work too!
   
   Xiaodong <no...@github.com>于2018年8月6日 周一下午7:15写道:
   
   > *@XD-DENG* commented on this pull request.
   > ------------------------------
   >
   > In tests/models.py
   > <https://github.com/apache/incubator-airflow/pull/3698#discussion_r208080167>
   > :
   >
   > > +    def test_process_file_cron_validity_check(self):
   > +        """
   > +        test if an invalid cron expression
   > +        as schedule interval can be identified
   > +        """
   > +        invalid_dag_files = ["test_invalid_cron.py", "test_zip_invalid_cron.zip"]
   > +        dagbag = models.DagBag()
   > +
   > +        for d in invalid_dag_files:
   > +            dagbag.process_file(os.path.join(TEST_DAGS_FOLDER, d))
   > +
   > +        files_with_cron_error = [os.path.split(k)[1]
   > +                                 for k, v in dagbag.import_errors.items()
   > +                                 if "Invalid Cron expression" in v]
   > +        for d in invalid_dag_files:
   > +            self.assertTrue(d in files_with_cron_error)
   >
   > :-| Crazy now LOL
   >
   > Thanks again! And look forward to your reviewing in any of my future
   > commits!
   >
   > —
   > You are receiving this because you were mentioned.
   > Reply to this email directly, view it on GitHub
   > <https://github.com/apache/incubator-airflow/pull/3698#discussion_r208080167>,
   > or mute the thread
   > <https://github.com/notifications/unsubscribe-auth/AHdN1qtmNAbLB2MnwwW7xP9l9YM3MWt8ks5uOPhDgaJpZM4VvZ7k>
   > .
   >
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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