mattcasters opened a new pull request, #8265:
URL: https://github.com/apache/hop/pull/8265
## What this PR does
Fixes #2916.
You can run or open a Hop project for a single process without adding it to
`hop-config.json`. Hop registers the project in memory, points metadata at
`${PROJECT_HOME}/metadata`, and does not write the registration back to disk.
```bash
hop --project-locations my-project=/path/to/project run -f pipeline.hpl -r
local
hop --project-locations my-project=/path/to/project gui -j my-project -f
pipeline.hpl
```
`hop gui` also accepts the same `-j` / `--project`, `-e` / `--environment`
and `-f` / `--file` options as `hop run`.
## Command line options
Root `hop` options (also available on `run`, `gui`, and other project-aware
subcommands):
| Option | Description |
| --- | --- |
| `-pl`, `--project-locations` | Register project folders or zip/jar
archives for this process (`name=/path`) |
| `--environments` | Register lifecycle environments in memory
(`name=[project:]file1;file2`) |
| `--environment-conf-files` | Extra environment config files to apply |
| `-im`, `--in-memory` | Do not persist Hop configuration to
`hop-config.json` |
| `-j`, `--project` | Project to enable |
| `-e`, `--environment` | Lifecycle environment to enable |
`hop gui` additionally:
| Option | Description |
| --- | --- |
| `-f`, `--file` | Pipeline or workflow to open (relative paths resolve
against `${PROJECT_HOME}`) |
System variable `HOP_CONFIG_IN_MEMORY=Y` has the same effect as
`--in-memory`.
## Implementation notes
- `--project-locations` implies in-memory mode so `hop-config.json` is not
updated.
- Enabling a project always rebuilds the metadata provider from the
project's `metadataBaseFolder`.
- Root options are applied before the subcommand so `hop --project-locations
… run` finds the project metadata (run configurations, connections, …).
- Config file existence checks use Hop VFS rather than `java.io.File`.
Docs: [Use a project without
hop-config.json](https://hop.apache.org/manual/latest/projects/advanced.html)
(this PR updates `projects/advanced.adoc`, `hop.adoc`, `hop-gui.adoc`,
`hop-run/index.adoc`, `variables.adoc`).
## Testing
- Unit tests for in-memory config, project location registration, GUI option
remembering, and CLI file/project parsing.
- Manual: `hop --project-locations ttt=/path run -f long-running-test.hpl -r
local` loads run configuration `local` from the project metadata folder and
executes.
- `hop gui --help` lists `-j`, `-e`, `-f`, `--project-locations`.
--
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]