-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Description
Apache Airflow version
Other Airflow 2 version (please specify below)
What happened
Hello team,
I am trying to use the JenkinsJobTriggerOperator version v3.1.0 on an Airflow instance version 2.2.4
Checking the documentation regards how to set up the connection and the hook in order to use https instead of the default http, I see https://airflow.apache.org/docs/apache-airflow-providers-jenkins/3.1.0/connections.html
Extras (optional)
Specify whether you want to use http or https scheme by entering true to use https or false for http in extras. Default is http.
Unfortunately from the Airflow UI when trying to specify the connection and especially the Extras options it accepts a JSON-like object, so whatever you put differently to a dictionary the code fails to update the extra options for that connection.
Checking in more details what the Jenkins hook does:
self.connection = connection
connection_prefix = "http"
# connection.extra contains info about using https (true) or http (false)
if to_boolean(connection.extra):
connection_prefix = "https"
url = f"{connection_prefix}://{connection.host}:{connection.port}"
where the connection.extra cannot be a simple true/false string!
What you think should happen instead
Either we should get the http or https from the Schema
Or we should update the JenkinsHook to read the provided dictionary for http value:
if to_boolean(connection.extra.https)
How to reproduce
No response
Operating System
macos Monterey 12.6.2
Versions of Apache Airflow Providers
pip freeze | grep apache-airflow-providers
apache-airflow-providers-celery==2.1.0
apache-airflow-providers-common-sql==1.3.1
apache-airflow-providers-ftp==2.0.1
apache-airflow-providers-http==2.0.3
apache-airflow-providers-imap==2.2.0
apache-airflow-providers-jenkins==3.1.0
apache-airflow-providers-sqlite==2.1.0
Deployment
Virtualenv installation
Deployment details
No response
Anything else
No response
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct