N°9118 - No Safeguard when hub installation fail - #988
Conversation
|
| Filename | Overview |
|---|---|
| datamodels/2.x/itop-hub-connector/src/Controller/HubController.php | Adds extension-difference detection and passes added extension codes into compilation, but the previously reported label-based comparison remains outstanding. |
| setup/extensionsmap.class.inc.php | Supports scanning optional extension directories while preserving the existing per-environment extension-map cache. |
| setup/runtimeenv.class.inc.php | Extends CompileFrom to merge explicitly added extension codes into the configured extension choices. |
| datamodels/2.x/itop-hub-connector/land.php | Includes downloaded-extension directories when constructing the extension inventory used by status and installation pages. |
| tests/php-unit-tests/src/Service/UnitTestRunTimeEnvironment.php | Keeps the runtime-environment test double signature compatible with the new CompileFrom parameter. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Move selected downloads] --> B[Scan final modules]
A --> C[Scan build modules]
B --> D[Determine added extension codes]
C --> D
D --> E[Compile temporary environment]
E --> F[Validate dependencies]
F --> G[Install and commit]
Reviews (3): Last reviewed commit: "Apply suggestion from @greptile-apps[bot..." | Re-trigger Greptile
There was a problem hiding this comment.
Pull request overview
Adds safeguards so Hub-downloaded extensions are discovered and included during runtime compilation.
Changes:
- Supports additional extension directories and compile choices.
- Detects newly downloaded Hub extensions.
- Loads the backup error-reporting implementation explicitly.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
setup/extensionsmap.class.inc.php |
Scans additional extension directories. |
setup/runtimeenv.class.inc.php |
Accepts added extensions during compilation. |
HubController.php |
Detects and compiles newly downloaded extensions. |
land.php |
Includes downloaded extensions in Hub displays. |
UnitTestRunTimeEnvironment.php |
Aligns the test runtime API. |
Comments suppressed due to low confidence (1)
datamodels/2.x/itop-hub-connector/src/Controller/HubController.php:135
GetExtensionsFromDir()returnscode => labelorfalse, butarray_diff()compares the labels and requires arrays. A missing previous modules directory therefore causes aTypeErrorduring the first remote installation, and two different extension codes sharing a label are treated as the same extension. Compare keys and normalize the documentedfalseresult.
$aAddedExtensions = array_diff($aCurrentRemoteExtensions, $aPreviousRemoteExtensions);
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
N°9118 - No Safeguard when hub installation fail