Skip to content

Add launcher to the submission (bugfix)#1826

Merged
Hook25 merged 5 commits intomainfrom
config_in_submission
Apr 29, 2025
Merged

Add launcher to the submission (bugfix)#1826
Hook25 merged 5 commits intomainfrom
config_in_submission

Conversation

@Hook25
Copy link
Copy Markdown
Collaborator

@Hook25 Hook25 commented Mar 27, 2025

Description

In order to easily reproduce a test run, one has to know the launcher that created it. This PR changes the submission so that it also contains the launcher. This will make it way easier to spot issues with submissions directly on C3 and without relying on our infra (that may not be the submitter) to pick up the launcher.

TO REVIEW THE SCHEMA: note, I've reformatted the schema using jq but I did so in a separate commit, if you want to review my changes, do so excluding that commit for your own sanity's sake!

Resolved issues

Fixes: CHECKBOX-1773

Documentation

N/A

Tests

Submission.json
submission_2025-03-27T16.10.59.703034.json

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 27, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 50.31%. Comparing base (3dc0dc3) to head (88c1b08).
⚠️ Report is 156 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1826      +/-   ##
==========================================
+ Coverage   50.17%   50.31%   +0.14%     
==========================================
  Files         380      380              
  Lines       40962    40997      +35     
  Branches     6883     6877       -6     
==========================================
+ Hits        20552    20628      +76     
+ Misses      19683    19634      -49     
- Partials      727      735       +8     
Flag Coverage Δ
checkbox-ng 70.23% <100.00%> (+0.34%) ⬆️

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.

@pieqq
Copy link
Copy Markdown
Collaborator

pieqq commented Mar 31, 2025

This modifies the submission format. Can you also modify the submission schema?

Copy link
Copy Markdown
Collaborator

@fernando79513 fernando79513 left a comment

Choose a reason for hiding this comment

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

I'll be damned if checkbox is not convoluted.
I was going to ask you to add some tests for the CheckboxINIParser, and I saw the ones from ConfigParser and then got caught into that mess.

Since you are only using the ''to_dict" method here. I think it is okay to skip the unit tests, but I'll still add something like this in test_config.py

    @patch("os.path.isfile", return_value=True)
    def test_ini_parser(self, _):

        ini_data = """
        [launcher]
        launcher_version = 1
        stock_reports = submission_files, text
        [test plan]
        unit = 2021.com.canonical.certification::pass-and-fail
        forced = yes
        """
        parser = CheckboxINIParser()
        parser.read_string(ini_data)
        dict_data = parser.to_dict()

        launcher = dict_data.get("launcher")
        self.assertEqual(launcher.get("launcher_version"), "1")
        self.assertEqual(
            launcher.get("stock_reports"), "submission_files, text"
        )
        test_plan = dict_data.get("test plan")
        self.assertEqual(
            test_plan.get("unit"),
            "2021.com.canonical.certification::pass-and-fail",
        )
        self.assertEqual(test_plan.get("forced"), "yes")

@fernando79513 fernando79513 self-assigned this Apr 23, 2025
Copy link
Copy Markdown
Collaborator

@fernando79513 fernando79513 left a comment

Choose a reason for hiding this comment

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

LGTM +1!

@Hook25 Hook25 merged commit bd47976 into main Apr 29, 2025
27 of 28 checks passed
@Hook25 Hook25 deleted the config_in_submission branch April 29, 2025 07:52
Meulengracht pushed a commit to Meulengracht/checkbox that referenced this pull request May 19, 2025
* Add launcher to the submission

* Add the new object to the schema

Minor: update authors

* Add the field to the submission using the new schema

* Reformatted schema using jq

* Add unit test for to_dict
mreed8855 pushed a commit that referenced this pull request Jul 30, 2025
* Add launcher to the submission

* Add the new object to the schema

Minor: update authors

* Add the field to the submission using the new schema

* Reformatted schema using jq

* Add unit test for to_dict
mreed8855 pushed a commit that referenced this pull request Jul 31, 2025
* Add launcher to the submission

* Add the new object to the schema

Minor: update authors

* Add the field to the submission using the new schema

* Reformatted schema using jq

* Add unit test for to_dict
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