New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix azure mailer deployment issue #6325
Conversation
aws - service-catalog - cross-account (cloud-custodian#6261)
can your confirm successful e2e message delivery with the change? tracking back on why pkg_resources was included it looks like it was splunk support in #4044 .. and it looks like azure was working afterwards, but i suspect the function version change in the msi/csi support may have resulted in the issue here. its also a little unclear why this would fix as afaics pkg_resources never makes it into the requirements file (testing on osx, py 3.8 though) >>> from c7n_mailer.azure_mailer import deploy
>>> reqs_txt = deploy.get_mailer_requirements()
>>> "pkg_resources" in reqs_txt
False doing a fresh install in a virtualenv its a little hard to see any explicit dep on pkg_resources in the output. the usages modes between the two providers are a little different though, CORE_DEPS is assembled in aws from local imports, where as in azure we generate a requirements file server side installation and pkg_resources itself comes from setuptools which would always be installed. a safer solution would be to add it to azure_mailer/deploy generate_requirements ignore.. but given its not in the output of that function its a little more unclear to me why it would resolve. |
Looks like the root cause is a bug between ubuntu and venv that shows as fixed in may |
my guess is the original author of the splunk change was trying to figure out which deps needed to be added and was working from a pip freeze with the bug. this matches the vague comment on the pkg_resources dep being added. we should have never needed pkg_resources as a listed dep |
in aws lambda, it works because there is a pkg_resources=0.0.0 available as a package and it is installed :) |
pkg_resources comes in via setuptools, which isn't in the aws environment, we actually upload clientside by name into the package, but in gcp and azure we do server side building. |
working with hugh i was able to identify why i never hit this on e2e testing because i was using pyenv installed python, which differs significantly from system python installs at least on ubuntu wrt to distutils/setuptools. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, lgtm
Fix for #6012
pkg_resources seems to be unneeded and is causing packaging issues when deploying the azure function