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

Forward get_flag_names for the ReadOnlyReport #556

Merged
merged 1 commit into from
Mar 5, 2025

Conversation

Swatinem
Copy link
Contributor

@Swatinem Swatinem commented Mar 4, 2025

The api_report_service.ReadOnlyReport overrides the flags property, but it looks like the usage of .flags would be better served by get_flag_names instead.

But that method previously did not exist on that Report class, so lets add it.

The `api_report_service.ReadOnlyReport` overrides the `flags` property, but it looks like the usage of `.flags` would be better served by `get_flag_names` instead.

But that method previously did not exist on that `Report` class, so lets add it.
@Swatinem Swatinem requested a review from a team March 4, 2025 16:01
@Swatinem Swatinem self-assigned this Mar 4, 2025
@Swatinem Swatinem enabled auto-merge March 4, 2025 16:02
Copy link

codspeed-hq bot commented Mar 4, 2025

CodSpeed Performance Report

Merging #556 will create unknown performance changes

Comparing swatinem/readonly-flagnames (6daa195) with main (e9567e6)

Summary

⚠️ No benchmarks were detected in both the base of the PR and the PR.\

Copy link

codecov bot commented Mar 4, 2025

Codecov Report

Attention: Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.

Project coverage is 88.72%. Comparing base (e9567e6) to head (6daa195).
Report is 3 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
shared/reports/readonly.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #556      +/-   ##
==========================================
- Coverage   88.73%   88.72%   -0.01%     
==========================================
  Files         459      459              
  Lines       13130    13132       +2     
  Branches     1510     1510              
==========================================
+ Hits        11651    11652       +1     
- Misses       1163     1164       +1     
  Partials      316      316              
Flag Coverage Δ
shared-docker-uploader 88.72% <66.66%> (-0.01%) ⬇️

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.

@codecov-notifications
Copy link

codecov-notifications bot commented Mar 4, 2025

Codecov Report

Attention: Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
shared/reports/readonly.py 50.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

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

@@ -103,6 +103,9 @@ def flags(self):
)
return self._flags

def get_flag_names(self) -> list[str]:
Copy link
Contributor

Choose a reason for hiding this comment

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

should we be caching the result of get_flag_names internally in the LazyRustReport or even in the implementation of the inner report in resource.py?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it might make sense as a followup potentially. Though I guess this is already rather lightweight already, as it it just iterating through the sessions. Though its quite possible that reports have a shitton fo sessions because of perpetually carryforwarding old shit thats never being cleaned up or other kinds of reasons.

@Swatinem Swatinem added this pull request to the merge queue Mar 5, 2025
Merged via the queue into main with commit 079d368 Mar 5, 2025
8 of 12 checks passed
@Swatinem Swatinem deleted the swatinem/readonly-flagnames branch March 5, 2025 15:04
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