-
Notifications
You must be signed in to change notification settings - Fork 356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: 'Open File' dialog when editing configuration files in Environment properties prepends CWD of client, doesn't resolve variables #3324
Comments
So I guess this is a feature request to allow variables to be replaced in the Open File dialog? |
It is trying to look for a file. How is it going to find the file if it is looking under the literal variable name, instead of the value of the variable? similarly, when it does substitute the value of the variable, when that value is an absolute path, prepending the CWD of the client isn't going to help |
@hansva looking at the last reference I think we can close this issue, isn't it? |
@sramazzina @hansva That reference is wrong |
yup, this can stay open. |
Actually, I just tried this and variable replacement works. |
As far as I am aware, there is only one place it needs to be set - the user's environment before they launch the GUI, or the environment of the application server for Hop Web |
@hansva and what happens when you hit 'Select' on that file? |
No issue there for me. |
@hansva No, it's all on Linux |
for reference |
Note, also |
Aha, I was able to reproduce now. I was missing 1 small part of your puzzle. which seems to be the root cause of all your problems. Project home does not support variables. Or at least on expansion, it is unable to replace the nested parameter When pressing the new button it tries to go to ${PROJECT_HOME} it can't find the file location and we have a fallback in place to go to PWD if locations are not found and this ends up in your weird path. In the file dialog when pressing the "P" button in the top left button it should go to your project root, but this also fails. As for your comment on Select, yes the dialog remembers the last known location and goes there by default. The starting point used to be project root always. but we had complaints from users that were working in a folder that they always had to browse there. So now we remember the last location and use that as starting point. We have buttons in the top left to go to user home or project root. |
"Project home does not support variables." so, if I move my HOP_CONFIG_FOLDER, which includes all my project homes, instead of just changing the value of HOP_CONFIG_FOLDER, and having it Just Work(TM), I also have to go through and change all the values of PROJECT_HOME, because it isn't smart enough to resolve the HOP_CONFIG_FOLDER variable. |
It's just a strange design you made, one we didn't encounter yet. That's all really, Phil. Most people would keep configuration and project metadata separate in the light of putting both in separate version control repositories. |
Ahem... [apache@apchop01 config]$ pwd [apache@apchop01 config]$ pwd I am literally following the example provided in the standard distribution. Not to mention (from https://hop.apache.org/dev-manual/latest/hopweb/index.html#_modify_startup_script) |
Just to clarify further Phil, we absolutely do not recommend that you use the default configuration. But, I guess it's great that we now know how you got to your setup. |
so what you're telling me is HOP_CONFIG_FOLDER should only contain one file. |
Thanks for helping us with the reproduction of the issue Phil. It's been informative. |
It's valid usage and it should work, so we will fix it. |
Just for some background, I am not a developer, I am an infrastructure person (I manage a large Oracle database installation). So my POV comes from what is the architecture, how would I deploy this, and what are the infrastructure lifecycle management implications. I am not so concerned with things like managing the development lifecycle - that's S.E.P. One big thing I try to use is 'single source of truth', and the corollary that things should only have one place where they are defined, and then that definition can be used by reference. If it changes in the architecture, it should only have to be changed once in the configuration, and everything else that references it Just Works(TM) So I am not trying to be unnecessarily antagonistic, I am just passionate about well designed and managed infrastructure. I am hopeful that one day HOP may have a place in that where I work. The other thing is that while I am technically adept at many things, I come to this as a novice, so will take what is in the documentation and the provided examples at face value. |
Thanks again for the background information Phil. As a project Apache Hop doesn't really want to dictate a preferred way to set up, use or install. At that same time, the people that built it, decided on some things in the past. Making Apache Hop doing a nested variable resolution here will surely help more than just you and open up more possibilities. |
Created issue #3454 |
Apache Hop version?
2.6.0
Java version?
openjdk version "17.0.8" 2023-07-18 LTS OpenJDK Runtime Environment (Red_Hat-17.0.8.0.7-2.0.1) (build 17.0.8+7-LTS) OpenJDK 64-Bit Server VM (Red_Hat-17.0.8.0.7-2.0.1) (build 17.0.8+7-LTS, mixed mode, sharing)
Operating system
Linux
What happened?
This occurs in both Hop-GUI and Hop-Web clients
Issue Priority
Priority: 3
Issue Component
Component: Hop Gui, Component: Hop Web
The text was updated successfully, but these errors were encountered: