-
Notifications
You must be signed in to change notification settings - Fork 20
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
Remove checks for git and local path from pipfile #1140
Remove checks for git and local path from pipfile #1140
Conversation
To give some context. @shreekarSS and I talked a bit about this and realized that the result from the function raising the issues in git repositories wasn't being used. This was the only reference to the code in the repo, so we decided it could be removed. The return statement to the get direct dependency version so that when old dependencies and new dependencies are calculated they don't throw error and instead report no differences in reported version. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this!
I believe there are a couple of additional code snippets that should be cleaned up as part of this change
|
||
for package_name, package_info in pipfile_lock_content["default"].items(): | ||
if "git" in package_info: | ||
self._create_unsupported_package_issue(package_name, "git") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the definition of this method should also be removed with the proposed change, as it is only used within the removed code
kebechet/kebechet/managers/update/update.py
Lines 294 to 327 in a7c2f9d
def _create_unsupported_package_issue(self, package_name, pkg_location): | |
"""Create an issue as Kebechet doesn't support packages with git as source.""" | |
_LOGGER.info("Key Error encountered, due package source being git.") | |
relative_dir = self._get_cwd_relative2gitroot() | |
pip_url = construct_raw_file_url( | |
self.service_url, | |
self.slug, | |
os.path.join(relative_dir, "Pipfile"), | |
self.service_type, | |
) | |
piplock_url = construct_raw_file_url( | |
self.service_url, | |
self.slug, | |
os.path.join(relative_dir, "Pipfile.lock"), | |
self.service_type, | |
) | |
issue = self.get_issue_by_title( | |
_ISSUE_UNSUPPORTED_PACKAGE.format(env_name=self.runtime_environment) | |
) | |
if issue is None: | |
self.project.create_issue( | |
title=_ISSUE_UNSUPPORTED_PACKAGE.format( | |
env_name=self.runtime_environment | |
), | |
body=ISSUE_UNSUPPORTED_PACKAGE.format( | |
sha=self.sha, | |
package=package_name, | |
pkg_location=pkg_location, | |
pip_url=pip_url, | |
piplock_url=piplock_url, | |
environment_details=self.get_environment_details(), | |
), | |
) | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ack, thanks
# Close git as a source issues. | ||
|
||
issue = self.get_issue_by_title( | ||
_ISSUE_UNSUPPORTED_PACKAGE.format(env_name=self.runtime_environment) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The definition of that message should also be removed if it is not used anymore
kebechet/kebechet/managers/update/update.py
Lines 77 to 80 in a7c2f9d
_ISSUE_UNSUPPORTED_PACKAGE = ( | |
"Application cannot be managed by Kebechet due to it containing an unsupported package " | |
"location in {env_name} environment." | |
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ack, thanks
15d0a69
to
1499442
Compare
1499442
to
3e5a0f7
Compare
Signed-off-by: Shreekara <[email protected]>
3e5a0f7
to
7211c21
Compare
/lgtm Thanks! |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: codificat The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: Shreekara [email protected]
Related Issues and Dependencies
Fixes: #1125
…