Skip to content

Python script only packages FE support - #48946

Merged
cdcme merged 1 commit into
feat/41470-python-script-onlyfrom
feat/48394-python-script-only-fe
Jul 9, 2026
Merged

Python script only packages FE support#48946
cdcme merged 1 commit into
feat/41470-python-script-onlyfrom
feat/48394-python-script-only-fe

Conversation

@cdcme

@cdcme cdcme commented Jul 8, 2026

Copy link
Copy Markdown
Member

Related issue: Resolves #48394

Adds .py to the custom-package upload form and software details page, accepted and detected as a script-only package (advanced options follow .sh/.ps1), shown with the Python icon and per-platform file-type tooltips, and mapped to the py_packages source that renders as "Script-only package (macOS & Linux)".

Checklist for submitter

  • Added/updated automated tests
  • QA'd all new/changed functionality manually

Manual QA

  • Verified live in the browser against a dev server

@cdcme
cdcme marked this pull request as ready for review July 8, 2026 14:53
@cdcme
cdcme requested a review from a team as a code owner July 8, 2026 14:53
@codecov

codecov Bot commented Jul 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 60.00000% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.11%. Comparing base (646ebd0) to head (c3fb7dd).

Files with missing lines Patch % Lines
...ePage/components/forms/PackageForm/PackageForm.tsx 33.33% 2 Missing ⚠️
frontend/utilities/software_install_scripts.ts 0.00% 1 Missing ⚠️
frontend/utilities/software_uninstall_scripts.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@                        Coverage Diff                        @@
##           feat/41470-python-script-only   #48946      +/-   ##
=================================================================
- Coverage                          68.11%   68.11%   -0.01%     
=================================================================
  Files                               3709     3709              
  Lines                             235099   235105       +6     
  Branches                           12352    12355       +3     
=================================================================
+ Hits                              160129   160133       +4     
- Misses                             60593    60595       +2     
  Partials                           14377    14377              
Flag Coverage Δ
frontend 59.28% <60.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cdcme

cdcme commented Jul 8, 2026

Copy link
Copy Markdown
Member Author

@claude review once

isLatestFmaVersion={row.isActive && isLatestFmaVersion}
isScriptPackage={isScriptPackage}
source={title.source}
isTarballPackage={title.source === "tgz_packages"}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

since we're passing source in directly, I wonder if we can move the isTarballPackage and isIosOrIpadosApp into the library item accordion directly and use the source prop in there, just small cleanup.

@cdcme
cdcme merged commit c4e7e7e into feat/41470-python-script-only Jul 9, 2026
19 checks passed
@cdcme
cdcme deleted the feat/48394-python-script-only-fe branch July 9, 2026 19:07
@cdcme cdcme mentioned this pull request Jul 9, 2026
4 tasks
@cdcme cdcme linked an issue Jul 10, 2026 that may be closed by this pull request
cdcme added a commit that referenced this pull request Jul 16, 2026
**Related issue:** Resolves #41470

Adds support for uploading Python (`.py`) script-only software packages
— accepted as script-only (the file contents become the install script;
advanced options and automatic install follow `.sh`/`.ps1`), assigned
the new `py_packages` source, and installable on macOS and Linux hosts
across the UI, REST API, and GitOps.

Feature branch combining the backend (#48942) and frontend (#48946)
sub-PRs.

# Checklist for submitter

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
- [x] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements), JS
inline code is prevented especially for url redirects, and untrusted
data interpolated into shell scripts/commands is validated against shell
metacharacters.

## Testing

- [x] Added/updated automated tests
- [x] QA'd all new/changed functionality manually


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Added support for Python (`.py`) script-only software packages across
UI uploads, API/self-service installs, and GitOps parsing.
* Python installers now derive metadata correctly and render the proper
Python icon, with install eligibility for macOS & Linux.
* **Bug Fixes**
* Improved installer-script validation and “supported file types” error
messages to include `.py` (and consistent handling of related script
fields/options).
* **Tests**
* Expanded unit, integration, and GitOps tests to cover Python package
parsing, metadata derivation, platform/host eligibility, and UI
rendering.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
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.

Python script-only packages: custom package upload UI

2 participants