Re: Configuring LDAP and Helm Chart for Apache Airflow

2021-01-06 Thread Lewis John McGibbney
this. If I can figure this out I will submit a pull request to augment the README with this information. Any help is appreciated. lewismc On 2021/01/05 18:25:57, Lewis John McGibbney wrote: > Hi user@, > I am investigating whether I can configure the chart [0] with webserver LDAP >

Re: Configuring LDAP and Helm Chart for Apache Airflow

2021-01-06 Thread Lewis John McGibbney
I discovered that they can be added to values.yaml. I created a pull request for this https://github.com/apache/airflow/pull/13519 lewismc On 2021/01/06 19:26:52, Lewis John McGibbney wrote: > Is webserverConfig the correct setting? > https://github.com/apache/airflow/blob/master

Configuring LDAP and Helm Chart for Apache Airflow

2021-01-05 Thread Lewis John McGibbney
Hi user@, I am investigating whether I can configure the chart [0] with webserver LDAP authentication. I do not see any option listed in the parameters [1]. Can I access the airflow.cfg variables during the chart configuration? Thank you lewismc [0]

Backing up PostgreSQL DB on K8s

2021-06-08 Thread Lewis John McGibbney
Hi users@, Does anyone have a recommended/best practice/preferred way for backing up PostgreSQL when Airflow is deployed into K8s? We were thinking of writing a maintenance DAG which would do this... maybe even contributing it to https://github.com/teamclairvoyant/airflow-maintenance-dags. I'm

cryptography.fernet.InvalidToken when attempting to access connections

2021-06-07 Thread Lewis John McGibbney
Hi users@, I am deploying the airflow chart from main branch into k3d and encountered the following Exception trace. Has anyone experienced this before? Thanks lewismc Ooops! Something bad has happened. Please consider letting us know by creating a bug report using GitHub. Python version:

Re: Backing up PostgreSQL DB on K8s

2021-06-10 Thread Lewis John McGibbney
ckend" { > metadata { > name = "result-backend" > namespace = var.environment_name > } > data = { > connection = "db+${kubernetes_secret.metastore.data.connection}" > } > type = "Opaque" > } > > > > > >

Re: Backing up PostgreSQL DB on K8s

2021-06-09 Thread Lewis John McGibbney
that you can use a PV as data storage for PSql & it would survive > > any pod restarts. > > > > On Wed, Jun 9, 2021 at 5:01 AM Lewis John McGibbney > > wrote: > > > >> Hi users@, > >> Does anyone have a recommended/best practice/preferred way for b

Re: Backing up PostgreSQL DB on K8s

2021-06-09 Thread Lewis John McGibbney
would be great. Thank you On 2021/06/09 05:41:13, Sumit Maheshwari wrote: > If you are backing up data to safeguard against pod failures, then I > believe that you can use a PV as data storage for PSql & it would survive > any pod restarts. > > On Wed, Jun 9, 2021 at 5:01 AM L

Re: Successful LDAP query still reporting Invalid login. Please try again...

2021-05-12 Thread Lewis John McGibbney
Hi users@, Is anyone else using Airflow with LDAP webserver authentication? If so, can you please share your experiences? Thank you On 2021/05/06 21:58:34, Lewis John McGibbney wrote: > Hi users@, > Running Airflow 2.0.2 locally attempting to debug this issue. > We have c

Re: Successful LDAP query still reporting Invalid login. Please try again...

2021-05-19 Thread Lewis John McGibbney
backend, or b. attempt to use OAuth Thanks lewismc [0] https://github.com/apache/airflow/blob/master/setup.py#L379-L382 [1] https://flask-appbuilder.readthedocs.io/en/latest/config.html?highlight=TLS#configuration-keys On 2021/05/12 15:33:02, Lewis John McGibbney wrote: > Hi users@, > Is

Successful LDAP query still reporting Invalid login. Please try again...

2021-05-06 Thread Lewis John McGibbney
Hi users@, Running Airflow 2.0.2 locally attempting to debug this issue. We have configured webserver_config.py as follows from flask_appbuilder.security.manager import AUTH_LDAP import os WTF_CSRF_ENABLED = True AUTH_TYPE = AUTH_LDAP AUTH_ROLE_ADMIN = "Admin" AUTH_USER_REGISTRATION = False

