runtimes-common icon indicating copy to clipboard operation
runtimes-common copied to clipboard

Dump the user provided requirements.txt/pipfile into the verbose logs

Open rahulrv1980 opened this issue 6 years ago • 5 comments

rahulrv1980 avatar Jun 01 '18 20:06 rahulrv1980

I mean the contents of these file used to determine dependencies

rahulrv1980 avatar Jun 01 '18 20:06 rahulrv1980

We can definitely log the contents of requirements.txt used in debug mode. Do you want it for debugging purpose?

tejal29 avatar Jun 04 '18 16:06 tejal29

Yes, this is for debugging

rahulrv1980 avatar Jun 04 '18 18:06 rahulrv1980

IIUC correctly, all you have to do is log the parsed pkg here https://github.com/GoogleCloudPlatform/runtimes-common/blob/5395f7dfe6039e843d49258894fbdd4a44f65f77/ftl/python/builder.py#L79

pkgs = self._parse_pipfile_pkgs()
logging.debug("Pip Packages: {0}" .format(','.join(pkgs)))

If you only want the contents of Reuirement.txt, you can check the file name and add debug line here: https://github.com/GoogleCloudPlatform/runtimes-common/blob/0a7b712d97c3cc7236efe9db66e5e52ce4afca81/ftl/common/ftl_util.py#L135

tejal29 avatar Jun 05 '18 17:06 tejal29

Please feel free to send a PR and i can help you get it in.

tejal29 avatar Jun 05 '18 17:06 tejal29