This is an automated email from the ASF dual-hosted git repository.

eladkal pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 65e6a1ed0cb Fix: Make Jenkins connection schema visible (#55444)
65e6a1ed0cb is described below

commit 65e6a1ed0cb257a936e906623d6ea7b535a11f40
Author: LI,JHE-CHEN <[email protected]>
AuthorDate: Wed Sep 10 05:39:26 2025 -0400

    Fix: Make Jenkins connection schema visible (#55444)
---
 providers/jenkins/src/airflow/providers/jenkins/hooks/jenkins.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/providers/jenkins/src/airflow/providers/jenkins/hooks/jenkins.py 
b/providers/jenkins/src/airflow/providers/jenkins/hooks/jenkins.py
index 0c605568a80..c73adcbf022 100644
--- a/providers/jenkins/src/airflow/providers/jenkins/hooks/jenkins.py
+++ b/providers/jenkins/src/airflow/providers/jenkins/hooks/jenkins.py
@@ -49,7 +49,7 @@ class JenkinsHook(BaseHook):
     def get_ui_field_behaviour(cls) -> dict[str, Any]:
         """Return custom UI field behaviour for Jenkins connection."""
         return {
-            "hidden_fields": ["schema", "extra"],
+            "hidden_fields": ["extra"],
             "relabeling": {},
             "placeholders": {
                 "login": "Login for the Jenkins service you would like to 
connect to",
@@ -67,7 +67,9 @@ class JenkinsHook(BaseHook):
         # connection.extra contains info about using https (true) or http 
(false)
         if connection.extra_dejson.get("use_https"):
             connection_prefix = "https"
-        url = 
f"{connection_prefix}://{connection.host}:{connection.port}/{connection.schema}"
+        url = f"{connection_prefix}://{connection.host}:{connection.port}"
+        if connection.schema:
+            url = f"{url}/{connection.schema}"
         self.log.info("Trying to connect to %s", url)
         self.jenkins_server = jenkins.Jenkins(url, connection.login, 
connection.password)
 

Reply via email to