Skip to content

Bug 1846013 Allows users to fetch results from all frameworks - #9761

Open
gopar wants to merge 1 commit into
mozilla:masterfrom
gopar:bug-1846013-framework-param-optional
Open

Bug 1846013 Allows users to fetch results from all frameworks#9761
gopar wants to merge 1 commit into
mozilla:masterfrom
gopar:bug-1846013-framework-param-optional

Conversation

@gopar

@gopar gopar commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

@netlify

netlify Bot commented Aug 8, 2026

Copy link
Copy Markdown

Deploy Preview for treeherder ready!

Name Link
🔨 Latest commit f70ad16
🔍 Latest deploy log https://app.netlify.com/projects/treeherder/deploys/6a835a9b51758200083b1be8
😎 Deploy Preview https://deploy-preview-9761--treeherder.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

# Build common result dictionary (contains only data both test versions use)
is_complete = base_runs_count and new_runs_count
resolved_framework = (
framework or base_sig.get("framework_id") or new_sig.get("framework_id")

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Who should win here when framework is empty? base or new?

@beatrice-acasandrei beatrice-acasandrei Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The expected logic for this task is that if the framework parameter is omitted by the frontend, the system should default to displaying comparison data for all available frameworks in PerfCompare (e.g., awsy, browsertime, build_metrics, devtools). I hope this helps clarify things.

However, it’s worth noting that previous attempts to implement this triggered performance issues due to the high volume of compare results being returned. I'm not certain whether our past performance issues on this have been resolved yet. It may be too early to tackle this now, so we'll probably need to consult Sparky before taking next steps.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@gmierz when you get a chance can you chime in. thanks!

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We haven't resolved or looked into those issues. There's another issue here too which is that we're going to be mixing results from frameworks that have data which is useless to most devs (e.g. build metrics and mozharness).

I think we should land this change, but instead of having the framework be empty for all data, use all as the option so that we don't have people inadvertently querying for all the data if they omit the framework. Main reason for that is in case this causes too much load on our backend. With that, we can then test out what it looks like in PerfCompare but we shouldn't allow/expose to users there yet.

Comment on lines +2091 to 2100
query_set = PerformanceSignature.objects.filter(parent_signature_id=None).prefetch_related(
"performancealert"
)
if framework_id is not None:
query_set = query_set.filter(framework_id=framework_id)
query_set = (
PerformanceSignature.objects.prefetch_related("performancealert")
.filter(framework_id=framework_id, parent_signature_id=None)
.values("suite", "test")
query_set.values("suite", "test")
.annotate(repositories=GroupConcat("repository_id", distinct=True))
.annotate(platforms=GroupConcat("platform_id", distinct=True))
.annotate(total_alerts=Count("performancealert"))

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

So i don't see any tests related to this endpoint. Is it in use? When I tried writing a test I got some sql errors and it was because GroupConcat is a MySql feature not in postgres. is this dead code that should be removed then?

@gopar gopar changed the title [bug-1846013] Allows users to fetch results from all frameworks Bug 1846013 Allows users to fetch results from all frameworks Aug 10, 2026
return Response(data=query_params.errors, status=HTTP_400_BAD_REQUEST)

framework_id = query_params.validated_data["framework"]
query_set = PerformanceSignature.objects.filter(parent_signature_id=None).prefetch_related(

@beatrice-acasandrei beatrice-acasandrei Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

To my knowledge, this endpoint (TestSuiteHealthViewSet) is not utilized in PerfCompare, so modifications here should not be necessary.

@gopar
gopar force-pushed the bug-1846013-framework-param-optional branch from ec19781 to f70ad16 Compare August 17, 2026 19:01
@Archaeopteryx Archaeopteryx added the perfherder perfherder related PR for the Perf team to work on label Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

perfherder perfherder related PR for the Perf team to work on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants