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

kebechet version release manager is failing #1107

Closed harshad16 closed 2 years ago

harshad16 commented 2 years ago

Bug description

Kebechet is unable to resolve the version update. The update manager goes over a list of files to find the version and update it. The version manager should find these files in the repo it working on. however, it feels like the version manager checks on the entire container image.

https://github.com/thoth-station/adviser/issues/2370#issuecomment-1201852695

Details:

File path: ./.venv/lib/python3.8/site-packages/pkg_resources/_vendor/packaging/__about__.py
Line number: 20
Old version: 21.3
Issue: Wrong version specifier found in sources: 21.3``

Steps to Reproduce

Steps to reproduce the behavior:

  1. Run kebechet version update on adviser repo.
  2. See error

Actual behavior

the version manager checks for version file in entire container image.

Expected behavior

version manager should only check repo directory for version file.

Environment information

Kebechet version: 1.10.2 Python version: 3.8.12 Platform: Linux-4.18.0-305.19.1.el8_4.x86_64-x86_64-with-glibc2.2.5 pipenv version: pipenv, version 2020.11.15

Additional context

My suggestion to solve this issue would be to check if this function is being executed on the cloned repo.

harshad16 commented 2 years ago

Related-to: https://github.com/thoth-station/adviser/issues/2371 https://github.com/thoth-station/kebechet/issues/1079

harshad16 commented 2 years ago

Related-to: https://github.com/thoth-station/workflow-helpers/issues/408#issuecomment-1203151660

KPostOffice commented 2 years ago

It is being called in the cloned repo. It might be best to just ignore files and directories that start with a "."

KPostOffice commented 2 years ago

Though the venv shouldn't be in the repository

KPostOffice commented 2 years ago

I think the issue lies in cwd it is failing silently and cloning directly into the root of the repo

KPostOffice commented 2 years ago

Issue ended up being the venv was being created inside the repo directory from https://github.com/thoth-station/kebechet/blob/86e803e3816213b31d454230bd64ebad466c931f/kebechet/managers/update/update.py#L802

To fix I have decided to ignore hidden files and directories during the walk