Skip to content

Commit

Permalink
Remove Provider Deprecations in Jenkins (#44630)
Browse files Browse the repository at this point in the history
  • Loading branch information
jason810496 authored Dec 4, 2024
1 parent 4ffa6af commit c48975e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
11 changes: 11 additions & 0 deletions providers/src/airflow/providers/jenkins/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,17 @@
Changelog
---------

main
.....

.. warning::
All deprecated classes, parameters and features have been removed from the Jenkins provider package.
The following breaking changes were introduced:

* Operators

* Removed ``get_hook`` method from ``JenkinsJobTriggerOperator``. Use ``hook`` property instead

3.7.2
.....

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,10 @@
from urllib.error import HTTPError, URLError

import jenkins
from deprecated.classic import deprecated
from jenkins import Jenkins, JenkinsException
from requests import Request

from airflow.exceptions import AirflowException, AirflowProviderDeprecationWarning
from airflow.exceptions import AirflowException
from airflow.models import BaseOperator
from airflow.providers.jenkins.hooks.jenkins import JenkinsHook

Expand Down Expand Up @@ -193,11 +192,6 @@ def hook(self) -> JenkinsHook:
"""Instantiate the Jenkins hook."""
return JenkinsHook(self.jenkins_connection_id)

@deprecated(reason="use `hook` property instead.", category=AirflowProviderDeprecationWarning)
def get_hook(self) -> JenkinsHook:
"""Instantiate the Jenkins hook."""
return self.hook

def execute(self, context: Mapping[Any, Any]) -> str | None:
self.log.info(
"Triggering the job %s on the jenkins : %s with the parameters : %s",
Expand Down

0 comments on commit c48975e

Please sign in to comment.