Skip to content

Commit

Permalink
removing fcntl
Browse files Browse the repository at this point in the history
Summary: testing the removal of fcntl from postgres

Test Plan: full pytest suite

Reviewers: max, nate

Reviewed By: max, nate

Differential Revision: https://dagster.phacility.com/D3210
  • Loading branch information
FishmanL committed Jun 3, 2020
1 parent ef661b2 commit c06d58f
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ install_dev_python_modules:
# Need to manually install Airflow because we no longer explicitly depend on it
# dagster-pandas must come before dasgtermill because of dependency
# See https://github.com/dagster-io/dagster/issues/1485
# NOTE: These installations will fail for Python 2.7 (Flyte and Dask don't work w/ py27)

pip install apache-airflow \
-e python_modules/dagster \
Expand Down Expand Up @@ -66,9 +67,9 @@ install_dev_python_modules:
-e examples[full] \
-r scala_modules/scripts/requirements.txt $(QUIET)

SLUGIFY_USES_TEXT_UNIDECODE=yes pip install -e python_modules/libraries/dagster-airflow $(QUIET)
set SLUGIFY_USES_TEXT_UNIDECODE=yes
pip install -e python_modules/libraries/dagster-airflow $(QUIET)

# NOTE: These installations will fail for Python 2.7 (Flyte and Dask don't work w/ py27)
-pip install -e python_modules/libraries/dagster-flyte $(QUIET)
-pip install -e "python_modules/libraries/dagster-dask[yarn,pbs,kube]" $(QUIET)
-pip install -r docs-requirements.txt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ def test_ingest_pipeline_fast_filesystem_storage(postgres, pg_hostname):
@pytest.mark.nettest
@pytest.mark.py3
@pytest.mark.spark
@pytest.mark.skipif('"win" in sys.platform', reason="avoiding the geopandas tests")
def test_airline_pipeline_1_warehouse(postgres, pg_hostname):
warehouse_config_object = load_yaml_from_globs(
config_path('test_base.yaml'), config_path('local_warehouse.yaml')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import pytest
from dagster_examples.airline_demo.pipelines import (
define_airline_demo_ingest_pipeline,
define_airline_demo_warehouse_pipeline,
Expand All @@ -8,5 +9,6 @@ def test_construct_ingest_pipeline():
assert define_airline_demo_ingest_pipeline()


@pytest.mark.skipif('"win" in sys.platform', reason="avoiding the geopandas tests")
def test_construct_warehouse_pipeline():
assert define_airline_demo_warehouse_pipeline()
2 changes: 1 addition & 1 deletion examples/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
'dagster-snowflake',
# These two packages, descartes and geopandas, are used in the airline demo notebooks
'descartes',
'geopandas',
'geopandas; "win" not in sys_platform',
'google-api-python-client',
'google-cloud-storage',
'keras',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
from __future__ import absolute_import, division, print_function, unicode_literals

import errno
import fcntl
import os
import select
import signal
Expand All @@ -41,10 +40,12 @@

def get_wakeup_fd():
pipe_r, pipe_w = os.pipe()
flags = fcntl.fcntl(pipe_w, fcntl.F_GETFL, 0)
flags = flags | os.O_NONBLOCK
flags = fcntl.fcntl(pipe_w, fcntl.F_SETFL, flags)
if "win" not in sys.platform:
import fcntl

flags = fcntl.fcntl(pipe_w, fcntl.F_GETFL, 0)
flags = os.O_NONBLOCK
flags = fcntl.fcntl(pipe_w, fcntl.F_SETFL, flags)
signal.set_wakeup_fd(pipe_w)
return pipe_r

Expand Down

0 comments on commit c06d58f

Please sign in to comment.