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

Create TestFlagBridge during test results processing #740

Merged
merged 5 commits into from
Sep 25, 2024

Conversation

joseph-sentry
Copy link
Contributor

@joseph-sentry joseph-sentry commented Sep 25, 2024

we want to connect test objects to the RepositoryFlag objects

we want to filter tests in the UI by flag, so we need a mapping from
a Test and it's flags, because a Test is differentiated by its flags
as well as the obvious fields (name, testsuite)

when we process test results, we want to create a TestFlagBridge for
every test and flag of that test
@joseph-sentry joseph-sentry changed the title Create TestFlagridge Create TestFlagBridge during test results processing Sep 25, 2024
@joseph-sentry joseph-sentry requested a review from a team September 25, 2024 15:22
Copy link

codecov bot commented Sep 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.06%. Comparing base (a2d2110) to head (b94e31d).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #740   +/-   ##
=======================================
  Coverage   98.06%   98.06%           
=======================================
  Files         432      432           
  Lines       36273    36304   +31     
=======================================
+ Hits        35570    35601   +31     
  Misses        703      703           
Flag Coverage Δ
integration 98.06% <100.00%> (+<0.01%) ⬆️
unit 98.06% <100.00%> (+<0.01%) ⬆️

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

Components Coverage Δ
NonTestCode 95.97% <100.00%> (+<0.01%) ⬆️
OutsideTasks 98.07% <100.00%> (+<0.01%) ⬆️
Files with missing lines Coverage Δ
database/models/reports.py 99.52% <100.00%> (+0.01%) ⬆️
tasks/test_results_processor.py 98.34% <100.00%> (+0.14%) ⬆️
...sks/tests/unit/test_test_results_processor_task.py 100.00% <100.00%> (ø)

@codecov-notifications
Copy link

codecov-notifications bot commented Sep 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #740   +/-   ##
=======================================
  Coverage   98.06%   98.06%           
=======================================
  Files         432      432           
  Lines       36273    36304   +31     
=======================================
+ Hits        35570    35601   +31     
  Misses        703      703           
Flag Coverage Δ
integration 98.06% <100.00%> (+<0.01%) ⬆️
unit 98.06% <100.00%> (+<0.01%) ⬆️

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

Components Coverage Δ
NonTestCode 95.97% <100.00%> (+<0.01%) ⬆️
OutsideTasks 98.07% <100.00%> (+<0.01%) ⬆️
Files with missing lines Coverage Δ
database/models/reports.py 99.52% <100.00%> (+0.01%) ⬆️
tasks/test_results_processor.py 98.34% <100.00%> (+0.14%) ⬆️
...sks/tests/unit/test_test_results_processor_task.py 100.00% <100.00%> (ø)

@codecov-qa
Copy link

codecov-qa bot commented Sep 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.06%. Comparing base (a2d2110) to head (b94e31d).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #740   +/-   ##
=======================================
  Coverage   98.06%   98.06%           
=======================================
  Files         432      432           
  Lines       36273    36304   +31     
=======================================
+ Hits        35570    35601   +31     
  Misses        703      703           
Flag Coverage Δ
integration 98.06% <100.00%> (+<0.01%) ⬆️
unit 98.06% <100.00%> (+<0.01%) ⬆️

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

Components Coverage Δ
NonTestCode 95.97% <100.00%> (+<0.01%) ⬆️
OutsideTasks 98.07% <100.00%> (+<0.01%) ⬆️
Files with missing lines Coverage Δ
database/models/reports.py 99.52% <100.00%> (+0.01%) ⬆️
tasks/test_results_processor.py 98.34% <100.00%> (+0.14%) ⬆️
...sks/tests/unit/test_test_results_processor_task.py 100.00% <100.00%> (ø)

Copy link

codecov-public-qa bot commented Sep 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.06%. Comparing base (a2d2110) to head (b94e31d).

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #740   +/-   ##
=======================================
  Coverage   98.06%   98.06%           
=======================================
  Files         432      432           
  Lines       36273    36304   +31     
=======================================
+ Hits        35570    35601   +31     
  Misses        703      703           
Flag Coverage Δ
integration 98.06% <100.00%> (+<0.01%) ⬆️
unit 98.06% <100.00%> (+<0.01%) ⬆️

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

Components Coverage Δ
NonTestCode 95.97% <100.00%> (+<0.01%) ⬆️
OutsideTasks 98.07% <100.00%> (+<0.01%) ⬆️
Files Coverage Δ
database/models/reports.py 99.52% <100.00%> (+0.01%) ⬆️
tasks/test_results_processor.py 98.34% <100.00%> (+0.14%) ⬆️
...sks/tests/unit/test_test_results_processor_task.py 100.00% <100.00%> (ø)

Copy link

This PR includes changes to shared. Please review them here: codecov/shared@403d5a2...106b0ae

@@ -150,6 +182,12 @@ def _bulk_write_tests_to_db(
)
)

test_flag_bridge_data += [
{"test_id": test_id, "repoid": repoid, "flag_id": repo_flags[flag]}
Copy link
Contributor

Choose a reason for hiding this comment

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

Because test_id is not dependent on flag in flags I think we can move that outside of the list comprehension and reduce some cycles spent evaluating that for every flag right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

at some point we'd have to turn it into a list of dicts with each value so sqlalchemy can insert it

@joseph-sentry joseph-sentry added this pull request to the merge queue Sep 25, 2024
Merged via the queue into main with commit 3bee0c1 Sep 25, 2024
26 of 27 checks passed
@joseph-sentry joseph-sentry deleted the joseph/test-flag-bridge-2 branch September 25, 2024 21:03
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.

2 participants