Skip to content

Starting a ci-test with "--branch" fails to generate slot configuration

Trying to trigger a ci-test with --branch from Gaudi (to bypass merge conflicts with the tag used in lhcb-master) resulted in a crash of the script in the Jenkins job "main".

The function LbNightlyTools.Scripts.EnabledSlots.make_mr_slots tried to create a (reference?) slot with lhcb/GaussinoExtLibs while it should have been Gaussino/GaussinoExtLibs.

See the stack trace:

2023-09-27 10:22:31,843:DEBUG   : getLastCommit invoked with (('lhcb/GaussinoExtLibs', '2023-09-20T17:55:49', 'master'), {})
2023-09-27 10:22:31,843:DEBUG   : result not in cache, invoking the function
2023-09-27 10:22:31,843:DEBUG   : _getGitlabProject invoked with (('lhcb/GaussinoExtLibs',), {})
2023-09-27 10:22:31,843:DEBUG   : result not in cache, invoking the function
2023-09-27 10:22:31,843:DEBUG   : _gitlabServer invoked with ((), {})
2023-09-27 10:22:31,843:DEBUG   : result in cache
2023-09-27 10:22:31,877:DEBUG   : https://gitlab.cern.ch:443 "GET /api/v4/projects/lhcb%2FGaussinoExtLibs HTTP/1.1" 404 35
Traceback (most recent call last):
  File "/cvmfs/lhcbdev.cern.ch/nightly-environments/5ced04d9e2e8ad4a44b36e93198a8c2f88c23ebb2313ab50b202d5e241e8cb8d/lib/python3.11/site-packages/LbNightlyTools/MergeRequestBuilds.py", line 154, in set_last_commits
    commit = commits[name]
             ~~~~~~~^^^^^^
