Skip to content
This repository has been archived by the owner on Nov 24, 2021. It is now read-only.

Fixes #21060 - re-factor installer messages to methods #540

Merged
merged 1 commit into from
Oct 4, 2017

Conversation

ehelms
Copy link
Member

@ehelms ehelms commented Sep 22, 2017

No description provided.

@theforeman-bot
Copy link

Issues: #21060


def server_success_message(kafo)
success_message
say " * <%= color('Katello', :info) %> is running at <%= color('#{kafo.param('foreman', 'foreman_url').value}', :info) %>"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to avoid the use of Katello here? Either the application or the interface could work.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean saying Foreman or Application ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you avoid any branded words and use generic descriptions like Application then there's no difference between upstream & downstream which makes life easier.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does, but there are some instances where that is unavoidable such as the commands or package names. I can make as much as possible generic but it won't prevent this situation.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be preferable. With commands I'd prefer a git-style application where you can brand the main binary (foreman-maintain -> satellite-maintain) and subcommands are unbranded. You are correct that in some cases it will be unavoidable but let's aim at minimizing that.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, I'll change as much as I can although I will lastly state that I think moving to generics while making this easier, reduces the user experience.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The more I look at it, this is about the only line we save anything on, and thus its cleaner to just change this to 'Foreman' and leave the rest as is at the risk of just being overly generic and ambigous.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the Foreman is fine.

@ehelms
Copy link
Member Author

ehelms commented Sep 22, 2017

This little bug is related -- theforeman/kafo#223

@mbacovsky
Copy link
Contributor

👍 I tested this along with the kafo and downstream patches and it looks and works well.

As for the making the messages more generic to avoid re-writing them when inherited I lean towards leaving the messages as specific and informative as possible. The reason is to keep the message clean and simple for the user. Also when re-used in different scenario it is likely that more information will be added/changed and it seems more sustainable to have the message less fragmented and replace it as a whole

Copy link
Member

@chris1984 chris1984 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good other than the rubocop errors.

@ehelms
Copy link
Member Author

ehelms commented Oct 2, 2017

@ekohl What say you?

@ehelms
Copy link
Member Author

ehelms commented Oct 2, 2017

Seems this is only failing with the known issue with librarian now.

@ekohl
Copy link
Member

ekohl commented Oct 4, 2017

Looking at theforeman/kafo#223 and https://github.com/theforeman/foreman-installer/blob/develop/hooks/post/10-post_install_message.rb we might need to look at the bigger picture when we want to merge.

On kafo master I'd expect you to get 2 post install messages now: one from the vanilla foreman and one from katello.

Another thing I'm not sure I like is the Kafo::Helpers namespace. That's something in katello-installer but not foreman-installer. Should we provide helpers in kafo to display messages? It could prepare for i18n.

@ehelms
Copy link
Member Author

ehelms commented Oct 4, 2017

I think there a number of things we've invented in kinstaller hooks that could/should be baseline Kafo functionality that one can just use. We've not ever looked at porting it back but should.

We are still safe with that kafo change -- as https://github.com/Katello/katello-installer/blob/master/config/katello.yaml#L19 does not include the foreman-installer hooks.

@ekohl
Copy link
Member

ekohl commented Oct 4, 2017

We are still safe with that kafo change -- as https://github.com/Katello/katello-installer/blob/master/config/katello.yaml#L19 does not include the foreman-installer hooks.

That's a fair point - I was going to solve http://projects.theforeman.org/issues/19986 in theforeman/foreman-installer#250 but I think I'll have to duplicate it in katello-installer then.

@ehelms
Copy link
Member Author

ehelms commented Oct 4, 2017

@ekohl yep, how we've done it so far, once we merge installers we can solve that all once and for all. For now, status quo. Is this good to merge then?

@ehelms ehelms merged commit 0bab463 into Katello:master Oct 4, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants