GithubHelp home page GithubHelp logo

abhishekbhakat / astronomer-airflow-scripts Goto Github PK

View Code? Open in Web Editor NEW

This project forked from astronomer/astronomer-airflow-scripts

0.0 0.0 0.0 52 KB

Waits for Apache Airflow database migrations to complete.

License: Apache License 2.0

Python 100.00%

astronomer-airflow-scripts's Introduction

Set of astronomer cli-tools.

Usage airflow-cleanup-pods

$ airflow-cleanup-pods -h
usage: airflow-cleanup-pods [-h] [--namespace NAMESPACE]

Clean up k8s pods in evicted/failed/succeeded states.

optional arguments:
  -h, --help            show this help message and exit
  --namespace NAMESPACE
                        Namespace

Usage airflow-migration-spinner

airflow-migration-spinner --timeout 5
[2019-11-18 19:25:04,083] {spinner.py:40} INFO - Namespace(timeout=5)
[2019-11-18 19:25:04,085] {migration.py:130} INFO - Context impl SQLiteImpl.
[2019-11-18 19:25:04,086] {migration.py:137} INFO - Will assume non-transactional DDL.
[2019-11-18 19:25:05,113] {spinner.py:36} INFO - Waiting for migrations... 1 second(s)
[2019-11-18 19:25:06,115] {spinner.py:36} INFO - Waiting for migrations... 2 second(s)
[2019-11-18 19:25:07,116] {spinner.py:36} INFO - Waiting for migrations... 3 second(s)
[2019-11-18 19:25:08,117] {spinner.py:36} INFO - Waiting for migrations... 4 second(s)
[2019-11-18 19:25:09,122] {spinner.py:36} INFO - Waiting for migrations... 5 second(s)
[2019-11-18 19:25:10,125] {spinner.py:36} INFO - Waiting for migrations... 6 second(s)
Traceback (most recent call last):
  File "/Users/andrii/.pyenv/versions/airflow-core/bin/airflow-migration-spinner", line 11, in <module>
    load_entry_point('airflow-migration-spinner', 'console_scripts', 'airflow-migration-spinner')()
  File "/Users/andrii/work/airflow-migration-spinner/migration_spinner/command_line.py", line 11, in main
    spinner.main(args)
  File "/Users/andrii/work/airflow-migration-spinner/migration_spinner/spinner.py", line 41, in main
    spinner(args.timeout)
  File "/Users/andrii/work/airflow-migration-spinner/migration_spinner/spinner.py", line 33, in spinner
    "seconds".format(ticker, timeout))
TimeoutError: There are still unapplied migrations after: 6 seconds

Release

  1. Build wheel
pip install -U wheel
python setup.py sdist bdist_wheel
ls -la dist
total 24
drwxr-xr-x   4 andrii  staff   128 Nov 19 14:55 .
drwxr-xr-x  22 andrii  staff   704 Nov 19 14:55 ..
-rw-r--r--   1 andrii  staff  2615 Nov 19 14:55 airflow-migration-spinner-0.0.1.tar.gz
-rw-r--r--   1 andrii  staff  6629 Nov 19 14:55 airflow_migration_spinner-0.0.1-py3-none-any.whl
  1. Upload to github releases page

Copyright © 2019 Astronomer Inc. See LICENSE for further details.

astronomer-airflow-scripts's People

Contributors

andriisoldatenko avatar ashb avatar kaxil avatar schnie avatar sjmiller609 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.