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

0.1.2 version, case if some of config sections are not exists - ok #3

Merged
merged 1 commit into from
Nov 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading