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

feat: resolveAndTestFacts with async polling #2025

Closed
wants to merge 1 commit into from

Conversation

anthogez
Copy link
Member

@anthogez anthogez commented Jun 15, 2021

Introduces async request for C/C++ with polling, where its Facts are resolved/computed in our platform

plugin,
scanResultsByPath,
);
}
Copy link
Member Author

Choose a reason for hiding this comment

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

At the current stage I preferred to keep this logic as part of testDependencies instead of create a completely new flow for resolveAndTestFacts, have time to change it when required

options,
2000,
);
results.push(response);
Copy link
Member Author

Choose a reason for hiding this comment

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

Keeping the current approach where we test/resolve one scanResult at the time.

Depending of resolution AVG time for C/C++ unmanaged, we can change it to something like:

  • Please generate a token (resolution process) for all the scanResults (if they are resolvable kind)
    then go over that list and keep polling each token in order to see if any is available, if yes then take out of the list till all the scanResults' token are processed either successfully or not

@anthogez anthogez force-pushed the feat/support-polling-unmanaged-ecosystem branch 4 times, most recently from e8e6092 to 9288497 Compare June 15, 2021 11:46

expect(testResults).toEqual([
{
components: [
Copy link
Member Author

Choose a reason for hiding this comment

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

this will change to depGraph & issuesData

@anthogez anthogez force-pushed the feat/support-polling-unmanaged-ecosystem branch from 9288497 to abe74f5 Compare June 15, 2021 11:49
attemptsCount,
),
);
}),
Copy link
Member

Choose a reason for hiding this comment

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

Are you missing the second argument to setTimeout here?

Copy link
Member Author

Choose a reason for hiding this comment

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

🤦 yes, thanks!

name: 'my-unmanaged-c-project',
facts: [
{
type: 'signatures',
Copy link
Member

Choose a reason for hiding this comment

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

We called this 'cpp-signatures' in feat/support-c-addon here.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point, we are moving to fileSignatures

@anthogez anthogez force-pushed the feat/support-polling-unmanaged-ecosystem branch 3 times, most recently from e645519 to 653448e Compare June 15, 2021 15:08
@anthogez anthogez self-assigned this Jun 15, 2021
@anthogez anthogez force-pushed the feat/support-polling-unmanaged-ecosystem branch 4 times, most recently from bf81d23 to 99894bc Compare June 20, 2021 17:17
@anthogez anthogez force-pushed the feat/support-polling-unmanaged-ecosystem branch 4 times, most recently from 08df3a6 to 4fd0858 Compare July 7, 2021 08:07
Introduces async request for C/C++ with polling, where its Facts are resolved/computed in our platform
@anthogez anthogez force-pushed the feat/support-polling-unmanaged-ecosystem branch from 4fd0858 to 9ed6542 Compare July 13, 2021 13:48
@github-actions
Copy link
Contributor

Expected release notes (by @anthogez)

features:
resolveAndTestFacts w/ async polling(c/c++) (9ed6542)

  • I hereby acknowledge these release notes are 🥙 AWESOME 🥙

anthogez added a commit that referenced this pull request Jul 15, 2021
Initial support for async test of unmanaged ecosystems e.g. c/c++
adding polling to resolve and test fileSignatures fact.

The pr that will introduce the active usage of it will come later on.

These changes comes from #2025

Using chore as prefix, because at the moment it's not bringing any
effective feat yet.
anthogez added a commit that referenced this pull request Jul 16, 2021
Initial support for async test of unmanaged ecosystems e.g. c/c++
adding polling to resolve and test fileSignatures fact.

The pr that will introduce the active usage of it will come later on.

These changes comes from #2025

Using chore as prefix, because at the moment it's not bringing any
effective feat yet.
@anthogez anthogez closed this Feb 9, 2022
@darscan darscan deleted the feat/support-polling-unmanaged-ecosystem branch January 20, 2023 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants