runtimes-common
runtimes-common copied to clipboard
Dump the user provided requirements.txt/pipfile into the verbose logs
I mean the contents of these file used to determine dependencies
We can definitely log the contents of requirements.txt used in debug mode. Do you want it for debugging purpose?
Yes, this is for debugging
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
Please feel free to send a PR and i can help you get it in.