Re: Specifying a different container registry in Airfloew Helm Chart

2021-03-11 Thread Lewis John McGibbney
airflow/blob/master/chart/values.yaml#L30-L34. > > On Wed, Mar 10, 2021 at 1:54 PM Lewis John McGibbney > wrote: > > > I found the `registry` key in values.yaml. > > https://github.com/apache/airflow/blob/master/chart/values.yaml#L626-L637 > > We are experimenting

Specifying a different container registry in Airfloew Helm Chart

2021-03-10 Thread Lewis John McGibbney
Hello users@, We wanted to turn on Airflow Sentry integration and deploying into K8s using Helm. It is not clear how one would define the 'new/custom' Airflow container which resides in our internal enterprise container registry i.e. JFrog's Artifactory. If someone can guide me on this then I

Re: Specifying a different container registry in Airfloew Helm Chart

2021-03-10 Thread Lewis John McGibbney
I found the `registry` key in values.yaml. https://github.com/apache/airflow/blob/master/chart/values.yaml#L626-L637 We are experimenting with this and I will update here if we get it to work. I'll then pull a documentation patch together. lewismc On 2021/03/10 18:34:17, Lewis John McGibbney

Re: Adding packages to the airflow image in helm chart

2021-03-10 Thread Lewis John McGibbney
tion-deployment.html#customizing-or-extending-the-production-image > > Or watch my talk from Airflow Summit last year: > > https://youtu.be/wDr3Y7q2XoI where I explained the various options you > > have. > > > > J. > > > > > > On Thu, Feb 25, 2021

Re: Use WebUI username and password in webserver_config.py for LDAP authentication

2021-02-24 Thread Lewis John McGibbney
e bind connection, the Airflow LDAP backend will > then confirm if the user from the webform is authorised. > > Leo > > > On 23 Feb 2021, at 21:53, Lewis John McGibbney wrote: > > > > Hi Folks, > > Has anyone been able to successfully pass the usernam

Adding packages to the airflow image in helm chart

2021-02-24 Thread Lewis John McGibbney
Hi users@, I'm trying to configure the Helm Chart [0] with LDAP authentication. Does anyone know how I can add the ldap packages equivalent to executing the pip command below? pip install 'apache-airflow[ldap]' Do I need to build my own docker image FROM apache/airflow:${tag} and then

Re: Use WebUI username and password in webserver_config.py for LDAP authentication

2021-02-23 Thread Lewis John McGibbney
17:21:30, Lewis John McGibbney wrote: > Hi users@, > > # > # Context # > # > With the following webserver_config.py code, when I provide the environment > variables $USERNAME and $PASSWORD, from the WebUI I can authenticate and > login to Airflow just fin

Use WebUI username and password in webserver_config.py for LDAP authentication

2021-02-19 Thread Lewis John McGibbney
Hi users@, # # Context # # With the following webserver_config.py code, when I provide the environment variables $USERNAME and $PASSWORD, from the WebUI I can authenticate and login to Airflow just fine. import os from flask_appbuilder.security.manager import AUTH_LDAP basedir

Guidance/best practice for mocking task instance output for unit testing DAGs

2021-07-29 Thread Lewis John McGibbney
Hi users@, Say I want to unit test Task A which accepts one or more parameters. These parameters are the outputs of some other task which I want to mock. Can someone provide a code example of how I would do that? We are using pytest as opposed to unittest but an example of either would be

Re: Guidance/best practice for mocking task instance output for unit testing DAGs

2021-08-04 Thread Lewis John McGibbney
ext=True That's what we are going off. lewismc On 2021/07/29 16:39:02, Lewis John McGibbney wrote: > Hi users@, > Say I want to unit test Task A which accepts one or more parameters. These > parameters are the outputs of some other task which I want to mock. Can > someone provide a c

Re: Guidance/best practice for mocking task instance output for unit testing DAGs

2021-08-04 Thread Lewis John McGibbney
Hi users@, Is anyone able to assist here? Does my example make sense? Thank you lewismc On 2021/07/29 16:39:02, Lewis John McGibbney wrote: > Hi users@, > Say I want to unit test Task A which accepts one or more parameters. These > parameters are the outputs of some other task whi