KeyError: 'GaussinoExtLibs'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/cvmfs/lhcbdev.cern.ch/nightly-environments/5ced04d9e2e8ad4a44b36e93198a8c2f88c23ebb2313ab50b202d5e241e8cb8d/lib/python3.11/site-packages/gitlab/exceptions.py", line 336, in wrapped_f
    return f(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
  File "/cvmfs/lhcbdev.cern.ch/nightly-environments/5ced04d9e2e8ad4a44b36e93198a8c2f88c23ebb2313ab50b202d5e241e8cb8d/lib/python3.11/site-packages/gitlab/mixins.py", line 122, in get
    server_data = self.gitlab.http_get(path, **kwargs)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/cvmfs/lhcbdev.cern.ch/nightly-environments/5ced04d9e2e8ad4a44b36e93198a8c2f88c23ebb2313ab50b202d5e241e8cb8d/lib/python3.11/site-packages/gitlab/client.py", line 828, in http_get
    result = self.http_request(
             ^^^^^^^^^^^^^^^^^^
  File "/cvmfs/lhcbdev.cern.ch/nightly-environments/5ced04d9e2e8ad4a44b36e93198a8c2f88c23ebb2313ab50b202d5e241e8cb8d/lib/python3.11/site-packages/gitlab/client.py", line 794, in http_request
    raise gitlab.exceptions.GitlabHttpError(
gitlab.exceptions.GitlabHttpError: 404: 404 Project Not Found

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/cvmfs/lhcbdev.cern.ch/nightly-environments/5ced04d9e2e8ad4a44b36e93198a8c2f88c23ebb2313ab50b202d5e241e8cb8d/bin/lbn-enabled-slots", line 11, in <module>
    sys.exit(enabled_slots())
             ^^^^^^^^^^^^^^^
  File "/cvmfs/lhcbdev.cern.ch/nightly-environments/5ced04d9e2e8ad4a44b36e93198a8c2f88c23ebb2313ab50b202d5e241e8cb8d/lib/python3.11/site-packages/LbNightlyTools/Scripts/_entry_points.py", line 67, in enabled_slots
    return Script().run()
           ^^^^^^^^^^^^^^
  File "/cvmfs/lhcbdev.cern.ch/nightly-environments/5ced04d9e2e8ad4a44b36e93198a8c2f88c23ebb2313ab50b202d5e241e8cb8d/lib/python3.11/site-packages/LbNightlyTools/Scripts/Common.py", line 61, in run
    return _PlainScript.run(self, args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/cvmfs/lhcbdev.cern.ch/nightly-environments/5ced04d9e2e8ad4a44b36e93198a8c2f88c23ebb2313ab50b202d5e241e8cb8d/lib/python3.11/site-packages/LbCommon/Script.py", line 107, in run
    rc = self.main()
         ^^^^^^^^^^^
  File "/cvmfs/lhcbdev.cern.ch/nightly-environments/5ced04d9e2e8ad4a44b36e93198a8c2f88c23ebb2313ab50b202d5e241e8cb8d/lib/python3.11/site-packages/LbNightlyTools/Scripts/EnabledSlots.py", line 152, in main
    ref_slot, mr_slot = make_mr_slots(mr_slots_config, slots)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/cvmfs/lhcbdev.cern.ch/nightly-environments/5ced04d9e2e8ad4a44b36e93198a8c2f88c23ebb2313ab50b202d5e241e8cb8d/lib/python3.11/site-packages/LbNightlyTools/MergeRequestBuilds.py", line 382, in make_mr_slots
    ref_slot, test_slot = create_mr_slots(
                          ^^^^^^^^^^^^^^^^
  File "/cvmfs/lhcbdev.cern.ch/nightly-environments/5ced04d9e2e8ad4a44b36e93198a8c2f88c23ebb2313ab50b202d5e241e8cb8d/lib/python3.11/site-packages/LbNightlyTools/MergeRequestBuilds.py", line 318, in create_mr_slots
    set_last_commits(ref_slot, ref_date, ref_commits)
  File "/cvmfs/lhcbdev.cern.ch/nightly-environments/5ced04d9e2e8ad4a44b36e93198a8c2f88c23ebb2313ab50b202d5e241e8cb8d/lib/python3.11/site-packages/LbNightlyTools/MergeRequestBuilds.py", line 156, in set_last_commits
    commit = getLastCommit(full_name(p), ref_date, p.version)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/cvmfs/lhcbdev.cern.ch/nightly-environments/5ced04d9e2e8ad4a44b36e93198a8c2f88c23ebb2313ab50b202d5e241e8cb8d/lib/python3.11/site-packages/LbNightlyTools/GitlabUtils.py", line 45, in wrapper
    result = _cache[key] = f(*args, **kwargs)
                           ^^^^^^^^^^^^^^^^^^
  File "/cvmfs/lhcbdev.cern.ch/nightly-environments/5ced04d9e2e8ad4a44b36e93198a8c2f88c23ebb2313ab50b202d5e241e8cb8d/lib/python3.11/site-packages/LbNightlyTools/MergeRequestBuilds.py", line 135, in getLastCommit
    project = _getGitlabProject(project)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/cvmfs/lhcbdev.cern.ch/nightly-environments/5ced04d9e2e8ad4a44b36e93198a8c2f88c23ebb2313ab50b202d5e241e8cb8d/lib/python3.11/site-packages/LbNightlyTools/GitlabUtils.py", line 45, in wrapper
    result = _cache[key] = f(*args, **kwargs)
                           ^^^^^^^^^^^^^^^^^^
  File "/cvmfs/lhcbdev.cern.ch/nightly-environments/5ced04d9e2e8ad4a44b36e93198a8c2f88c23ebb2313ab50b202d5e241e8cb8d/lib/python3.11/site-packages/LbNightlyTools/GitlabUtils.py", line 62, in _getGitlabProject
    return _gitlabServer().projects.get(project_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/cvmfs/lhcbdev.cern.ch/nightly-environments/5ced04d9e2e8ad4a44b36e93198a8c2f88c23ebb2313ab50b202d5e241e8cb8d/lib/python3.11/site-packages/gitlab/v4/objects/projects.py", line 860, in get
    return cast(Project, super().get(id=id, lazy=lazy, **kwargs))
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/cvmfs/lhcbdev.cern.ch/nightly-environments/5ced04d9e2e8ad4a44b36e93198a8c2f88c23ebb2313ab50b202d5e241e8cb8d/lib/python3.11/site-packages/gitlab/exceptions.py", line 338, in wrapped_f
    raise error(e.error_message, e.response_code, e.response_body) from e
gitlab.exceptions.GitlabGetError: 404: 404 Project Not Found
Build step 'Execute shell' marked build as failure
Sending e-mails to: lhcb-core-soft-alarms@cern.ch
Finished: FAILURE