Skip to content

Launcher generator: leave unset manifest entries empty (New) - #3040

Merged
rickwu666666 merged 3 commits into
mainfrom
make-unmet-manifest-to-none-for-launcher-generator
Nov 13, 2026
Merged

rickwu666666 merged 3 commits into
mainfrom
make-unmet-manifest-to-none-for-launcher-generator

Conversation

@rickwu666666

@rickwu666666 rickwu666666 commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Description

As discussed during the sprint, we would like to keep unmet manifests as None instead of setting them to False.

Add an "unset" option to the bool manifest toggle and write unset manifest entries as an empty "key =" line instead of "key = false". Empty values now start on "unset", so confirming without choosing no longer turns an entry into true.

Also let the test _FakeEdit accept extra kwargs so the ItemRow edit mode tests pass, and update the README.

Resolved issues

Documentation

Tests

Screenshot from 2026-11-12 10-18-38

test build
https://github.com/canonical/checkbox/actions/runs/42941307237/job/130375999660

@rickwu666666 rickwu666666 added the ce-oem The PR only contains to the ce-oem provider under the contrib area label Nov 11, 2026
@rickwu666666
rickwu666666 marked this pull request as draft November 11, 2026 01:52
@rickwu666666
rickwu666666 marked this pull request as ready for review November 12, 2026 02:19
@rickwu666666
rickwu666666 requested a review from a team November 12, 2026 02:20
Add an "unset" option to the bool manifest toggle and write unset
manifest entries as an empty "key =" line instead of "key = false".
Empty values now start on "unset", so confirming without choosing no
longer turns an entry into true.

Also let the test _FakeEdit accept extra kwargs so the ItemRow edit
mode tests pass, and update the README.
@rickwu666666
rickwu666666 force-pushed the make-unmet-manifest-to-none-for-launcher-generator branch from 3ce9b67 to e08b1a9 Compare November 12, 2026 02:30

@seankingyang seankingyang left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Update: Rick applied all 8 suggestions in 5e12071 and 71d41e9. I checked the new head 71d41e9:

  • 133 unit tests pass.
  • I made a launcher for a real device (plan ce-oem-iot-desktop-24-04) with 26 entries left unset. The file has no key = lines, and checkbox accepts all 65 manifest values.

The blocking issue is fixed, so I no longer request changes. The other points are not blocking. They are recorded in OEMQA-7026: empty values from the launcher template, a test that reads the launcher back, a README note for old launchers, the notes below, and usability feedback from a first-time user.


Thanks for the change. I followed the README step by step as a new user, at the PR head (e08b1a9):

  1. Unit tests: 133 tests pass when I run the README command from tests/. On main, 3 ItemRow tests fail with _FakeEdit.__init__() got an unexpected keyword argument 'wrap', so the _FakeEdit(**kwargs) change is correct.
  2. TUI: ./gen_launcher.py --providers-dir <checkout> → / filter → ce-oem-iot-ubuntucore-26 → the editor shows 97 manifest entries. The toggle shows [true] [false] [unset]. t, f, u, Space and Enter work as the README says, and s writes the launcher. I set 3 entries; the other 94 are written as key =.
  3. Run the launcher (next step in the README): checkbox stops at the manifest step, before any job runs:
    Invalid manifest com.example::has_probe value ''
    

Blocking issue: checkbox reads key = as the string '', not as None, and '' is not a valid bool. To keep an entry "None", leave the key out of [manifest]. Details and the repro are in the inline comment on write_launcher(). The other suggestions update the docstrings, README and test to match, so you can apply them as one batch.

Other notes (not blocking)
  • README "Running the tests": the command works only from tests/. From the tool root it gives ModuleNotFoundError (errors=2). Please add cd tests to the example.
  • README says "123 unit tests total". There are now 133. Maybe remove the number, so that it does not become wrong again.
  • PR "Tests" section: please also add a run of a generated launcher with checkbox-cli (or checkbox-cli-wrapper). The unit tests and the snap build do not show the issue above.

rickwu666666 and others added 2 commits November 12, 2026 11:27
Co-authored-by: Isaac Yang <47034756+seankingyang@users.noreply.github.com>
…-generator/src/gen_launcher.py

Co-authored-by: Isaac Yang <47034756+seankingyang@users.noreply.github.com>
@seankingyang
seankingyang dismissed their stale review November 12, 2026 04:17

Rick applied all suggestions (5e12071, 71d41e9). I checked the fix on a real launcher. The other points are not blocking; they are in OEMQA-7026.

@seankingyang seankingyang left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks, Rick. I checked 71d41e9: 133 tests pass, and a launcher made for a real device has no key = lines, so checkbox accepts all manifest values. The remaining non-blocking points are tracked in OEMQA-7026.

@rickwu666666
rickwu666666 marked this pull request as draft November 13, 2026 00:35
@rickwu666666
rickwu666666 marked this pull request as ready for review November 13, 2026 01:44
@rickwu666666
rickwu666666 merged commit f03c02a into main Nov 13, 2026
24 of 28 checks passed
@rickwu666666
rickwu666666 deleted the make-unmet-manifest-to-none-for-launcher-generator branch November 13, 2026 01:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ce-oem The PR only contains to the ce-oem provider under the contrib area

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants