rmannibucau opened a new pull request, #9525: URL: https://github.com/apache/hop/pull/9525
## Issue Saved execution metadata is a JSON object keyed by metadata type. `SerializableMetadataProvider.toJson()` writes an array for every registered type, even when no objects of that type exist. An execution snapshot can therefore contain entries such as `"salesforceconnection": []` or `"neo4j-connection": []` without the executed pipeline using either connection type. When the snapshot is read in an installation where one of those optional metadata plugins is unavailable, the reader resolves the plugin before inspecting the array. This produces `The metadata plugin for key ... could not be found in the plugin registry` errors even for empty entries. In Hop GUI this can happen during project activation, when `ExecutionPerspective.restoreOpenTabs()` reopens historical executions and reconstructs their saved metadata. It does not necessarily indicate a problem with the current project's connections. There is a second issue when an unavailable type does contain objects: the skip loop stops at the first `END_ARRAY` token, rather than the end of the metadata type's array. A real Neo4j connection contains `manualUrls: []`; the graph database connection also contains this array nested under `graphDatabase.NEO4J`. Either shape can leave the reader positioned inside a skipped connection and interfere with loading subsequent metadata types. ## Implementation - Require each metadata type's value to be an array and advance to its first element before resolving the metadata class. - Skip empty arrays immediately, without a plugin lookup or a misleading error. - For nonempty arrays whose metadata plugin cannot be resolved, retain the existing error diagnostic and use `skipChildren()` on each element. This skips complete objects, including nested arrays, and resumes at the next metadata type. - Load known types starting from the already-read first element. The serialized format and existing legacy-key resolution remain unchanged. Regression coverage uses the existing Neo4j integration fixture and graph database connection sample shapes, including their empty `manualUrls` arrays, and verifies that a following server entry is still loaded when the connection plugin is unavailable. Empty Salesforce and Neo4j entries are also covered without adding dependencies on those plugins. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
