Skip to content
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

Merged
merged 1 commit into from
Sep 27, 2022

Conversation

shreekarSS
Copy link
Member

Signed-off-by: Shreekara sshreeka@redhat.com

Related Issues and Dependencies

Fixes: #1125

@sesheta sesheta added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 14, 2022
@sesheta sesheta added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Sep 14, 2022
@KPostOffice
Copy link
Member

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.

@shreekarSS shreekarSS changed the title [WIP] Remove checks for git and local path from pipfile Remove checks for git and local path from pipfile Sep 16, 2022
@sesheta sesheta removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 16, 2022
Copy link
Member

@codificat codificat left a 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")
Copy link
Member

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

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(),
),
)
)

Copy link
Member Author

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)
Copy link
Member

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

_ISSUE_UNSUPPORTED_PACKAGE = (
"Application cannot be managed by Kebechet due to it containing an unsupported package "
"location in {env_name} environment."
)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ack, thanks

@sesheta sesheta added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 21, 2022
Signed-off-by: Shreekara <sshreeka@redhat.com>
@sesheta sesheta added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 26, 2022
@codificat
Copy link
Member

/lgtm
/approve

Thanks!

@sesheta sesheta added the lgtm Indicates that a PR is ready to be merged. label Sep 27, 2022
@sesheta
Copy link
Member

sesheta commented Sep 27, 2022

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sesheta sesheta added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 27, 2022
@sesheta sesheta merged commit 6ef3a56 into thoth-station:master Sep 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[3pt] Allow local and git package refereces in update manager
4 participants