Skip to content

Commit 4779d8d

Browse files
fix: setup job to suport ssh github path in poetry (#368)
### Description Reusable workflow fails in setup -> `modinput-test-prerequisites` ignores `ssh://` protocol in poetry.lock/pyproject.toml ``` [tool.poetry.group.modinput.dependencies] splunk_add_on_ucc_modinput_test = {git = "ssh://git@github.com/splunk/addonfactory-ucc-test.git", tag = "v0.2.0"} pytest-xdist = ">=3.5.0" ``` Example Job: https://github.com/splunk/splunk-add-on-for-amazon-web-services/actions/runs/13052937673/job/36605381881 ``` HangupException The remote server unexpectedly closed the connection. at /opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/dulwich/protocol.py:215 in read_pkt_line 211│ 212│ try: 213│ sizestr = read(4) 214│ if not sizestr: → 215│ raise HangupException 216│ size = int(sizestr, 16) 217│ if size == 0 or size == 1: # flush-pkt or delim-pkt 218│ if self.report_activity: 219│ self.report_activity(4, "read") The following error occurred when trying to handle this error: HangupException git@github.com: Permission denied (publickey). ``` ### Checklist - [ ] `README.md` has been updated or is not required - [ ] push trigger tests - [ ] manual release test - [ ] automated releases test - [ ] pull request trigger tests - [ ] schedule trigger tests - [x] workflow errors/warnings reviewed and addressed ### Testing done PR using WF from branch `fix/setup_poetry_github` splunk/splunk-add-on-for-amazon-web-services#1401 Job https://github.com/splunk/splunk-add-on-for-amazon-web-services/actions/runs/13198332408/job/36845360655?pr=1401 --------- Co-authored-by: mkolasinski-splunk <mkolasinski@splunk.com>
1 parent 4bb076c commit 4779d8d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/reusable-build-test-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1003,6 +1003,8 @@ jobs:
10031003
export POETRY_REPOSITORIES_SPLUNK_ADD_ON_UCC_MODINPUT_TEST_URL=https://github.com/splunk/addonfactory-ucc-test.git
10041004
export POETRY_HTTP_BASIC_SPLUNK_ADD_ON_UCC_MODINPUT_TEST_USERNAME=${{ secrets.SA_GH_USER_NAME }}
10051005
export POETRY_HTTP_BASIC_SPLUNK_ADD_ON_UCC_MODINPUT_TEST_PASSWORD=${{ secrets.GH_TOKEN_ADMIN }}
1006+
git config --global --add url."https://${{ secrets.GH_TOKEN_ADMIN }}@github.com".insteadOf https://github.com
1007+
git config --global --add url."https://${{ secrets.GH_TOKEN_ADMIN }}@github.com".insteadOf ssh://git@github.com
10061008
poetry install --only modinput
10071009
if [ -f "tests/ucc_modinput_functional/tmp/openapi.json" ]; then
10081010
poetry run ucc-test-modinput -o tests/ucc_modinput_functional/tmp/openapi.json -t ${{ steps.download-openapi.outputs.download-path }}/tmp/
@@ -1016,8 +1018,6 @@ jobs:
10161018
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
10171019
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
10181020
run: |
1019-
git config --global --add url."https://${{ secrets.GH_TOKEN_ADMIN }}@github.com".insteadOf https://github.com
1020-
git config --global --add url."https://${{ secrets.GH_TOKEN_ADMIN }}@github.com".insteadOf ssh://git@github.com
10211021
poetry install --with dev
10221022
libs_archive=libs_$(basename "$BUILD_NAME" .spl).tgz
10231023
cp -r "$(find "$(poetry env info --path)" -maxdepth 3 -type d -name "site-packages")" libs/

0 commit comments

Comments
 (0)