You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While testing #501 I realized that we don't have great error handling when git deploying when a requirements.txt file isn't found.
It's not likely a customer will hit this because we will create a requirements.txt file if there isn't one during the write-manifest procedure, but it's easy to mistakenly omit the requirements.txt file when pushing to git.
Since the requirements.txt file is required when deploying via manifest, should we fail earlier during the bundling step? Right now we fail after it gets to Connect and it's not a very nice error:
> rsconnect deploy git -r http://github.com/rstudio/rsc-hello-world-content.git -d python3/no-manifest -b kg-force-updates -n ldap -E blue=green
Validating server... [OK]
Deploying git repository ... [OK]
2023/10/20 20:12:56.644392086 [rsc-session] Job Key: oPagWzrULWAESaDi
2023/10/20 20:12:56.676232628 origin
Fetching git repo at /yeti-volume/dev-ldap/data/git/github.com/rstudio-rsc-hello-world-content.git
2023/10/20 20:12:56.852288128 [rsc-session] Job Key: cYRKfCThEasvyZ4K
2023/10/20 20:12:57.232116878 warning: redirecting to https://github.com/rstudio/rsc-hello-world-content.git/
2023/10/20 20:12:57.498914586 From http://github.com/rstudio/rsc-hello-world-content
2023/10/20 20:12:57.498927586 e507034..308f052 kg-force-updates -> origin/kg-force-updates
2023/10/20 20:12:57.694479586 [rsc-session] Job Key: GlPIAV1vpSl4vWo2
2023/10/20 20:12:58.058399420 warning: redirecting to https://github.com/rstudio/rsc-hello-world-content.git/
2023/10/20 20:12:58.142749337 c6494a37db3949da36336ec327d4af577002635e refs/heads/actions-push
2023/10/20 20:12:58.142761378 74308e6f0a52ddb70ce78ceecd040b819ec30fba refs/heads/autoupdatetest
2023/10/20 20:12:58.142820753 89e7248d2cca11822c1ed15b75767ee5bfc33f6d refs/heads/bad-examples
2023/10/20 20:12:58.142822337 8559027076e6e479eb02c480f52d416f4580cbf2 refs/heads/broken-manifest
2023/10/20 20:12:58.142830087 9ec5c8dc4d0aa485b49a736c0f2b5b41122b8017 refs/heads/chaita-update-plumber
2023/10/20 20:12:58.142830712 58d85302508e34ae5b7f75106516a1dcf71695f9 refs/heads/change-python-for-selenium
2023/10/20 20:12:58.142837837 1815f0065182f93d3f316a52cbdd9e5b6c945024 refs/heads/deth-update-manifests
2023/10/20 20:12:58.142838337 57cf51f43575b9b799a8924ae629ad881a55e5fa refs/heads/empty-repository-example
2023/10/20 20:12:58.142844920 ab8cf0fa58314ad7a8a2ce7ecf052061eb7ab73e refs/heads/error-message-app-mode
2023/10/20 20:12:58.142845503 363a334ebd545be8bb3424c2878d377579faf552 refs/heads/erroring-content
2023/10/20 20:12:58.142852753 17d1b510d54f5966b1f308bfcd7fb46a6d8dc8db refs/heads/git-app-mode-test
2023/10/20 20:12:58.142853253 cb963d55e8ea9b9ecc4b65d96c4fbb8f8a52a0ca refs/heads/git-test-all
2023/10/20 20:12:58.142860462 46679f7b3ff21c05383c09dc0d66c9284f959baa refs/heads/git-test_13792
2023/10/20 20:12:58.142860962 33bc97ed7d609672d4ba528144d72a2438bafcbd refs/heads/kg-dash-fix
2023/10/20 20:12:58.142868128 ff9758b93fed20c49162f396ed0b9d68b276aead refs/heads/kg-dash-werkzeug
2023/10/20 20:12:58.142868670 308f05255f86061177e7bb06c1d692287a6df3e9 refs/heads/kg-force-updates
2023/10/20 20:12:58.142875420 5605ceca44d0788dc69b43f4e130afbaa148e211 refs/heads/kg-fresh-test
2023/10/20 20:12:58.142875920 6e08806c3e2e73ca3e6ef06b9fe63fd395947630 refs/heads/kg-jupyter-test
2023/10/20 20:12:58.142882628 a5e5b68b3c0a239bfb2a84c6adcbf784f65ab36f refs/heads/kg-new
2023/10/20 20:12:58.142883170 2a154485c42b804ca21d71de14454202c17ed2f3 refs/heads/kg-new-branch
2023/10/20 20:12:58.142889837 01899b34ad48fd19e86aecd1ce829af7d4e92e36 refs/heads/kg-newer-branch
2023/10/20 20:12:58.142890337 4e10417c3f56da1320082db973a436613582bf34 refs/heads/kg-pyshiny
2023/10/20 20:12:58.142897045 6b4c20411828898dd9855a27db3166692631f744 refs/heads/kg-python-error
2023/10/20 20:12:58.142897545 af56ca8327a43520cff3c820c16c410513b9cbc4 refs/heads/kg-python2-test
2023/10/20 20:12:58.142904253 b8c8467737c65a33cbfee688c68bcb199764479b refs/heads/kg-streamlit-bokeh
2023/10/20 20:12:58.142904837 d060bbd2f191cf87c606cff6be567fded7256663 refs/heads/log-parser-errors
2023/10/20 20:12:58.142912462 04487d56663026ca214474af94616c98196c82e3 refs/heads/main
2023/10/20 20:12:58.142913003 2bd1c49680a33cf2079e078285b60c250e533c7b refs/heads/manifest-json-in-root
2023/10/20 20:12:58.142919795 8ee0d9ce6f3dee1e1f54d7cee5b4b89733c889ee refs/heads/many-dirs
2023/10/20 20:12:58.142920378 642c20d3971889cf49594a5a405f9ddfd5ecf131 refs/heads/mm-notebook-3.7.4
2023/10/20 20:12:58.142927170 c39744ea0e32705122ba105f39f946cf41999f1a refs/heads/nam-update-R
2023/10/20 20:12:58.142927670 8468e6e17779fe121f95b16e8dd985fa50d81993 refs/heads/namk-hello-world
2023/10/20 20:12:58.142934462 2829606626ca485577b46529343f6086c6fb6fb8 refs/heads/new-test
2023/10/20 20:12:58.142934962 4fb4f4786407300cc52456fa9e5d1c86fe7118b0 refs/heads/new_branch
2023/10/20 20:12:58.142941670 77c36587666d33fc9bc33906a9932ab8c5791d79 refs/heads/push-testing
2023/10/20 20:12:58.142942170 dedfe7eaaa2dcab8ff3e74cddc50ee1236d27715 refs/heads/shiny-test
2023/10/20 20:12:58.142948795 9356400ac80f28c8705a34c850645a83d60d8d62 refs/heads/sj-multiple-entries-test
2023/10/20 20:12:58.142949295 adb234cd60535d230b40c236ed0ae7a300cb9f5b refs/heads/small-static-content
2023/10/20 20:12:58.142956462 8b268ff052031b7098047407bdd16dc8002eac46 refs/heads/test-git-deploy
2023/10/20 20:12:58.142956962 dfd186b352bea0ad2aae9fa7f1b849ff2eb50041 refs/heads/test-notebook-git
2023/10/20 20:12:58.142963628 46571f53ab475a9b477caba39d526256211c65bf refs/heads/testUpdate
2023/10/20 20:12:58.142964212 d5e100c63382980bd5da5ddd74cc24d6b80ffe0f refs/heads/testupdatelocally
2023/10/20 20:12:58.323244128 [rsc-session] Job Key: Q7QGypOhZ1G4kac2
Finished creating bundle 42 for app 27
Building Bokeh application...
Bundle created with Python version 3.11.6 is compatible with environment Local with Python version 3.11.3 from /opt/python/3.11.3/bin/python3.11
Bundle requested Python version 3.11.6; using /opt/python/3.11.3/bin/python3.11 which has version 3.11.3
2023/10/20 20:12:58.568342254 [rsc-session] Content GUID: 3f5e3844-9f99-4724-b6f3-373cfa73c7e3
2023/10/20 20:12:58.568826170 [rsc-session] Content ID: 27
2023/10/20 20:12:58.568830295 [rsc-session] Bundle ID: 42
2023/10/20 20:12:58.568832962 [rsc-session] Job Key: F6zmvTVjPbhxObbh
2023/10/20 20:12:58.769937004 Running on host: dev-ldap
2023/10/20 20:12:58.884799087 Linux distribution: Ubuntu 22.04.2 LTS (jammy)
2023/10/20 20:12:58.902829754 Running as user: uid=998(rstudio-connect) gid=998(rstudio-connect) groups=998(rstudio-connect),1000(data-scientists)
2023/10/20 20:12:58.902836129 Connect version: 2023.10.0-dev+499-g368ad83740
2023/10/20 20:12:58.902894337 LANG: C.utf8
2023/10/20 20:12:58.903114670 Working directory: /connect/mnt/app
2023/10/20 20:12:58.903274962 Building environment using Python 3.11.3 | packaged by conda-forge | (main, Apr 6 2023, 08:57:19) [GCC 11.3.0] at /opt/python/3.11.3/bin/python3.11
2023/10/20 20:12:58.903676545 Unexpected error while building Python environment: [Errno 2] No such file or directory: 'requirements.txt'
2023/10/20 20:12:58.905586212 Traceback (most recent call last):
2023/10/20 20:12:58.906119504 File "/connect/python/build_environment.py", line 397, in main
2023/10/20 20:12:58.906122379 specs = pip_read_requirements_file(requirements_file)
2023/10/20 20:12:58.906131962 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023/10/20 20:12:58.906144920 File "/connect/python/report_helpers.py", line 294, in pip_read_requirements_file
2023/10/20 20:12:58.906153295 with open(environment_file, "r") as f:
2023/10/20 20:12:58.906153795 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023/10/20 20:12:58.906159004 FileNotFoundError: [Errno 2] No such file or directory: 'requirements.txt'
Build error: exit status 255
An error occurred while building the content (build-failed-error)
Error from Connect server: exit status 255
Error: Task exited with status 1.
The text was updated successfully, but these errors were encountered:
kgartland-rstudio
changed the title
No requirements when deploying by manifest error handling
No requirements when deploy git error handling
Oct 20, 2023
While testing #501 I realized that we don't have great error handling when git deploying when a requirements.txt file isn't found.
It's not likely a customer will hit this because we will create a requirements.txt file if there isn't one during the
write-manifest
procedure, but it's easy to mistakenly omit the requirements.txt file when pushing to git.Since the requirements.txt file is required when deploying via manifest, should we fail earlier during the bundling step? Right now we fail after it gets to Connect and it's not a very nice error:
The text was updated successfully, but these errors were encountered: