Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bot: status command seems to fail in some environments #246

Closed
trz42 opened this issue Feb 8, 2024 · 5 comments
Closed

bot: status command seems to fail in some environments #246

trz42 opened this issue Feb 8, 2024 · 5 comments

Comments

@trz42
Copy link
Contributor

trz42 commented Feb 8, 2024

Just tried the new bot: status command with the production instance on AWS. See EESSI/software-layer#321 (comment)

The log (pyghee.log) contains the following

[20240208-T18:35:01] get_architecture_targets(): arch target map '{"linux/x86_64/generic": "--partition x86-64-generic-node", "linux/x86_64/intel/haswell": "--partition x86-64-intel-haswell-node", "linux/x86_64/intel/skylake_avx512": "--partition x86-64-intel-skylake-node", "linux/x86_64/amd/zen2": "--partition x86-64-amd-zen2-node", "linux/x86_64/amd/zen3": "--partition x86-64-amd-zen3-node", "linux/aarch64/generic": "--partition aarch64-generic-node", "linux/aarch64/neoverse_n1": "--partition aarch64-neoverse-n1-node", "linux/aarch64/neoverse_v1": "--partition aarch64-neoverse-v1-node"}'
[20240208-T18:35:01] Unexpected err=string indices must be integers, type(err)=<class 'TypeError'>
[20240208-T18:35:01] WARNING: A crash occurred!
Traceback (most recent call last):
  File "/home/bot/.local/lib/python3.6/site-packages/pyghee/lib.py", line 170, in process_event
    self.handle_event(event_info, log_file=log_file)
  File "/home/bot/.local/lib/python3.6/site-packages/pyghee/lib.py", line 102, in handle_event
    handler(event_info, log_file=log_file)
  File "/home/bot/eessi-bot-software-layer/eessi_bot_event_handler.py", line 222, in handle_issue_comment_event
    update = self.handle_bot_command(event_info, cmd)
  File "/home/bot/eessi-bot-software-layer/eessi_bot_event_handler.py", line 399, in handle_bot_command
    return handler(event_info, bot_command)
  File "/home/bot/eessi-bot-software-layer/eessi_bot_event_handler.py", line 497, in handle_bot_command_status
    status_table = request_bot_build_issue_comments(repo_name, pr_number)
  File "/home/bot/eessi-bot-software-layer/tasks/build.py", line 829, in request_bot_build_issue_comments
    elif 'SUCCESS' in value['comment']:
TypeError: string indices must be integers

The log also contains the following which may not be related to the new command.

[20240208-T18:35:55] WARNING: Faulty signature in request header => 403
[20240208-T18:35:55] WARNING: A crash occurred!
Traceback (most recent call last):
  File "/home/bot/.local/lib/python3.6/site-packages/pyghee/lib.py", line 169, in process_event
    self.verify_request(event_info, abort_function, log_file=log_file)
  File "/home/bot/.local/lib/python3.6/site-packages/pyghee/lib.py", line 150, in verify_request
    abort_function(403)
  File "/home/bot/.local/lib/python3.6/site-packages/werkzeug/exceptions.py", line 941, in abort
    _aborter(status, *args, **kwargs)
  File "/home/bot/.local/lib/python3.6/site-packages/werkzeug/exceptions.py", line 924, in __call__
    raise self.mapping[code](*args, **kwargs)
werkzeug.exceptions.Forbidden: 403 Forbidden: You don't have the permission to access the requested resource. It is either read-protected or not readable by the server.
@trz42
Copy link
Contributor Author

trz42 commented Feb 8, 2024

Another error happened when trying the command in another PR (EESSI/software-layer#445 (comment)):

[20240208-T18:46:49] get_architecture_targets(): arch target map '{"linux/x86_64/generic": "--partition x86-64-generic-node", "linux/x86_64/intel/haswell": "--partition x86-64-intel-haswell-node", "linux/x86_64/intel/skylake_avx512": "--partition x86-64-intel-skylake-node", "linux/x86_64/amd/zen2": "--partition x86-64-amd-zen2-node", "linux/x86_64/amd/zen3": "--partition x86-64-amd-zen3-node", "linux/aarch64/generic": "--partition aarch64-generic-node", "linux/aarch64/neoverse_n1": "--partition aarch64-neoverse-n1-node", "linux/aarch64/neoverse_v1": "--partition aarch64-neoverse-v1-node"}'
[20240208-T18:46:49] Unexpected err=list index out of range, type(err)=<class 'IndexError'>
[20240208-T18:46:49] WARNING: A crash occurred!
Traceback (most recent call last):
  File "/home/bot/.local/lib/python3.6/site-packages/pyghee/lib.py", line 170, in process_event
    self.handle_event(event_info, log_file=log_file)
  File "/home/bot/.local/lib/python3.6/site-packages/pyghee/lib.py", line 102, in handle_event
    handler(event_info, log_file=log_file)
  File "/home/bot/eessi-bot-software-layer/eessi_bot_event_handler.py", line 222, in handle_issue_comment_event
    update = self.handle_bot_command(event_info, cmd)
  File "/home/bot/eessi-bot-software-layer/eessi_bot_event_handler.py", line 399, in handle_bot_command
    return handler(event_info, bot_command)
  File "/home/bot/eessi-bot-software-layer/eessi_bot_event_handler.py", line 504, in handle_bot_command_status
    comment_status += f"\n|{status_table['arch'][x]}|"
IndexError: list index out of range

@laraPPr
Copy link
Collaborator

laraPPr commented Feb 13, 2024

found the reason for the first error in the pyghee log. I thought I checked that my test branch and the branch were the same but overlooked something. Also found something else so good that I found it.

@laraPPr
Copy link
Collaborator

laraPPr commented Feb 13, 2024

PR for the first reported error out of the pyghee log and might also fix the third, not sure.

@laraPPr
Copy link
Collaborator

laraPPr commented Feb 13, 2024

Yes this will fix the first and the third reported error in pyghee log

@trz42
Copy link
Contributor Author

trz42 commented Feb 24, 2024

fixed with #251

@trz42 trz42 closed this as completed Feb 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants