bamaer commented on PR #8587:
URL: https://github.com/apache/hop/pull/8587#issuecomment-5845845366

   Rebased onto main. The conflict with #8582 is resolved keeping both halves: 
the
   element name comes from the entry type, and `setChildElement` replaces an 
existing
   child rather than appending a second one, so it only writes when a default is
   actually set.
   
   **Registration before validation** — split in two. 
`resolveExistingProject()` only
   reads, since an existing project is where the output folder comes from. A new
   project is registered by `registerTargetProject()`, after the import plugin 
has
   validated both folders and before anything is written. A missing or 
non-existent
   `-i`, or an unknown `--type`, now registers nothing.
   
   **Project home folder** — `projectHomeToStore()` pins down a relative `-o`, 
and
   keeps the scheme of a non-local one: `getName().getPath()` would turn
   `s3://bucket/folder` into `/bucket/folder`. A folder that is already 
absolute is
   stored as given, so `'${SOME_VARIABLE}/folder'` stays portable — the 
`ProjectHome`
   extension point resolves it on every read.
   
   **Exit code** — a `--project` that cannot be registered now stops the run 
before
   any file is written, instead of importing and reporting failure afterwards.
   
   **Metadata Injection run configuration** — covered by the rebase above.
   
   Added `HopImportProjectTest` in the engine, and integration test 0003 now 
asserts
   that an import which fails on its options registers nothing.
   
   Verified by hand with the built client against the PDI 9.4 samples: 
importing with
   `-r local -w local` gives `<run_configuration>local</run_configuration>` on 
the
   Metadata Injection transform and 
`<runConfiguration>local</runConfiguration>` on
   the three Simple Mapping transforms; `hop-import -o out --project X` without 
an
   input folder exits 1 and registers nothing; a relative `-o` is stored as an
   absolute project home, and a second run from another directory imports into 
that
   home instead of creating a new folder beside itself.
   


-- 
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]

Reply via email to