Re: Guidance/best practice for mocking task instance output for unit testing DAGs

2021-08-04 Thread Lewis John McGibbney
and push constructs as follows pulled_value = ti.xcom_pull(key='someKey', task_ids='push_to_xcoms') Is this the correct way to write task instance unit tests which require input parameters from XCom? Thanks lewismc On 2021/07/29 16:39:02, Lewis John McGibbney wrote: > Hi users@, > Say

Airflow OAuth - "Access is denied"

2021-10-25 Thread Lewis John McGibbney
Hi users@, We have been working in migrating from LDAP authentication to OAuth Single Sign On. When a user logs in, they see a red prompt banner with the text "Access is denied". The user can simply click off of this banner and everything seems to work fine but this just looks weird. Has anyone

Re: Airflow OAuth - "Access is denied"

2021-10-25 Thread Lewis John McGibbney
Hi Christian, WOW that was quick ;) On 2021/10/25 16:09:45, Christian Schilling wrote: > yes, I experienced the same during the first sign in. Then after clicking > it away, it doesn't come again when signing on. That's the exact same as we experience. If the token is still valid then the

Unable to logout of OAuth SSO

2021-10-25 Thread Lewis John McGibbney
Hi users@, Another snagging issue we encountered whilst implementing OAuth was that we are not clear how to implement a logout. We are not sure which cookie to delete in order to complete the logout process. Can anyone help with this? Thank you lewismc

Re: Airflow OAuth - "Access is denied"

2021-10-25 Thread Lewis John McGibbney
Hi Christian, On 2021/10/25 16:23:47, Christian Schilling wrote: > Does anyone know where the alert is > generated? https://github.com/apache/airflow/blob/main/airflow/www/templates/airflow/_messages.html seems to be the dynamically rendered code block... I have no idea how to even debug

Re: How to determine if customer XCom backend is being loaded

2022-01-05 Thread Lewis John McGibbney
in the DAG? Is it necessary to call this function? If someone can give me points then i will provide a pull request to augment the documentation as there doesn't appear to be any. Thanks lewismc On 2022/01/05 22:41:22 lewis john mcgibbney wrote: > Hi users@, > > We wish to use a cu

Re: Optimal mechanism for loading data into KubernetesPodOperator

2022-03-04 Thread Lewis John McGibbney
sc = grpc: trying to send message larger than max (11652891 vs. 2097152)", "code": 500 } I know that this indicates we have exceeded data volume however I am still curious to hear which architectural approach is 'better'. Thanks for any assistance. lewismc On 2022/03/04 18:01:30 l

Re: Optimal mechanism for loading data into KubernetesPodOperator

2022-03-04 Thread Lewis John McGibbney
Hi Daniel, Thanks for engaging me on this one. On 2022/03/04 18:17:58 Daniel Standish wrote: > Where is the data coming from? >From a previous Airflow task. Task A generate arbitrary JSON data Task B process arbitrary JSON data in KubernetesPodOperator. Again, we use KubernetesPodOperator

Optimal mechanism for loading data into KubernetesPodOperator

2022-03-04 Thread lewis john mcgibbney
Hi users, We are using the KubernetesPodOperator to isolate some code which writes data into a VERY OLD Elasticsearch 2.X cluster. Please don't make fun of me for this!!! We are wondering, does a recommended practice exists for processing (JSON) data within the KubernetesPodOperator? Currently,

Using the Helm Chart to pull images from Artifactory

2022-01-18 Thread lewis john mcgibbney
Hi users@, We are migrating from Quay [0] to JFrog Artifactory [1] and having some issues using the 'registry' block of the Helm Chart values.yaml https://github.com/apache/airflow/blob/main/chart/values.yaml#L1262-L1263 When using Quay, we created an Opaque Kuberenetes secret which was defined

Re: How to determine if customer XCom backend is being loaded

2022-01-06 Thread Lewis John McGibbney
Hi Folks, To close this one off I want to mention some more information we were able to acquire. This may help, in particular people running Airflow on K8s. If you define a custom XCom backend in your values.yaml configuration and Airflow fails to load the class, the entire Chart deployment will