Skip to content

Include image information in Checkbox submission (New)#1460

Merged
pieqq merged 3 commits intomainfrom
image_info_submission
Dec 2, 2024
Merged

Include image information in Checkbox submission (New)#1460
pieqq merged 3 commits intomainfrom
image_info_submission

Conversation

@Hook25
Copy link
Copy Markdown
Collaborator

@Hook25 Hook25 commented Sep 9, 2024

Description

New job in pc-saity called com.canonical.certification::info/image-url calls bash script called get-image-url.sh. Probably needs some work to port it to the system_information section of the submission file.

This creates a new system_information collector that collects the URL if possible (namely, if ubuntu-report is installed on the machine and if the dcd string is there and valid). This safely fails in unexpected situations reporting the error. This also stores (in the stderr of the collector) the full report non-destructively, so in any situation we can go back and re-interpret the data

Resolved issues

Fixes: https://warthogs.atlassian.net/browse/CHECKBOX-1541

Documentation

N/A

Tests

This also adds appropriate unit tests

Inspired by pc-sanity get-image-url.sh
@codecov
Copy link
Copy Markdown

codecov bot commented Sep 9, 2024

Codecov Report

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

Project coverage is 46.13%. Comparing base (d7d5c8c) to head (ea753b3).
Report is 196 commits behind head on main.

Files with missing lines Patch % Lines
...box-ng/plainbox/impl/session/system_information.py 75.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1460   +/-   ##
=======================================
  Coverage   46.13%   46.13%           
=======================================
  Files         367      367           
  Lines       39206    39210    +4     
  Branches     6633     6633           
=======================================
+ Hits        18088    18091    +3     
- Misses      20421    20422    +1     
  Partials      697      697           
Flag Coverage Δ
checkbox-ng 68.13% <75.00%> (+<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.

Copy link
Copy Markdown
Collaborator

@pieqq pieqq left a comment

Choose a reason for hiding this comment

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

Looks good to me!

Does it mean we can remove the get-image-url.sh script and associated job in the sanity provider?

@Hook25
Copy link
Copy Markdown
Collaborator Author

Hook25 commented Dec 2, 2024

I wouldn't remove it for now, as that will disrupt them and this is intended to collect the information and not give immediate feedback to the user (as in, it wont fail publicly in the log, prompting you to maybe update the string and rerun it), so it may not fit their purpose

@pieqq pieqq merged commit 4f7e7d5 into main Dec 2, 2024
@pieqq pieqq deleted the image_info_submission branch December 2, 2024 12:30
eugene-yujinwu pushed a commit to eugene-yujinwu/checkbox that referenced this pull request Dec 31, 2024
This creates a new system_information collector that collects the URL if possible (namely, if ubuntu-report is installed on the machine and if the DCD string is there and valid). This safely fails in unexpected situations, reporting the error. This also stores (in the stderr of the collector) the full report non-destructively, so in any situation we can go back and re-interpret the data.

This is inspired by PC Sanity provider's `get-image-url.sh` script.
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