-
Notifications
You must be signed in to change notification settings - Fork 13
[IDE-1514] delta issue counts incorrect #1083
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
[IDE-1514] delta issue counts incorrect #1083
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Summary of ChangesHello @andrewrobinsonhodges-snyk, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses critical inaccuracies in delta scan issue counts by ensuring that cached scan results are properly invalidated and that the 'isNew' status of issues is correctly determined. It also significantly improves the observability of the delta scanning process through comprehensive logging, enhancing the reliability and debuggability of the feature. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request effectively resolves two key issues concerning incorrect delta scan issue counts and enhances logging for improved future debugging. The first fix correctly invalidates issue caches upon changes to reference branches or folders. The second fix refines the logic for marking issues as new, ensuring that issues no longer present in the delta are appropriately updated. The introduction of more detailed and structured logging is a commendable improvement for observability. The added tests are thorough, particularly those for cache clearing and cross-directory diffing. I've identified a minor logging format issue in internal/vcs/checkout_handler.go and have provided suggestions for correction.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…m:snyk/snyk-ls into fix/IDE-1514_delta_issue_counts_incorrect
rrama
left a comment
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.
LGTM. I think I wrapped my head around "new", "base", "current", "delta", etc.
Description
This PR fixes two issues with the delta scan issue counts, and adds more robust logging so we can debug these issues more easily in the future.
Issue caches were not getting cleared when reference branches/folders were being set. As the cache was only populated after a scan completes, this meant that changing a base/reference branch/folder would potentially give different results depending on whether or not the new base/reference branch/folder had been scanned before.
When we enrich issues with isNew after a delta scan, we set isNew to true if they were in the diff, however we did not set isNew to false if they were not in the diff. Depending on the order of scans and base/reference branch changes, the same issue list could be diffed multiple times, giving different results as it would contain old state.
Checklist
make generate)make lint-fix)