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

fix: Filter components by id in addition to name #1013

Merged
merged 5 commits into from
Dec 3, 2024
Merged

Conversation

suejung-sentry
Copy link
Contributor

@suejung-sentry suejung-sentry commented Dec 3, 2024

Customer reported a bug in the Components feature here. It appears to happen when component name is omitted from the codecov.yml.
Per our docs, this field is optional:

component_management:
  individual_components:
    - component_id: module_emotions  # this is an identifier that should not be changed
      name: emotions  # this is a display name, and can be changed freely

Adjust in this PR to allow id to be used in the match filters alongside name. Reviewed our current usage of the existing filter_by_component_name helper - they are all used to support various view operations in the internal api and graphql api to be displayed at Codecov UI gazebo. So changing which components are returned by the filter just affects what is displayed on Components related pages on the UI.

Also spun off this ticket - as extra cleanup, we can also later update the frontend to pass to the api the ids instead of the names, and then we can pare down this helper to just look at ids. We need this api change to go in first in either case to provide the new functionality (filter by id).

Closes codecov/engineering-team#2849
If works as expected, it will also close codecov/feedback#557

Copy link

sentry-io bot commented Dec 3, 2024

🔍 Existing Issues For Review

Your pull request is modifying functions with the following pre-existing issues:

📄 File: graphql_api/types/commit/commit.py

Function Unhandled Issue
resolve_coverage_file GraphQLError: 'NoneType' object has no attribute 'filter' /graphql/...
Event Count: 22

Did you find this useful? React with a 👍 or 👎

@codecov-notifications
Copy link

codecov-notifications bot commented Dec 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

Copy link

codecov bot commented Dec 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.00%. Comparing base (1d7539e) to head (7ef477d).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1013   +/-   ##
=======================================
  Coverage   96.00%   96.00%           
=======================================
  Files         828      828           
  Lines       19353    19356    +3     
=======================================
+ Hits        18579    18582    +3     
  Misses        774      774           
Flag Coverage Δ
unit 92.25% <100.00%> (ø)
unit-latest-uploader 92.25% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Copy link
Contributor

github-actions bot commented Dec 3, 2024

✅ All tests successful. No failed tests were found.

📣 Thoughts on this report? Let Codecov know! | Powered by Codecov

@suejung-sentry suejung-sentry marked this pull request as ready for review December 3, 2024 07:07
@suejung-sentry suejung-sentry requested a review from a team as a code owner December 3, 2024 07:07
@codecov codecov deleted a comment from codecov-public-qa bot Dec 3, 2024
@codecov codecov deleted a comment from codecov-qa bot Dec 3, 2024
@suejung-sentry suejung-sentry added this pull request to the merge queue Dec 3, 2024
Merged via the queue into main with commit 5f24cb4 Dec 3, 2024
30 of 32 checks passed
@suejung-sentry suejung-sentry deleted the sshin/2849 branch December 3, 2024 23:34
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.

Add logging to component filtering errors Cannot filter files by component
2 participants