Skip to content

crash when using status last_build command #338

@boegel

Description

@boegel

@casparvl I tried this (see #334) on our local bot after checking out develop, and hit a crash (found in pyghee.log):

[20250821-T10:32:33] run_subprocess(): 'fetch all comments' by running 'curl -L https://api.github.com/repos/<CENSORED_PRIVATE_REPO>/issues/123/comments?per_page=100&page=1' in directory '/kyukon/scratch/gent/vo/001/gvo00100/vsc40003/apps_bot/eessi-bot-software-layer'
[20250821-T10:32:33] run_cmd(): Result for running 'curl -L https://api.github.com/repos/<CENSORED_PRIVATE_REPO>/issues/123/comments?per_page=100&page=1' in 'None
           stdout '{
  "message": "Not Found",
  "documentation_url": "https://docs.github.com/rest/issues/comments#list-issue-comments",
  "status": "404"
}
'
           stderr '  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100   139  100   139    0     0    649      0 --:--:-- --:--:-- --:--:--   649
'
           exit code 0
[20250821-T10:32:33] Unexpected err=string indices must be integers, type(err)=<class 'TypeError'>
[20250821-T10:32:33] WARNING: A crash occurred!
Traceback (most recent call last):
  File "/kyukon/scratch/gent/400/vsc40003/apps_bot/venv_apps_bot_p39/lib64/python3.9/site-packages/pyghee/lib.py", line 194, in process_event
    self.handle_event(event_info, log_file=log_file)
  File "/kyukon/scratch/gent/400/vsc40003/apps_bot/venv_apps_bot_p39/lib64/python3.9/site-packages/pyghee/lib.py", line 124, in handle_event
    handler(event_info, log_file=log_file)
  File "/kyukon/scratch/gent/vo/001/gvo00100/vsc40003/apps_bot/eessi-bot-software-layer/eessi_bot_event_handler.py", line 310, in handle_issue_comment_event
    update = self.handle_bot_command(event_info, cmd)
  File "/kyukon/scratch/gent/vo/001/gvo00100/vsc40003/apps_bot/eessi-bot-software-layer/eessi_bot_event_handler.py", line 489, in handle_bot_command
    return handler(event_info, bot_command)
  File "/kyukon/scratch/gent/vo/001/gvo00100/vsc40003/apps_bot/eessi-bot-software-layer/eessi_bot_event_handler.py", line 593, in handle_bot_command_status
    status_table = request_bot_build_issue_comments(repo_name, pr_number)
  File "/kyukon/scratch/gent/vo/001/gvo00100/vsc40003/apps_bot/eessi-bot-software-layer/tasks/build.py", line 1222, in request_bot_build_issue_comments
    comment_body = comment['body'].split('\n')
TypeError: string indices must be integers

This happens because we're using a private repo here, I think (see the "Not found" result from the call to the GitHub API)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions