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

airflow: fix gunicorn path #84512 #87612

Closed
wants to merge 1 commit into from
Closed

Conversation

GTrunSec
Copy link
Contributor

@GTrunSec GTrunSec commented May 11, 2020

Motivation for this change

fixed issue which related to #84512

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@GTrunSec GTrunSec changed the title airflow: fix gunicorn path https://github.com/NixOS/nixpkgs/issues/84512 airflow: fix gunicorn path #84512 May 11, 2020
@GTrunSec
Copy link
Contributor Author

GTrunSec commented May 11, 2020

@glittershark My club's member told me that timezone does not work with default_timezone = Europe/Amsterdam . That still in a default timezone setting of UTC. So this PR just make sure you can running airflow without error.

  • I was trying to change timezone via airflow.cfg.
airflow webserver                                                                                                                      
Traceback (most recent call last):                                                                                                       
  File "/nix/store/8n43ymks8hvgs9ld5hbpaqwm3av8r10d-python3.7-apache-airflow-1.10.5/bin/..airflow-wrapped-wrapped", line 22, in <module> 
    from airflow import configuration                                                                                                    
  File "/nix/store/8n43ymks8hvgs9ld5hbpaqwm3av8r10d-python3.7-apache-airflow-1.10.5/lib/python3.7/site-packages/airflow/__init__.py", lin
e 39, in <module>                                                                                                                        
    from airflow.models import DAG                                                                                                       
  File "/nix/store/8n43ymks8hvgs9ld5hbpaqwm3av8r10d-python3.7-apache-airflow-1.10.5/lib/python3.7/site-packages/airflow/models/__init__.p
y", line 21, in <module>                                                                                                                 
    from airflow.models.baseoperator import BaseOperator  # noqa: F401                                                                   
  File "/nix/store/8n43ymks8hvgs9ld5hbpaqwm3av8r10d-python3.7-apache-airflow-1.10.5/lib/python3.7/site-packages/airflow/models/baseoperat
or.py", line 36, in <module>                                                                                                             
    from airflow.models.dag import DAG                                                                                                   
  File "/nix/store/8n43ymks8hvgs9ld5hbpaqwm3av8r10d-python3.7-apache-airflow-1.10.5/lib/python3.7/site-packages/airflow/models/dag.py", l
ine 52, in <module>                                                                                                                      
    from airflow.utils.dates import cron_presets, date_range as utils_date_range                                                         
  File "/nix/store/8n43ymks8hvgs9ld5hbpaqwm3av8r10d-python3.7-apache-airflow-1.10.5/lib/python3.7/site-packages/airflow/utils/dates.py", 
line 119, in <module>                                                                                                                    
    def round_time(dt, delta, start_date=timezone.make_aware(datetime.min)):                                                             
  File "/nix/store/8n43ymks8hvgs9ld5hbpaqwm3av8r10d-python3

    from airflow.models.dag import DAG                                                                                                   
  File "/nix/store/8n43ymks8hvgs9ld5hbpaqwm3av8r10d-python3.7-apache-airflow-1.10.5/lib/python3.7/site-packages/airflow/models/dag.py", l
ine 52, in <module>                                                                                                                      
    from airflow.utils.dates import cron_presets, date_range as utils_date_range                                                         
  File "/nix/store/8n43ymks8hvgs9ld5hbpaqwm3av8r10d-python3.7-apache-airflow-1.10.5/lib/python3.7/site-packages/airflow/utils/dates.py", 
line 119, in <module>                                                                                                                    
    def round_time(dt, delta, start_date=timezone.make_aware(datetime.min)):                                                             
  File "/nix/store/8n43ymks8hvgs9ld5hbpaqwm3av8r10d-python3.7-apache-airflow-1.10.5/lib/python3.7/site-packages/airflow/utils/timezone.py
", line 125, in make_aware
    return timezone.convert(value) 
  File "/nix/store/yc7gwccqrgca6lmn0bz3ixipabwn691a-python3.7-pendulum-2.0.5/lib/python3.7/site-packages/pendulum/tz/timezone.py", line 6
4, in convert
    return self._normalize(dt, dst_rule=dst_rule)
  File "/nix/store/yc7gwccqrgca6lmn0bz3ixipabwn691a-python3.7-pendulum-2.0.5/lib/python3.7/site-packages/pendulum/tz/timezone.py", line 1
11, in _normalize
    if transition.is_ambiguous(sec):
AttributeError: 'NoneType' object has no attribute 'is_ambiguous'

@glittershark
Copy link
Member

oh I think I fixed this... pretty sure it's a pendulum version mismatch

@GTrunSec
Copy link
Contributor Author

GTrunSec commented May 11, 2020

this commit hardenedlinux/nixpkgs-hardenedlinux@15bdd42 solved the default_timezone = Asia/Shanghai in aircfig.cfg no error output. but the webserver did not change the timezone. Do you have a suitable version of packages that able to running airflow with complete functions?
Sorry, I'm not an airflow user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants