Skip to content

trigger: Fix crash on unreachable tree #1280

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nuclearcat
Copy link
Member

Fix crash:
fatal: unable to access 'https://gitlab.collabora.com/google/chromeos-kernel.git/': Failed to connect to gitlab.collabora.com port 443 after 15693 ms: Couldn't connect to server 08/14/2025 04:36:07 AM UTC [ERROR] Failed to get branch head for collabora-chromeos-kernel_for-kernelci, ignoring 08/14/2025 04:36:07 AM UTC [ERROR] Traceback (most recent call last):
File "/home/kernelci/pipeline/./src/trigger.py", line 57, in _run_trigger
head_commit = kernelci.build.get_branch_head(current_config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/kernelci/build.py", line 81, in get_branch_head
head = shell_cmd(cmd)
^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/kernelci/init.py", line 29, in shell_cmd
return subprocess.check_output(cmd, shell=True).decode()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/subprocess.py", line 466, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/subprocess.py", line 571, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'git ls-remote https://gitlab.collabora.com/google/chromeos-kernel.git refs/heads/for-kernelci' returned non-zero exit status 128.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/kernelci/pipeline/src/base.py", line 70, in run
status = self._run(context)
^^^^^^^^^^^^^^^^^^
File "/home/kernelci/pipeline/./src/trigger.py", line 165, in _run
self._iterate_trees(force, timeout, trees)
File "/home/kernelci/pipeline/./src/trigger.py", line 142, in _iterate_trees
self._run_trigger(config, force, timeout, trees)
File "/home/kernelci/pipeline/./src/trigger.py", line 63, in _run_trigger
self.traceback(ex)
^^^^^^^^^^^^^^
AttributeError: 'Trigger' object has no attribute 'traceback'

Fix crash:
fatal: unable to access 'https://gitlab.collabora.com/google/chromeos-kernel.git/': Failed to connect to gitlab.collabora.com port 443 after 15693 ms: Couldn't connect to server
08/14/2025 04:36:07 AM UTC [ERROR] Failed to get branch head for collabora-chromeos-kernel_for-kernelci, ignoring
08/14/2025 04:36:07 AM UTC [ERROR] Traceback (most recent call last):
  File "/home/kernelci/pipeline/./src/trigger.py", line 57, in _run_trigger
    head_commit = kernelci.build.get_branch_head(current_config)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/kernelci/build.py", line 81, in get_branch_head
    head = shell_cmd(cmd)
           ^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/kernelci/__init__.py", line 29, in shell_cmd
    return subprocess.check_output(cmd, shell=True).decode()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/subprocess.py", line 466, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'git ls-remote https://gitlab.collabora.com/google/chromeos-kernel.git refs/heads/for-kernelci' returned non-zero exit status 128.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kernelci/pipeline/src/base.py", line 70, in run
    status = self._run(context)
             ^^^^^^^^^^^^^^^^^^
  File "/home/kernelci/pipeline/./src/trigger.py", line 165, in _run
    self._iterate_trees(force, timeout, trees)
  File "/home/kernelci/pipeline/./src/trigger.py", line 142, in _iterate_trees
    self._run_trigger(config, force, timeout, trees)
  File "/home/kernelci/pipeline/./src/trigger.py", line 63, in _run_trigger
    self.traceback(ex)
    ^^^^^^^^^^^^^^
AttributeError: 'Trigger' object has no attribute 'traceback'

Signed-off-by: Denys Fedoryshchenko <[email protected]>
@nuclearcat nuclearcat marked this pull request as ready for review August 14, 2025 19:47
@nuclearcat nuclearcat requested a review from JenySadadia August 14, 2025 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant