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
At the UGent we are currently looking at letting the bot handle a private repo. The bot could handle the events from created prs, and commando in the private repo without any issues.
However the bot: build commando is not able to execute and errors out. This does not crash the event handler but the build job also never gets started. and there is also not anything posted to github that indicates that the ´event_handlerran into a problem when handling thebot: build` command.
When going into the Pyghee logs the error was very clear.
First error I ran into was the following:
[20231205-T15:00:06] Unexpected err=run_cmd(): Error running 'git clone https://github.com/laraPPr/software_layer_VSC /scratch/gent/461/vsc46128/EESSI/jobs/2023.12/pr_1/event_921c5b60-9376-11ee-912a-4abc2ba9feca/run_000/RHEL8_zen2-ib/install' in '/scratch/gent/461/vsc46128/EESSI/jobs/2023.12/pr_1/event_921c5b60-9376-11ee-912a-4abc2ba9feca/run_000/RHEL8_zen2-ib/install
stdout ''
stderr 'Cloning into '/scratch/gent/461/vsc46128/EESSI/jobs/2023.12/pr_1/event_921c5b60-9376-11ee-912a-4abc2ba9feca/run_000/RHEL8_zen2-ib/install'...
remote: Repository not found.
fatal: Authentication failed for 'https://github.com/laraPPr/software_layer_VSC/'
'
exit code 128, type(err)=<class 'RuntimeError'>
[20231205-T15:00:06] WARNING: A crash occurred!
Traceback (most recent call last):
File "/kyukon/scratch/gent/461/vsc46128/EESSI/venv_eessi_bot_login_p36/lib64/python3.6/site-packages/pyghee/lib.py", line 170, in process_event
self.handle_event(event_info, log_file=log_file)
File "/kyukon/scratch/gent/461/vsc46128/EESSI/venv_eessi_bot_login_p36/lib64/python3.6/site-packages/pyghee/lib.py", line 102, in handle_event
handler(event_info, log_file=log_file)
File "/kyukon/scratch/gent/461/vsc46128/EESSI/eessi-bot-software-layer/eessi_bot_event_handler.py", line 221, in handle_issue_comment_event
update = self.handle_bot_command(event_info, cmd)
File "/kyukon/scratch/gent/461/vsc46128/EESSI/eessi-bot-software-layer/eessi_bot_event_handler.py", line 398, in handle_bot_command
return handler(event_info, bot_command)
File "/kyukon/scratch/gent/461/vsc46128/EESSI/eessi-bot-software-layer/eessi_bot_event_handler.py", line 444, in handle_bot_command_build
submitted_jobs = submit_build_jobs(pr, event_info, bot_command.action_filters)
File "/kyukon/scratch/gent/461/vsc46128/EESSI/eessi-bot-software-layer/tasks/build.py", line 695, in submit_build_jobs
jobs = prepare_jobs(pr, cfg, event_info, action_filter)
File "/kyukon/scratch/gent/461/vsc46128/EESSI/eessi-bot-software-layer/tasks/build.py", line 455, in prepare_jobs
download_pr(base_repo_name, base_branch_name, pr, job_dir)
File "/kyukon/scratch/gent/461/vsc46128/EESSI/eessi-bot-software-layer/tasks/build.py", line 347, in download_pr
clone_output, clone_error, clone_exit_code = run_cmd(git_clone_cmd, "Clone repo", arch_job_dir)
File "/kyukon/scratch/gent/461/vsc46128/EESSI/eessi-bot-software-layer/tools/__init__.py", line 59, in run_cmd
raise RuntimeError(error_msg)
RuntimeError: run_cmd(): Error running 'git clone https://github.com/laraPPr/software_layer_VSC /scratch/gent/461/vsc46128/EESSI/jobs/2023.12/pr_1/event_921c5b60-9376-11ee-912a-4abc2ba9feca/run_000/RHEL8_zen2-ib/install' in '/scratch/gent/461/vsc46128/EESSI/jobs/2023.12/pr_1/event_921c5b60-9376-11ee-912a-4abc2ba9feca/run_000/RHEL8_zen2-ib/install
stdout ''
stderr 'Cloning into '/scratch/gent/461/vsc46128/EESSI/jobs/2023.12/pr_1/event_921c5b60-9376-11ee-912a-4abc2ba9feca/run_000/RHEL8_zen2-ib/install'...
remote: Repository not found.
fatal: Authentication failed for 'https://github.com/laraPPr/software_layer_VSC/'
'
exit code 128
This error I resolved by updating the adjusting the clone commando in tasks/build.py. This solution requires however that there is a valid private key linked to a GitHub account. Which is the case on my bot machine.
I However do not have a working solution yet. This solution requires the access to $GITHUB_TOKEN variable after the EESSIBotSoftwareLayer flask app is created. which seems to not be possible. I also cannot tell where the $GITHUB_TOKEN variable is used so I don't know if it can be a solution to create an .env file for the $GITHUB_TOKEN and $GITHUB_APP_SECRET_TOKEN variables. At the moment however I cannot figure out where these variables are used when creating the app. I only know that when trying to create app without the $GITHUB_TOKEN you get the following error.
ERROR: GitHub token is not available via $GITHUB_TOKEN!
And I'm struggling to figure out from where this error is coming.
The text was updated successfully, but these errors were encountered:
At the UGent we are currently looking at letting the bot handle a private repo. The bot could handle the events from created prs, and commando in the private repo without any issues.
However the
bot: build
commando is not able to execute and errors out. This does not crash the event handler but the build job also never gets started. and there is also not anything posted to github that indicates that the ´event_handlerran into a problem when handling the
bot: build` command.When going into the Pyghee logs the error was very clear.
First error I ran into was the following:
This error I resolved by updating the adjusting the clone commando in
tasks/build.py
. This solution requires however that there is a valid private key linked to a GitHub account. Which is the case on my bot machine.After implementing the solution above I ran into a seccond error:
A possible solution is adjusting the
curl
commando to the following:I However do not have a working solution yet. This solution requires the access to $GITHUB_TOKEN variable after the EESSIBotSoftwareLayer flask app is created. which seems to not be possible. I also cannot tell where the $GITHUB_TOKEN variable is used so I don't know if it can be a solution to create an
.env
file for the $GITHUB_TOKEN and $GITHUB_APP_SECRET_TOKEN variables. At the moment however I cannot figure out where these variables are used when creating the app. I only know that when trying to create app without the $GITHUB_TOKEN you get the following error.And I'm struggling to figure out from where this error is coming.
The text was updated successfully, but these errors were encountered: