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

Fixes pip-compile file matcher for metric collection #11174

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sachin-sandhu
Copy link
Contributor

@sachin-sandhu sachin-sandhu commented Dec 23, 2024

What are you trying to accomplish?

Fixed issue where we were not able to capture pip-compile package manager in metric collection.

Anything you want to highlight for special attention from reviewers?

How will you know you've accomplished your goal?

Checklist

  • I have run the complete test suite to ensure all tests and linters pass.
  • I have thoroughly tested my code changes to ensure they work as expected, including adding additional tests for new functionality.
  • I have written clear and descriptive commit messages.
  • I have provided a detailed description of the changes in the pull request, including the problem it addresses, how it fixes the problem, and any relevant details about the implementation.
  • I have ensured that the code is well-documented and easy to understand.

@sachin-sandhu sachin-sandhu self-assigned this Dec 23, 2024
@sachin-sandhu sachin-sandhu marked this pull request as ready for review December 23, 2024 10:06
@sachin-sandhu sachin-sandhu requested a review from a team as a code owner December 23, 2024 10:06
Copy link
Contributor

@amazimbe amazimbe left a comment

Choose a reason for hiding this comment

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

Do we need an additional test?

@@ -337,7 +337,7 @@ def check_requirements(requirements)
end

def pipcompile_in_file
requirement_files.any? { |f| f.end_with?(".in") }
requirement_files.any? { |f| f.name.end_with?(PipCompilePackageManager::MANIFEST_FILENAME) }
Copy link
Member

Choose a reason for hiding this comment

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

can we have a unit test covering this?

@sachin-sandhu sachin-sandhu force-pushed the ssandhu-fixes-pip-compile-detect branch from fa441a0 to 5e9bcf7 Compare December 23, 2024 15:49
@sachin-sandhu sachin-sandhu force-pushed the ssandhu-fixes-pip-compile-detect branch from 5e9bcf7 to ec8b302 Compare December 23, 2024 16:08
@@ -881,6 +881,18 @@
)
end
end

it "returns the correct ecosystem and package manager set" do
parser.parse do |parser|
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think you need parser.parse at all. It can just be parser.ecosystem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants