Skip to content

Commit

Permalink
0.1.2 version, case if some of config sections are not exists - ok
Browse files Browse the repository at this point in the history
  • Loading branch information
xnuinside committed Nov 24, 2023
1 parent edc268b commit 35d019b
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 19 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
*0.1.1*
*0.1.2*
1. Do not fail if some sections from config are not exists

*0.1.1*
1. Overwrite option added to `airflow-helper load` command
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM python:3.11-alpine

RUN pip install airflow-helper==0.1.1
RUN pip install airflow-helper==0.1.2
WORKDIR /app

ENTRYPOINT [ "airflow-helper" ]
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,11 +264,9 @@ Example, to overwrite default airflow host you should provide environment variab
4. Load configs from git
5. Create overwrite mode for settings upload

## Changelog
*0.1.2*
1. Do not fail if some sections from config are not exists

### Inspiration
By Astronomer airflow_settings.yaml https://forum.astronomer.io/t/what-is-the-new-airflow-settings-yaml-file-for/149/21 (that looks like deprecated now)

And airflow-vars https://github.com/omerzamir/airflow-vars (but I want pure python tool)
*0.1.1*

1. Overwrite oprion added to `airflow-helper load` command
1. Overwrite option added to `airflow-helper load` command
13 changes: 8 additions & 5 deletions airflow_helper/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,14 @@ def __init__(

def upload_config_to_server(self):
logger.info(f"Uploading connections to airflow server: {self.api.url}")
self.api.create_connections(self.config.airflow.connections)
logger.info(f"Uploading pools to airflow server: {self.api.url}")
self.api.create_pools(self.config.airflow.pools)
logger.info(f"Uploading variables to airflow server: {self.api.url}")
self.api.create_variables(self.config.airflow.variables)
if self.config.airflow.connections:
self.api.create_connections(self.config.airflow.connections)
if self.config.airflow.pools:
logger.info(f"Uploading pools to airflow server: {self.api.url}")
self.api.create_pools(self.config.airflow.pools)
if self.config.airflow.variables:
logger.info(f"Uploading variables to airflow server: {self.api.url}")
self.api.create_variables(self.config.airflow.variables)


class PostAirflowAPI(AirflowAPIBase):
Expand Down
12 changes: 7 additions & 5 deletions docs/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -295,13 +295,15 @@ TODO
#. Load configs from git
#. Create overwrite mode for settings upload

Inspiration
^^^^^^^^^^^
Changelog
---------

By Astronomer airflow_settings.yaml https://forum.astronomer.io/t/what-is-the-new-airflow-settings-yaml-file-for/149/21 (that looks like deprecated now)
*0.1.2*


#. Do not fail if some sections from config are not exists

And airflow-vars https://github.com/omerzamir/airflow-vars (but I want pure python tool)
*0.1.1*


#. Overwrite oprion added to ``airflow-helper load`` command
#. Overwrite option added to ``airflow-helper load`` command
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "airflow-helper"
version = "0.1.1"
version = "0.1.2"
description = ""
authors = ["Iuliia Volkova <[email protected]>"]
license = "MIT"
Expand Down

0 comments on commit 35d019b

Please sign in to comment.