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
Rely on env variable for manageiq-appliance repo directory #4105
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,10 @@ def self.data_directory | |
Pathname.new(ENV.fetch("APPLIANCE_PG_DATA")) | ||
end | ||
|
||
def self.template_directory | ||
Pathname.new(ENV.fetch("APPLIANCE_TEMPLATE_DIRECTORY")) | ||
end | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This feels really weird to have a PostgresAdmin guy reference something in application system files. Just feels like the wrong place for it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I know, PostgresAdmin has been the single areas that fetch ENV variables. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Initially, I was going to make a ruby module on the system side that exposed all of those ENV variables through ruby methods that places like this could call. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where system == manageiq-appliance There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wish the system admin / postgres dba / database ops stuff was pulled out into console / appliance / or separate gem (that could be included) maybe this value would be passed into the gem instead of using a gem. oh well. pipe dream There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree totally @kbrock 😎, just not now There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Detangle one thing at a time There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, we will ignore for now until that new module comes along. |
||
|
||
def self.service_name | ||
ENV.fetch("APPLIANCE_PG_SERVICE") | ||
end | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this right? I feel like this should just be template_directory directly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's pretty complicated but the TEMPLATE directory has stuff laid out as they get applied to /, like a chroot. So, we need to the root of the TEMPLATE directory and the normal PG_DATA directory (postgres_dir) in this case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, but why does PostgresAdmin know about template_directory? Seems like that class should not care about that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed that it is too bad we have to rely upon template directory, but lets not revisit at this time.
Ok, so is the request to move
PostgresAdmin.template_directory
toInternalDatabaseConfiguration
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it's "weird" that PostgresAdmin knows that the templates for postgresql are stored there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It feels like we need a generic template directory on a more generic module/class that these other places can call.