Skip to content

Os release should always provide codename (bugfix)#1794

Merged
Hook25 merged 2 commits intomainfrom
os_release_bw_compatibility
Mar 17, 2025
Merged

Os release should always provide codename (bugfix)#1794
Hook25 merged 2 commits intomainfrom
os_release_bw_compatibility

Conversation

@Hook25
Copy link
Copy Markdown
Collaborator

@Hook25 Hook25 commented Mar 14, 2025

Description

This bugfix didn't take into consideration that ubuntu core doesn't have a codename. This patch provides backward compatibility by using the description (which is the pretty name of the os) as a codename (which is indeed proper for core).

Resolved issues

Fixes: CHECKBOX-1793

Documentation

Added a comment

Tests

Added a test

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 49.84%. Comparing base (5baa4d0) to head (dcb22f8).
Report is 111 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1794   +/-   ##
=======================================
  Coverage   49.83%   49.84%           
=======================================
  Files         377      377           
  Lines       40719    40720    +1     
  Branches     6851     6850    -1     
=======================================
+ Hits        20294    20295    +1     
  Misses      19700    19700           
  Partials      725      725           
Flag Coverage Δ
provider-resource ∅ <100.00%> (∅)

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.

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

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. Thanks!

@rickwu666666
Copy link
Copy Markdown
Contributor

I've try this change with my UC24 system. And it worked for me. This PR is quite critical for the IoT QA who is test with Ubuntu Core. Since the current checkbox in beta and edge track will get the invalid submission that will block submission from upload to C3.
The invalid submission contact the distribution field as follow which is missing "codename"

 "distribution": {
        "description": "Ubuntu Core 24",
        "distributor_id": "Ubuntu Core",
        "release": "24"
    },

After sideload this chage, we can get something like this.

"distribution": {
        "codename": "Ubuntu Core 24",
        "description": "Ubuntu Core 24",
        "distributor_id": "Ubuntu Core",
        "release": "24"
    },

@Hook25 Hook25 merged commit cc516d3 into main Mar 17, 2025
19 checks passed
@Hook25 Hook25 deleted the os_release_bw_compatibility branch March 17, 2025 07:56
stanley31huang pushed a commit that referenced this pull request Mar 28, 2025
* Os release should always provide codename

* Remember to finish comments
mreed8855 pushed a commit that referenced this pull request Jul 31, 2025
* Os release should always provide codename

* Remember to finish comments
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