Skip to content

Conversation

@darkag
Copy link
Contributor

@darkag darkag commented Feb 28, 2025

change get_conn behaviour, this will introduce a backward incompatibility for people who used low level wirnm function since instead of initiating distant remote shell and returning shell_id, it will return a winrm.protocol.Protocol object and you will have to call open_shell() to initiate the remote shell (.

for others (who just use hook.run or operator) it will change nothing (except that you can call run twice without instantiating a new hook)

I also made a small change to use protocol.get_command_output_raw (introduced in v0.5.0 of pywinrm) instead of _raw_get_command_output with preserving compatibility with earlier versions

closes: #46668


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

@eladkal eladkal changed the title change get_conn behaviour in order to fix #46668 fix inconsistence between the get_conn and run in WinrunHook Mar 13, 2025
@eladkal eladkal changed the title fix inconsistence between the get_conn and run in WinrunHook fix inconsistence between the get_conn and run in WinRMHook Mar 13, 2025
@Lee-W Lee-W self-requested a review March 14, 2025 03:31
@potiuk potiuk merged commit 06bd11a into apache:main Mar 20, 2025
60 checks passed
agupta01 pushed a commit to agupta01/airflow that referenced this pull request Mar 21, 2025
…#47229)

* Change get_conn behaviour in order to make run callable multiple times

* fix tests
shubham-pyc pushed a commit to shubham-pyc/airflow that referenced this pull request Mar 22, 2025
…#47229)

* Change get_conn behaviour in order to make run callable multiple times

* fix tests
nailo2c pushed a commit to nailo2c/airflow that referenced this pull request Apr 4, 2025
…#47229)

* Change get_conn behaviour in order to make run callable multiple times

* fix tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Winrm hook, run can't be called twice

3 participants