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

Add diff ingester, increase test coverage #5168

Merged
merged 3 commits into from
Dec 10, 2024
Merged

Conversation

evankanderson
Copy link
Member

Summary

Adds support for using the deps ingest in the pull_request context.

Also adds some more test coverage for the deps module. I tested a bunch of the underlying logic around cloning and around diffing lists of Nodes, but I only got coverage up to 65%. Notable omissions:

  • I didn't test many of the hash mismatch with same name + version cases. (I did test one!) We're not currently getting the hashes from the dependency extractor, so this is sort of defensive coding that is also an enormous pain for an uncommon code path. Should I remove the hash comparison code altogether?
  • I didn't test for errors in the setup or cloning operations, which generally result in returning errors from the ingestion.
  • I didn't actually test the checkpoint values. Sorry!

Note that I also did not add documentation for this ingestion method.

Fixes #5167

Change Type

Mark the type of change your PR introduces:

  • Bug fix (resolves an issue without affecting existing features)
  • Feature (adds new functionality without breaking changes)
  • Breaking change (may impact existing functionalities or require documentation updates)
  • Documentation (updates or additions to documentation)
  • Refactoring or test improvements (no bug fixes or new functionality)

Testing

Added unit testing for the ingestion.

Review Checklist:

  • Reviewed my own code for quality and clarity.
  • Added comments to complex or tricky code sections.
  • Updated any affected documentation.
  • Included tests that validate the fix or feature.
  • Checked that related changes are merged.

@evankanderson evankanderson requested a review from a team as a code owner December 9, 2024 21:03
@JAORMX JAORMX merged commit 4e29d37 into mindersec:main Dec 10, 2024
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow the deps ingester to work on PRs
2 participants