8000 Certifier OSV: fixed emit func when polling by mrizzi · Pull Request #1396 · guacsec/guac · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Certifier OSV: fixed emit func when polling #1396

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

Merged
merged 7 commits into from
Oct 13, 2023

Conversation

mrizzi
Copy link
Collaborator
@mrizzi mrizzi commented Oct 12, 2023

Description of the PR

Fixes #1387

New Goroutine to "flush" the documents collected in the totalDocs based upon one condition being true:

  • a 30 seconds ticker
  • 1000 documents appended to totalDocs

This also fixes the other bug, i.e. not exiting with CTRL-C

PR Checklist

  • All commits have a Developer Certificate of Origin (DCO) -- they are generated using -s flag to git commit.
  • All new changes are covered by tests
  • If GraphQL schema is changed, make generate has been run
  • If collectsub protobuf has been changed, make proto has been run
  • All CI checks are passing (tests and formatting)
  • All dependent PRs have already been merged

Signed-off-by: mrizzi <mrizzi@redhat.com>
@mrizzi mrizzi requested a review from jeffmendoza as a code owner October 12, 2023 15:39
@mrizzi mrizzi requested a review from pxp928 October 12, 2023 15:39
Signed-off-by: mrizzi <mrizzi@redhat.com>
8000
@mrizzi mrizzi marked this pull request as draft October 13, 2023 08:02
Signed-off-by: mrizzi <mrizzi@redhat.com>
@mrizzi
Copy link
Collaborator Author
mrizzi commented Oct 13, 2023

2efd048 :

  • refactored totalDocs slice management that now happens only inside ingestion func
  • ingestionStop chan to properly stop ingestion func
  • removed last call to ingestor.MergedIngest(ctx, totalDocs, opts.graphqlEndpoint, csubClient) because now all the ingestor invocations happen only within the ingestion func
  • ingestion func deals with wg WaitGroup

@mrizzi mrizzi marked this pull request as ready for review October 13, 2023 12:43
pxp928
pxp928 previously approved these changes Oct 13, 2023
Signed-off-by: mrizzi <mrizzi@redhat.com>
Signed-off-by: mrizzi <mrizzi@redhat.com>
@pxp928 pxp928 dismissed their stale review October 13, 2023 15:00

changes

Signed-off-by: mrizzi <mrizzi@redhat.com>
Signed-off-by: mrizzi <mrizzi@redhat.com>
@kodiakhq kodiakhq bot merged commit 7c3b1b9 into guacsec:main Oct 13, 2023
@mrizzi mrizzi deleted the 1387-certifier-osv-poll branch October 13, 2023 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bug] guacone certifier osv -p not working
4 participants
0