Skip to content

Conversation

@rene-oromtz
Copy link
Contributor

Description

This is an improvement while retrieving job results. This morning I noticed the job detail view was loading a bit slow while getting the Phase Results (this was temporary, no issues as of now), I suspect it might be related to the fact that the the log reconstruction was making several database calls per phase and log_type.

This PR simplifies retrieving all log data associated to a job by making a single db request if either log_type or phase are not specified

Also included some typehints and docstrings that were missing from initial Logging Redesign PR

Resolved issues

NA

Documentation

Web service API changes

Tests

All existing tests are passing as this didn't modify the behavior of retrieving the logs.

Tested on staging

Results are retrievable via CLI with:
testflinger-cli --server https://testflinger-staging.canonical.com results c0b67076-4ecf-45f6-84a3-0046d5df8e93

Results available in the UI:
https://testflinger-staging.canonical.com/jobs/c0b67076-4ecf-45f6-84a3-0046d5df8e93#phase-results

@codecov
Copy link

codecov bot commented Dec 5, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.93%. Comparing base (913d744) to head (ac2ed47).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #842      +/-   ##
==========================================
+ Coverage   70.91%   70.93%   +0.02%     
==========================================
  Files         108      108              
  Lines        9559     9566       +7     
  Branches      852      854       +2     
==========================================
+ Hits         6779     6786       +7     
  Misses       2609     2609              
  Partials      171      171              
Flag Coverage Δ *Carryforward flag
agent 72.41% <ø> (ø) Carriedforward from 913d744
cli 87.78% <ø> (ø) Carriedforward from 913d744
device 54.22% <ø> (ø) Carriedforward from 913d744
server 87.71% <100.00%> (+0.05%) ⬆️

*This pull request uses carry forward flags. Click here to find out more.

Components Coverage Δ
Agent 72.41% <ø> (ø)
CLI 87.78% <ø> (ø)
Common ∅ <ø> (∅)
Device Connectors 54.22% <ø> (ø)
Server 87.71% <100.00%> (+0.05%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@rene-oromtz rene-oromtz merged commit 1e218e8 into main Dec 8, 2025
15 of 16 checks passed
@rene-oromtz rene-oromtz deleted the reformat-log-handler branch December 8, 2025 21:39
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.

3 participants