FIX: Check configuration does not warn when file can not be found in repository
Opis
Jeśli plik określony przez parametr path nie może zostać odnaleziony to check-configuration powinno się wywalić. tak się jednak nie dzieje
logi
2021-09-03 06:18:48,150 [INFO]: Checking if project "apl/meet" needs update
2021-09-03 06:18:53,386 [INFO]: Update available for package "citask/monitoring/roles/kapacitor": 2.4.0 → 2.4.1
2021-09-03 06:18:53,387 [INFO]: Update available for package "ansible-roles/python": 1.3.2 → 2.0.1
2021-09-03 06:18:53,946 [INFO]: Update available for package "python2/ansible": 2.9.15 → 2.9.25
2021-09-03 06:18:54,525 [INFO]: Update available for package "python2/hvac": 0.10.5 → 0.11.0
2021-09-03 06:18:55,082 [INFO]: Update available for package "python2/openstacksdk": 0.45.0 → 0.59.0
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/gitlab/exceptions.py", line 279, in wrapped_f
return f(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/gitlab/mixins.py", line 50, in get
server_data = self.gitlab.http_get(path, **kwargs)
File "/usr/local/lib/python3.9/site-packages/gitlab/__init__.py", line 594, in http_get
result = self.http_request(
File "/usr/local/lib/python3.9/site-packages/gitlab/__init__.py", line 567, in http_request
raise GitlabHttpError(
gitlab.exceptions.GitlabHttpError: 404: 404 File Not Found
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/bin/autoupdater", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.9/site-packages/autoupdater/commander.py", line 22, in main
autoupdater.projects.update.check_projects(
File "/usr/local/lib/python3.9/site-packages/autoupdater/projects/update.py", line 9, in check_projects
repository.check_projects(project_to_check, branch)
File "/usr/local/lib/python3.9/site-packages/autoupdater/gitlab/update.py", line 110, in check_projects
project.check(branch_name)
File "/usr/local/lib/python3.9/site-packages/autoupdater/gitlab/update.py", line 149, in check
for _ in self.__find_outdated_packages(branch_name):
File "/usr/local/lib/python3.9/site-packages/autoupdater/gitlab/update.py", line 178, in __find_outdated_packages
current_package_version = self.__find_current_package_version(configuration, branch_name)
File "/usr/local/lib/python3.9/site-packages/autoupdater/gitlab/update.py", line 153, in __find_current_package_version
file_content = self.__get_project_file(package_configuration.repository_file.path, branch_name)
File "/usr/local/lib/python3.9/site-packages/autoupdater/gitlab/update.py", line 343, in __get_project_file
return self.__project.files.get(path, branch_name).decode().decode('utf-8')
File "/usr/local/lib/python3.9/site-packages/gitlab/cli.py", line 42, in wrapped_f
return f(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/gitlab/v4/objects/__init__.py", line 3718, in get
return GetMixin.get(self, file_path, ref=ref, **kwargs)
File "/usr/local/lib/python3.9/site-packages/gitlab/exceptions.py", line 281, in wrapped_f
raise error(e.error_message, e.response_code, e.response_body) from e
gitlab.exceptions.GitlabGetError: 404: 404 File Not Found