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 2020/12/28 20:19:11 UTC

[GitHub] [airflow] madison-ookla opened a new issue #13349: AirflowMacroPluginRemovedRule fails on non-python files

madison-ookla opened a new issue #13349:
URL: https://github.com/apache/airflow/issues/13349


   **Apache Airflow version**: 1.10.14
   
   
   **Kubernetes version (if you are using kubernetes)** (use `kubectl version`):
   
   **Environment**:
   
   - **Cloud provider or hardware configuration**: X
   - **OS** (e.g. from /etc/os-release): X
   - **Kernel** (e.g. `uname -a`): X
   - **Install tools**: X
   - **Others**: X
   
   **What happened**:
   
   The `AirflowMacroPluginRemovedRule` seems unable to process non-standard python files (e.g. `.xlsx`) and chokes out with an unhelpful error message.:
   
   ```python
   ========================================================================================================================================================== STATUS ==========================================================================================================================================================
   
   Check for latest versions of apache-airflow and checker...........................................................................................................................................................................................................................................................SUCCESS
   Traceback (most recent call last):
     File "/Users/madison/programs/anaconda3/envs/memphis-airflow/bin/airflow", line 37, in <module>
       args.func(args)
     File "/Users/madison/programs/anaconda3/envs/memphis-airflow/lib/python3.8/site-packages/airflow/upgrade/checker.py", line 88, in run
       all_problems = check_upgrade(formatter, rules)
     File "/Users/madison/programs/anaconda3/envs/memphis-airflow/lib/python3.8/site-packages/airflow/upgrade/checker.py", line 37, in check_upgrade
       rule_status = RuleStatus.from_rule(rule)
     File "/Users/madison/programs/anaconda3/envs/memphis-airflow/lib/python3.8/site-packages/airflow/upgrade/problem.py", line 44, in from_rule
       result = rule.check()
     File "/Users/madison/programs/anaconda3/envs/memphis-airflow/lib/python3.8/site-packages/airflow/upgrade/rules/airflow_macro_plugin_removed.py", line 52, in check
       problems.extend(self._check_file(file_path))
     File "/Users/madison/programs/anaconda3/envs/memphis-airflow/lib/python3.8/site-packages/airflow/upgrade/rules/airflow_macro_plugin_removed.py", line 42, in _check_file
       for line_number, line in enumerate(file_pointer, 1):
     File "/Users/madison/programs/anaconda3/envs/memphis-airflow/lib/python3.8/codecs.py", line 322, in decode
       (result, consumed) = self._buffer_decode(data, self.errors, final)
   UnicodeDecodeError: 'utf-8' codec can't decode byte 0x82 in position 16: invalid start byte
   ```
   
   **What you expected to happen**:
   
   I expected the macro to skip over files it could not process/understand
   
   **How to reproduce it**:
   
   Add an `.xlsx` or other binary document to the DAGs folder and run the upgrade check.
   
   
   **Suggested resolution**:
   
   I think it's fine to fail out on these files (it led us to add certain items to the `.airflowignore` which should have been there anyway) but I had to modify the upgrade rule directly to tell me _which_ files were the problem. A more helpful error message here, and possibly a message prompting users to add said files to their `.airflowignore` would be ideal.
   


----------------------------------------------------------------
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



[GitHub] [airflow] potiuk commented on issue #13349: AirflowMacroPluginRemovedRule fails on non-python files

Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #13349:
URL: https://github.com/apache/airflow/issues/13349#issuecomment-751855957


   Sure :). Do you want to take care about #13350 too ?


----------------------------------------------------------------
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



[GitHub] [airflow] kaxil closed issue #13349: AirflowMacroPluginRemovedRule fails on non-python files

Posted by GitBox <gi...@apache.org>.
kaxil closed issue #13349:
URL: https://github.com/apache/airflow/issues/13349


   


----------------------------------------------------------------
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



[GitHub] [airflow] madison-ookla edited a comment on issue #13349: AirflowMacroPluginRemovedRule fails on non-python files

Posted by GitBox <gi...@apache.org>.
madison-ookla edited a comment on issue #13349:
URL: https://github.com/apache/airflow/issues/13349#issuecomment-751859116


   I can give it a shot too! I know less about what the best approach is for that one. Also do you mind adding the `upgrade_check` tag to these two?


----------------------------------------------------------------
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



[GitHub] [airflow] madison-ookla edited a comment on issue #13349: AirflowMacroPluginRemovedRule fails on non-python files

Posted by GitBox <gi...@apache.org>.
madison-ookla edited a comment on issue #13349:
URL: https://github.com/apache/airflow/issues/13349#issuecomment-751859116


   I can give it a shot too! I know less about what the best approach is for that one. Also do you mind adding the `upgrade_check` label to these two?


----------------------------------------------------------------
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



[GitHub] [airflow] kaxil commented on issue #13349: AirflowMacroPluginRemovedRule fails on non-python files

Posted by GitBox <gi...@apache.org>.
kaxil commented on issue #13349:
URL: https://github.com/apache/airflow/issues/13349#issuecomment-765790511


   Closed by https://github.com/apache/airflow/pull/13371


----------------------------------------------------------------
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



[GitHub] [airflow] madison-ookla commented on issue #13349: AirflowMacroPluginRemovedRule fails on non-python files

Posted by GitBox <gi...@apache.org>.
madison-ookla commented on issue #13349:
URL: https://github.com/apache/airflow/issues/13349#issuecomment-751859116


   I can give it a shot too! I know less about what the best approach is for that one.


----------------------------------------------------------------
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



[GitHub] [airflow] madison-ookla commented on issue #13349: AirflowMacroPluginRemovedRule fails on non-python files

Posted by GitBox <gi...@apache.org>.
madison-ookla commented on issue #13349:
URL: https://github.com/apache/airflow/issues/13349#issuecomment-751851984


   Please feel free to assign this to me too 🙂 


----------------------------------------------------------------
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