Skip to main content

Operators and Hooks for Airflow

Project description

airflow-plugin

Operators and Hooks for Airflow

Airflow at Earnest

We use heavily the KubernetesPodOperator for the following reasons:

  • Keep non-scheduling logic out of the scheduler.
  • Avoid locking logic inside Airflow (containers can run through other schedulers).
  • Avoid accumulating python dependencies in the Airflow image.
  • Align with our engineering culture (functional programming and strongly typed languages lead to more maintainable code, Haskell preferred :) ).

As such, you will find most of the Operators we share inherit from the KubernetesPodOperator.

Running the tests locally

  1. Install dev requirements

    pip install -r requirements_dev.txt
    
  2. Run the unit tests

    pytest -v -m "not kubernetes"
    
  3. Start a local kubernetes cluster through docker-for-desktop (Mac/Windows) or minikube (Linux)

  4. Bootstrap the cluster (it'll use the airflow namespace)

    tests/resources/kubernetes/bootstrap.sh
    
  5. Run the kubernetes tests

    AIRFLOW__KUBERNETES__IN_CLUSTER=False pytest -v -m "kubernetes"
    

Releasing

Currently, publishing a new version of the project is a manual process:

  1. Install dev requirements

    pip install -r requirements_dev.txt
    
  2. Edit the version in setup.cfg

  3. Create a new git release:

    # e.g.
    git tag -a v0.0.1
    

    There's a simple template in RELEASE_NOTES_TEMPLATE.md for a release message.

  4. Push the release:

    git push origin v0.0.1
    
  5. Create a source distribution:

    python setup.py sdist bdist_wheel
    
  6. Upload to PyPi

    twine upload dist/*
    

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

earnest-airflow-plugin-0.0.1.tar.gz (21.2 kB view details)

Uploaded Source

Built Distribution

earnest_airflow_plugin-0.0.1-py3-none-any.whl (21.5 kB view details)

Uploaded Python 3

File details

Details for the file earnest-airflow-plugin-0.0.1.tar.gz.

File metadata

  • Download URL: earnest-airflow-plugin-0.0.1.tar.gz
  • Upload date:
  • Size: 21.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2

File hashes

Hashes for earnest-airflow-plugin-0.0.1.tar.gz
Algorithm Hash digest
SHA256 c301f30c9065269b6b44db749cfdfce6b0195ee6d0037035f65c257ba665c05c
MD5 2cd5dfac84939774a0c3fde7d91ffd8f
BLAKE2b-256 262e800aa80b7933df7a9c675bf6beb87ae99aab21d1623de0a8099cc7c1a456

See more details on using hashes here.

File details

Details for the file earnest_airflow_plugin-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: earnest_airflow_plugin-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 21.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2

File hashes

Hashes for earnest_airflow_plugin-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 46f0708c99a2447303f7b86ca664a3644c78cdfb861ff33dbe1b8601815d65a8
MD5 d68212c9dd0f9b87fe4ebc158b8b48f4
BLAKE2b-256 72a4a3293485941b6329b4fcd44496d290484733638984c53807b69eed17860b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page