thoth-station / kebechet

I'm Kebechet bot, goddess of freshness - I will keep your source code fresh and up-to-date
24 stars 20 forks source link

[1pt] kebechet fail close the dependency update issue if there is no changes needed #1145

Closed harshad16 closed 1 year ago

harshad16 commented 2 years ago

Bug description

If all the dependencies are up-to-date in a repo, and developer triggers kebechet-update. the service would fail to close the issue with relevant comment. Due to following issue:

kebechet:219: An error occurred during run of manager {'configuration': {'labels': ['bot']}} <class 'kebechet.managers.update.update.UpdateManager'> for 'thoth-station/graph-backup-job', skipping
Traceback (most recent call last):
  File "/home/user/kebechet/kebechet_runners.py", line 217, in run
    instance.run(**manager_configuration)
  File "/home/user/kebechet/managers/update/update.py", line 930, in run
    pr=self._pr_list[0],
IndexError: list index out of range

Steps to Reproduce

Steps to reproduce the behavior:

  1. Go to any repo with up-to-date dependencies
  2. Click on issue and create kebechet update request.
  3. wait for the process no action would be done.

Actual behavior

no action on the issue.

Expected behavior

closes issue with previous pr that was from kebechet

Environment information

Kebechet: v1.10.5

Additional context

Happened on: https://github.com/thoth-station/package-releases-job/issues/661 https://github.com/thoth-station/cve-update-job/issues/485 https://github.com/thoth-station/adviser/issues/2385 https://github.com/thoth-station/graph-backup-job/issues/245

each of there logs are included in them.

KPostOffice commented 2 years ago

Need to add a check at update.py L925 checking if the PR list is empty. If it is close the issue with a comment indicating that no updates are necessary.

codificat commented 1 year ago

/assign @KPostOffice