Skip to content

Move custom frontend and load all for all jobs (bugfix)#2457

Open
Hook25 wants to merge 1 commit intomainfrom
custom_frontend_aoe
Open

Move custom frontend and load all for all jobs (bugfix)#2457
Hook25 wants to merge 1 commit intomainfrom
custom_frontend_aoe

Conversation

@Hook25
Copy link
Copy Markdown
Collaborator

@Hook25 Hook25 commented Apr 10, 2026

Description

Previous implementation only loaded envvars per provider, effectively binding them to the providers they target. This was a mistake, as that means that providers can't rely on each other and resources like executables are basically useless with this new architecture.

This adresses this flaw by making all custom frontend variables apply to all jobs, as they should.

Resolved issues

N/A

Documentation

N/A

Tests

Added/moved tests to the new module.

Tested this locally by building checkbox24 and a custom-frontend provider. Snap trying both. Creating a new executable (touch a; chmod +x a) in the custom frontend /usr/bin, adding the following job to Checkbox to a random pxu and triggering it, it works.

id: test_path
flags: simple
requires: executable.name == 'a'
command:
  echo "it works :)"
_summary: Test that path includes all custom frontends

Command:

checkbox24.checkbox run test_path

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 10, 2026

Codecov Report

❌ Patch coverage is 96.77419% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 58.90%. Comparing base (851f35a) to head (10d4be4).
⚠️ Report is 18 commits behind head on main.

Files with missing lines Patch % Lines
.../plainbox/impl/secure/providers/custom_frontend.py 94.52% 3 Missing and 1 partial ⚠️
checkbox-ng/plainbox/impl/execution.py 80.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2457      +/-   ##
==========================================
+ Coverage   58.87%   58.90%   +0.03%     
==========================================
  Files         476      478       +2     
  Lines       48004    48042      +38     
  Branches     8568     8580      +12     
==========================================
+ Hits        28260    28298      +38     
  Misses      18853    18853              
  Partials      891      891              
Flag Coverage Δ
checkbox-ng 76.09% <96.77%> (+0.04%) ⬆️

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.

@Hook25 Hook25 marked this pull request as ready for review April 10, 2026 14:34
Previous implementation only loaded envvars per provider, effectively
binding them to the providers they target. This was a mistake, as that
means that providers can't rely on each other and resources like
executables are basically useless with this new thing.
@Hook25 Hook25 force-pushed the custom_frontend_aoe branch from 874f021 to 10d4be4 Compare April 17, 2026 09:10
@p-gentili
Copy link
Copy Markdown
Collaborator

Was looking at the documentation, https://github.com/canonical/checkbox/blob/main/docs/how-to/custom-frontend-envvars.rst. You might want to rephrase "accessed globally by all tests in a frontend" with "accessed globally by all tests in a frontend regardless of which provider the test comes from". Or simple "accessed globally by all tests."

Testing now...

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