mattcasters opened a new pull request, #8052:
URL: https://github.com/apache/hop/pull/8052

   **Please** add a meaningful description for your change here
   
   Fixes #3127.
   
   A child project can now copy folders from its parent so a parent can act as 
a template of pipelines, workflows, and other files. The copy is opt-in per 
folder, runs when the project is enabled (Hop Gui, `hop-run`, `hop-conf` 
enable), and is configured on a new **Parent project** tab in Project 
Properties.
   
   ### Parent folder sync
   
   In `project-config.json`, `parentProjectFolders` lists folders relative to 
the parent home (`.` for the parent root). Each row has:
   
   - **Copy once** — copy when the destination is missing or empty (a new 
project home that only contains `project-config.json` counts as empty)
   - **Copy on enable** — copy every time the project is enabled
   - **Overwrite** — replace existing files in the child; otherwise existing 
files are kept
   - **Exclusion** — a Java regular expression matched against the file name 
and the path relative to the copied folder (same style as Copy Files / Unzip). 
An invalid expression skips that row so excluded files are not copied by 
accident
   
   All files under the selected folders are copied, not only pipelines and 
workflows. Copy uses Hop VFS file-by-file (a whole-tree `copyFrom` would empty 
an existing destination). Path traversal out of the project home is rejected. 
The child's `project-config.json` and any `.git` directory are never 
overwritten.
   
   Read-only projects are skipped. A missing parent folder or a failed file 
copy is logged and does not abort enabling the project.
   
   ### Project Properties tabs
   
   The extra table would crowd the old single-page dialog, so Project 
Properties is split into:
   
   - **Basic** — name, home, read-only, config file, description, company, 
department, version, auto-export metadata
   - **Folders** — metadata base, unit tests, data sets, enforce execution in 
home
   - **Parent project** — parent name and the folder sync table
   - **Variables** — project variables
   
   Help buttons on the project and environment dialogs open the projects and 
environments documentation via `Const.getDocUrl()`.
   
   ### Documentation
   
   `projects-environments.adoc` is updated for:
   
   - Creating, switching, editing, and deleting projects and environments from 
the status-bar menus (bottom-left project and environment indicators)
   - The tabbed Project Properties and Environment Properties dialogs 
(including configuration files, marketplace plugins, and system resources)
   - Parent folder sync options
   
   Screenshots were recaptured for those menus and tabs.
   
   ### Tests
   
   `ParentProjectFolderSynchronizerTest` covers copy-once vs copy-on-enable, 
overwrite, regex exclusion, protected `project-config.json` / `.git`, path 
traversal, invalid regex, and read-only projects. `ProjectTest` covers JSON 
round-trip of `parentProjectFolders`.
   
   ------------------------
   
   Thank you for your contribution! Follow this checklist to help us 
incorporate your contribution quickly and easily:
   - [x] Run `mvn clean install apache-rat:check` to make sure basic checks 
pass. A more thorough check will be performed on your pull request 
automatically.
   - [x] If you have a group of commits related to the same change, please 
squash your commits into one and force push your branch using `git rebase -i`.
   - [x] Mention the appropriate issue in your description (for example: 
`addresses #123`), if applicable.
   
   To make clear that you license your contribution under the [Apache License 
Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   you have to acknowledge this by using the following check-box.
   
   - [x] I hereby declare this contribution to be licensed under the [Apache 
License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   - [ ] In any other case, please file an [Apache Individual Contributor 
License Agreement](https://www.apache.org/licenses/icla.pdf).


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