Skip to content

refactor: Simplify v2 recommender#265

Merged
arajkumar merged 15 commits into
fabric8-analytics:masterfrom
arajkumar:recommender-refactoring
Jan 7, 2021
Merged

refactor: Simplify v2 recommender#265
arajkumar merged 15 commits into
fabric8-analytics:masterfrom
arajkumar:recommender-refactoring

Conversation

@arajkumar
Copy link
Copy Markdown
Contributor

@arajkumar arajkumar commented Dec 31, 2020

This PR simplifies the v2 recommender implementation. Here is a flow,

  1. Call respective insight service
  2. Get details(github, latest_version,..) for the recommended packages(step-1) from graph
  3. Prepare response (version selection is based on latest_non_cve_version from Package node)

Note: Package will be dropped off from the recommendation incase if latest_non_cve_version is empty

Fixes https://issues.redhat.com/browse/APPAI-1694

@codecov-io
Copy link
Copy Markdown

codecov-io commented Dec 31, 2020

Codecov Report

Merging #265 (723841e) into master (1367cf9) will increase coverage by 3.12%.
The diff coverage is 95.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #265      +/-   ##
==========================================
+ Coverage   90.67%   93.80%   +3.12%     
==========================================
  Files          11        8       -3     
  Lines        1716      936     -780     
==========================================
- Hits         1556      878     -678     
+ Misses        160       58     -102     
Impacted Files Coverage Δ
src/rest_api.py 88.46% <75.86%> (+2.14%) ⬆️
src/settings.py 100.00% <100.00%> (ø)
src/utils.py 86.89% <100.00%> (ø)
src/v2/models.py 100.00% <100.00%> (ø)
src/v2/recommender.py 100.00% <100.00%> (+10.45%) ⬆️
src/v2/stack_aggregator.py 92.37% <100.00%> (+1.27%) ⬆️
src/recommender.py
src/stack_aggregator.py
src/__init__.py
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1367cf9...723841e. Read the comment docs.

@arajkumar
Copy link
Copy Markdown
Contributor Author

/build-image

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jan 5, 2021

🧪 CI has Started Image Build

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jan 5, 2021

✌️ Image Build Successfull @arajkumar, Avaliable at: ghcr.io/fabric8-analytics/f8a-server-backbone/fabric8-analytics-f8a-server-backbone:SNAPSHOT-PR-265

@arajkumar
Copy link
Copy Markdown
Contributor Author

/build-image

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jan 6, 2021

🧪 CI has Started Image Build

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jan 6, 2021

✌️ Image Build Successfull @arajkumar, Avaliable at: ghcr.io/fabric8-analytics/f8a-server-backbone/fabric8-analytics-f8a-server-backbone:SNAPSHOT-PR-265

@arajkumar arajkumar marked this pull request as ready for review January 6, 2021 08:18
@arajkumar arajkumar self-assigned this Jan 6, 2021
@arajkumar arajkumar requested review from dgpatelgit and prashbnair and removed request for prashbnair January 6, 2021 08:21
Comment thread scripts/entrypoint.sh
Comment thread src/rest_api.py
Comment thread src/v2/models.py
Comment thread src/v2/recommender.py
Comment thread src/v2/stack_aggregator.py
Comment thread src/v2/recommender.py
Copy link
Copy Markdown

@prashbnair prashbnair left a comment

Choose a reason for hiding this comment

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

Looks good, just a few minor issues.

Comment thread src/rest_api.py
Comment thread src/v2/recommender.py Outdated
Comment thread src/v2/recommender.py Outdated
Comment thread src/v2/recommender.py
Comment thread src/v2/models.py
Copy link
Copy Markdown
Contributor

@dgpatelgit dgpatelgit left a comment

Choose a reason for hiding this comment

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

lgtm

@arajkumar
Copy link
Copy Markdown
Contributor Author

/build-image

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jan 7, 2021

🧪 CI has Started Image Build

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jan 7, 2021

✌️ Image Build Successfull @arajkumar, Avaliable at: ghcr.io/fabric8-analytics/f8a-server-backbone/fabric8-analytics-f8a-server-backbone:SNAPSHOT-PR-265

@arajkumar arajkumar force-pushed the recommender-refactoring branch from a9bac47 to db76d1f Compare January 7, 2021 09:55
@arajkumar
Copy link
Copy Markdown
Contributor Author

/build-image

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jan 7, 2021

🧪 CI has Started Image Build

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jan 7, 2021

✌️ Image Build Successfull @arajkumar, Avaliable at: ghcr.io/fabric8-analytics/f8a-server-backbone/fabric8-analytics-f8a-server-backbone:SNAPSHOT-PR-265

@arajkumar arajkumar merged commit 8991da0 into fabric8-analytics:master Jan 7, 2021
arajkumar added a commit that referenced this pull request Jan 7, 2021
This fixes the regression introduced by #265 by adding an empty entry for golang recommendation.
@codecov-commenter
Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 95.23810% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.80%. Comparing base (1367cf9) to head (db76d1f).
⚠️ Report is 32 commits behind head on master.

Files with missing lines Patch % Lines
src/rest_api.py 75.86% 7 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #265      +/-   ##
==========================================
+ Coverage   90.67%   93.80%   +3.12%     
==========================================
  Files          11        8       -3     
  Lines        1716      936     -780     
==========================================
- Hits         1556      878     -678     
+ Misses        160       58     -102     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

5 participants