Skip to content

config: runtime: base: python: make more generic #2909

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

a-wai
Copy link
Contributor

@a-wai a-wai commented Jun 19, 2025

The base python template was designed with post-checkout jobs (kbuild, kunit...) in mind and doesn't work too well with test or post-processing jobs due to the following issues:

  • it assumes we need the kernel source from the parent checkout node
  • it doesn't provide a way to retrieve arbitrary artifacts from a node or its parent
  • the _get_source() function doesn't allow specifying an arbitrary target folder to extract tarballs to

Ensure we only download/extract/cd to the kernel source if the current node is a child to a checkout node, otherwise let the job definition prepare its workspace as needed.

Also add a generic _get_artifact_url() for downloading arbitrary artifacts and make the existing _get_tarball_url() use it to avoid duplicating code.

Finally, add an optional path parameter to _get_source() so the job can specify the destination folder if needed.

The base `python` template was designed with post-checkout jobs
(`kbuild`, `kunit`...) in mind and doesn't work too well with test or
post-processing jobs due to the following issues:
* it assumes we need the kernel source from the parent `checkout` node
* it doesn't provide a way to retrieve arbitrary artifacts from a node
  or its parent
* the `_get_source()` function doesn't allow specifying an arbitrary
  target folder to extract tarballs to

Ensure we only download/extract/cd to the kernel source if the current
node is a child to a `checkout` node, otherwise let the job definition
prepare its workspace as needed.

Also add a generic `_get_artifact_url()` for downloading arbitrary
artifacts and make the existing `_get_tarball_url()` use it to avoid
duplicating code.

Finally, add an optional `path` parameter to `_get_source()` so the job
can specify the destination folder if needed.

Signed-off-by: Arnaud Ferraris <[email protected]>
@a-wai a-wai force-pushed the generic-python-basejob-fixes branch from b55abb1 to 88a1594 Compare June 19, 2025 16:00
Copy link
Contributor

@pawiecz pawiecz left a comment

Choose a reason for hiding this comment

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

LGTM

(I'd merge it but I don't have sufficient permissions in Core)

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