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

Avoid unnecessary rescans #268

Merged
merged 16 commits into from
Apr 2, 2023

Conversation

EyalDelarea
Copy link
Contributor

@EyalDelarea EyalDelarea commented Mar 16, 2023

  • All tests passed. If this feature is not already covered by the tests, I added new tests.
  • This pull request is on the dev branch.
  • I used gofmt for formatting the code before submitting the pull request.

Problem Description:
When using cron job to monitor some VCS providers there are unnecessary rescans of the repo, as nothing has changed from the last scan.

Solution:
FrogBot will now mark that last commit build status as successful when scan has been completed.
when it will encounter this commit again it will not preform a rescan, unless certain amount of time has passed. currently set to 4 days as default.

@EyalDelarea EyalDelarea temporarily deployed to frogbot March 16, 2023 12:24 — with GitHub Actions Inactive
@EyalDelarea EyalDelarea requested a review from eyalbe4 March 16, 2023 12:24
@github-actions
Copy link
Contributor

What is Frogbot?

@eyalbe4 eyalbe4 added the new feature Automatically generated release notes label Mar 19, 2023
@EyalDelarea EyalDelarea added improvement Automatically generated release notes and removed new feature Automatically generated release notes labels Mar 19, 2023
@EyalDelarea EyalDelarea temporarily deployed to frogbot March 23, 2023 14:52 — with GitHub Actions Inactive
@github-actions
Copy link
Contributor

What is Frogbot?

@EyalDelarea EyalDelarea temporarily deployed to frogbot March 26, 2023 12:18 — with GitHub Actions Inactive
@github-actions
Copy link
Contributor

What is Frogbot?

commands/utils/consts.go Outdated Show resolved Hide resolved
commands/scanandfixrepos.go Outdated Show resolved Hide resolved
commands/scanandfixrepos.go Show resolved Hide resolved
commands/scanandfixrepos.go Outdated Show resolved Hide resolved
commands/scanandfixrepos.go Outdated Show resolved Hide resolved
@EyalDelarea EyalDelarea temporarily deployed to frogbot March 28, 2023 12:57 — with GitHub Actions Inactive
@github-actions
Copy link
Contributor

What is Frogbot?

@EyalDelarea
Copy link
Contributor Author

@eyalbe4 After our talk , the solution was quit simple.
I've added a new mock route for /code-scanning/sarifs which was missing and was not used by our tests.
Now we have mock commits returning ( not empty ) and mock for the new route.

The previously unused function in the tests is UploadScanToGitProvider , which btw supports only Github for now.

@EyalDelarea EyalDelarea requested a review from eyalbe4 March 28, 2023 13:05
@EyalDelarea EyalDelarea temporarily deployed to frogbot March 28, 2023 13:27 — with GitHub Actions Inactive
@github-actions
Copy link
Contributor

What is Frogbot?

commands/utils/consts.go Outdated Show resolved Hide resolved
commands/scanandfixrepos.go Outdated Show resolved Hide resolved
commands/scanandfixrepos.go Outdated Show resolved Hide resolved
commands/scanandfixrepos.go Outdated Show resolved Hide resolved
commands/scanandfixrepos.go Outdated Show resolved Hide resolved
commands/scanandfixrepos.go Outdated Show resolved Hide resolved
commands/scanandfixrepos.go Outdated Show resolved Hide resolved
commands/scanandfixrepos.go Outdated Show resolved Hide resolved
commands/scanandfixrepos.go Outdated Show resolved Hide resolved
commands/scanandfixrepos.go Outdated Show resolved Hide resolved
@EyalDelarea EyalDelarea temporarily deployed to frogbot March 29, 2023 07:04 — with GitHub Actions Inactive
@github-actions
Copy link
Contributor

What is Frogbot?

@EyalDelarea EyalDelarea temporarily deployed to frogbot March 29, 2023 07:08 — with GitHub Actions Inactive
@github-actions
Copy link
Contributor

What is Frogbot?

@EyalDelarea EyalDelarea requested a review from eyalbe4 March 29, 2023 07:10
commands/scanandfixrepos.go Outdated Show resolved Hide resolved
commands/scanandfixrepos.go Outdated Show resolved Hide resolved
commands/scanandfixrepos.go Outdated Show resolved Hide resolved
@EyalDelarea EyalDelarea temporarily deployed to frogbot April 1, 2023 13:02 — with GitHub Actions Inactive
@github-actions
Copy link
Contributor

github-actions bot commented Apr 1, 2023

What is Frogbot?

@EyalDelarea EyalDelarea temporarily deployed to frogbot April 1, 2023 13:41 — with GitHub Actions Inactive
@EyalDelarea EyalDelarea requested a review from eyalbe4 April 2, 2023 11:12
@github-actions
Copy link
Contributor

github-actions bot commented Apr 2, 2023

What is Frogbot?

@EyalDelarea EyalDelarea merged commit fb6a8c3 into jfrog:dev Apr 2, 2023
@EyalDelarea EyalDelarea deleted the Avoid_unnecessary_rescans branch April 4, 2023 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Automatically generated release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants