Skip to content

Port --custom_artifacts_path from iLEAPP for loader parity#939

Merged
abrignoni merged 1 commit into
mainfrom
custom-artifacts-path
Jul 8, 2026
Merged

Port --custom_artifacts_path from iLEAPP for loader parity#939
abrignoni merged 1 commit into
mainfrom
custom-artifacts-path

Conversation

@abrignoni

Copy link
Copy Markdown
Owner

Summary

Ports iLEAPP's --custom_artifacts_path CLI option and multi-path plugin loader to ALEAPP, so additional artifact directories (e.g. scripts/alternate_artifacts from #938) can be loaded on demand without touching scripts/artifacts/. Companion to #938 and abrignoni/batch-leapp#2 — with this, batch-leapp enables the App Inventory artifacts via a flag instead of staging a file into the checkout.

python3 aleapp.py -t zip -i <extraction.zip> -o <out> --custom_artifacts_path scripts/alternate_artifacts

Changes

  • scripts/plugin_loader.py — verbatim copy of iLEAPP's loader: PluginLoader(plugin_paths=[...]) takes a list of directories (defaults to [PLUGINPATH]), lazy module names are namespaced by parent folder, duplicate keys within one folder still raise, duplicates from an alternate folder override the standard artifact with an info message. The PyInstaller hook is already identical between the repos.
  • aleapp.py — the new option, and loader construction moved after parse_args() (nothing referenced the loader before that point). Also brings the file to pylint 10.00 for the CI changed-files gate: encoding on the path_list.txt open, two f-string/comment cleanups, and targeted inline disables for the long-standing wildcard imports and except blocks — no behavior changes.

No-regression verification

  • Loaded plugin set byte-identical to main: 583 plugins compared on (module, name, category, search patterns)
  • Full run on a test zip: the set of completed artifacts is identical to a main-branch run
  • --custom_artifacts_path pointing at an external folder loads exactly the 3 additional artifacts (586 total), which write their LAVA tables correctly
  • python3 -m unittest admin tests pass (test_artifact_imports, test_dependency_compatibility)
  • No-arg PluginLoader() unchanged (aleappGUI.py path)
  • -p artifact path list generation works (772 patterns)
  • PYTHONPATH=. pylint --disable=C,R aleapp.py scripts/plugin_loader.py → 10.00

Ports iLEAPP's plugin loader and CLI option so additional artifact
directories can be loaded on demand (e.g. scripts/alternate_artifacts):

- scripts/plugin_loader.py: verbatim copy of iLEAPP's loader —
  PluginLoader(plugin_paths=[...]) accepts a list of directories,
  lazy module names are namespaced by parent folder, duplicate keys
  within one folder still raise, and a duplicate key from an alternate
  folder overrides the standard one with an informational message
- aleapp.py: new --custom_artifacts_path option; loader construction
  moved after parse_args (nothing used it earlier); default behavior
  is unchanged
- aleapp.py: pre-existing pylint warnings resolved so the file passes
  the CI lint gate (encoding on path_list.txt, f-string/comment fixes,
  targeted inline disables for the long-standing wildcard imports and
  except blocks — no behavior changes)

Verification (no regressions):
- loaded plugin set byte-identical to main (583 plugins: module, name,
  category and search patterns compared)
- full run on a test zip: completed-artifact set identical to main
- run with --custom_artifacts_path pointing at an external folder
  loads exactly the additional artifacts
- admin tests pass (test_artifact_imports, test_dependency_compatibility)
- no-arg PluginLoader() unchanged for aleappGUI.py
- -p path list generation works
- pylint --disable=C,R at 10.00 for both touched files
abrignoni added a commit that referenced this pull request Jul 8, 2026
@abrignoni abrignoni merged commit 5819cfe into main Jul 8, 2026
2 checks passed
@abrignoni abrignoni deleted the custom-artifacts-path branch July 8, 2026 22:22
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.

1 participant