Skip to content

Conversation

@patricklee2
Copy link
Contributor

@patricklee2 patricklee2 commented Jan 23, 2019

fixes #8282 #8281, #8280 , #8279

uses fabric ssh library which as a BSD 2-clause license
Added license at src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/fabric_license
im not sure if that is the correct place top out it.


This checklist is used to make sure that common guidelines for a pull request are followed.

  • The PR has modified HISTORY.rst describing any customer-facing, functional changes. Note that this does not include changes only to help content. (see Modifying change log).

  • I adhere to the Command Guidelines.

@patricklee2 patricklee2 force-pushed the fab branch 5 times, most recently from 2c8c6b0 to a398930 Compare January 25, 2019 01:09
@patricklee2 patricklee2 changed the title [WIP] [do not merge] bug fix for webapp ssh Bug fix for webapp ssh Jan 25, 2019
@patricklee2 patricklee2 force-pushed the fab branch 3 times, most recently from b1eb936 to 28fb93c Compare January 25, 2019 21:40
@patricklee2
Copy link
Contributor Author

@yugangw-msft @panchagnula @yiliaomsft @rramachand21
This is ready for review

Copy link
Contributor

@yugangw-msft yugangw-msft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM, the main question is on why pinning the cryptography version.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest you log an verbose entry to document the exception details: logger.info(ex). My concern is catching generic exceptions above could swallow non connection related errors which ends up making the diagnosis pretty hard.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

Copy link
Contributor

@yugangw-msft yugangw-msft Jan 28, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cryptography is a pretty common dependency, why we need to pinning to a specific version?

Copy link
Contributor Author

@patricklee2 patricklee2 Jan 28, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

paramiko, (one of the dependency) is still using a deprecated method.
as a result, these warnings appear, and I couldn't suppress them
the fix was to pin the version.
paramiko/paramiko#1369

/home/patle/azure-cli/env/lib/python3.7/site-packages/paramiko/kex_ecdh_nist.py:39: CryptographyDeprecationWarning: encode_point has been deprecated on EllipticCurvePublicNumbers and will be removed in a future version. Please use EllipticCurvePublicKey.public_bytes to obtain both compressed and uncompressed point encoding.
  m.add_string(self.Q_C.public_numbers().encode_point())
/home/patle/azure-cli/env/lib/python3.7/site-packages/paramiko/kex_ecdh_nist.py:96: CryptographyDeprecationWarning: Support for unsafe construction of public numbers from encoded data will be removed in a future version. Please use EllipticCurvePublicKey.from_encoded_point
  self.curve, Q_S_bytes
/home/patle/azure-cli/env/lib/python3.7/site-packages/paramiko/kex_ecdh_nist.py:111: CryptographyDeprecationWarning: encode_point has been deprecated on EllipticCurvePublicNumbers and will be removed in a future version. Please use EllipticCurvePublicKey.public_bytes to obtain both compressed and uncompressed point encoding.
  hm.add_string(self.Q_C.public_numbers().encode_point())

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be reasonable to have "<2.5.0"?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also log an issue to track to upgrade paramiko when it rolls out the fix. Please assign that issue to both you and me

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed it to <2.5.0

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The <2.5.0 now causes a conflict #9629. Please update.

@patricklee2 patricklee2 force-pushed the fab branch 4 times, most recently from 243e9ed to e18cf7e Compare January 28, 2019 20:25
time.sleep(1)
try:
c.run('cat /etc/motd', pty=True)
c.run('source /etc/profile; /bin/ash', pty=True)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is supposed to be /bin/bash right?

marstr added a commit to marstr/azure-cli that referenced this pull request Feb 12, 2019
In Azure#8324, a new contraint was create that put a ceiling on the version of cryptography that we can support. However, that constraint never made its way to our requirements.txt file in our Homebrew build. Because the largest version at the time was 2.4.x, there wasn't a problem up to a few days ago when 2.5 was finally available for download in our CI environment. Because there is another library that requires cryptography, and doesn't have this constraint, and because we do not use `pip freeze` or `pipenv` to lock our dependencies ahead of time, pip greedily installs the largest version available when it first sees the cryptography requirement then fails when it gets to appservices.
marstr added a commit that referenced this pull request Feb 12, 2019
In #8324, a new contraint was create that put a ceiling on the version of cryptography that we can support. However, that constraint never made its way to our requirements.txt file in our Homebrew build. Because the largest version at the time was 2.4.x, there wasn't a problem up to a few days ago when 2.5 was finally available for download in our CI environment. Because there is another library that requires cryptography, and doesn't have this constraint, and because we do not use `pip freeze` or `pipenv` to lock our dependencies ahead of time, pip greedily installs the largest version available when it first sees the cryptography requirement then fails when it gets to appservices.
marstr added a commit to marstr/azure-cli that referenced this pull request Jun 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants