Planed usability changes for parameters

Hello,
As posted on the user list we are trying to improve the workflows
around parameters usage. The feature team used last sprint to get some
more feedback, mostly through
a survey [1].

Taking the results and the existing tracker bug [2] into consideration
we divided the refactoring into two steps:

First step:

  1. Changing Smart class Parameter/Smart variable UI (without touching
    Global Parameters).
  2. Moving validations and type casting out of lookup key.
  3. Adding the option to hide smart variables values by moving the password
    helper out of global parameters and reusing it.

Second step:

  1. Finishing UI changes for Smart class Parameter/Smart variable.
  2. Merging Smart Variables into Global Parameters which could be attached
    to puppetclass or other objects.
  3. Basic editor for yaml/json values.

All of the expected UI changes can be seen in [3] (thanks to Kyle!).

More significant changes depend on the how these changes are integrated.

Please notify us of any suggestion, comments, objections.
We would like to start working on this next week and would appreciate
feedback so we know we haven't missed anything.

[1] http://goo.gl/forms/7TZoZG2zIC
[2] Tracker #4470: Usability of parameters and overrides - Foreman
[3] https://dl.dropboxusercontent.com/u/5892944/Foreman-Parameters-2015-04-16.pdf
<https://dl.dropboxusercontent.com/u/5892944/Foreman-Parameters-2015-04-16.pdf>

> Hello,
> As posted on the user list we are trying to improve the workflows
> around parameters usage. The feature team used last sprint to get some more
> feedback, mostly through a survey [1].

Can we have a link to the results?

> Taking the results and the existing tracker bug [2] into consideration
> we divided the refactoring into two steps:
>
> First step:
> 1. Changing Smart class Parameter/Smart variable UI (without touching Global
> Parameters).
> 2. Moving validations and type casting out of lookup key.
> 3. Adding the option to hide smart variables values by moving the password
> helper out of global parameters and reusing it.
>
> Second step:
> 1. Finishing UI changes for Smart class Parameter/Smart variable.
> 2. Merging Smart Variables into Global Parameters which could be attached to
> puppetclass or other objects.
> 3. Basic editor for yaml/json values.
>
> All of the expected UI changes can be seen in [3] (thanks to Kyle!).

Some comments based on these slides:

Slide 3: "Global Parameters" is completely separate to class
parameters, and ends up in a different part of the ENC. Thus the
"current workflow" on slide 3 is wrong - the true case is actually as
depicted on slide 4. Global parameters (at any level, be that Host,
Hostgroup, Domain, OS, or Common) are modified independantly of class
paramaters. (EDIT: I see Stephem noticed this too ;P)

Slide 5, Note 2: I agree that Smart Variables is outdated. However,
I'd like to see the multi-type options available to class parameters
(hash, yaml etc) be available in global parameters too, so we should
remove the requrement for smart variables to have a base class, and
instead use the smart variable code paths for global params.

Slide 5, Note 3: How will a user stop the ENC containing a parameter?
That's the function of the override flag (and the use-puppet-default
flag) and they seem to be missing. I don't want that to be a
regression…

Slide 6: Fully agree with moving optional stuff to the end.

Slide 7: I like the wireframe here, class filtering is a good idea.
Note 4: Add Parameter is fairly useless as a button on the Class
Parameter page, as it adds a Global Parameter (unless you're planning
on allowing overrides to be added from this page, which would be
awesome but I suspect a lot of work). We don't see a wireframe for the
Global tab, but if the Source Column is there it should say "Host" not
Custom, as it's a host level parameter (as compared to hostgroup, os,
domain etc)

Slide 8: again we see a conflation of global and class parameters -
the page is called "Global Parameters" but the table contains class
parameters. Whats the intention here? I do like the revamp of the
class parameter display though.

Slide 9: again the conflation - what are class-related fields doing on
a global parameter page?

Overall I think we're going in the right direction (thanks Kyle!), but
I'd like to see either (a) an explanation of the thinking behind the
conflation of global and class params (their separate in the ENC, I'm
not sure I like the idea of blurring that in Foreman), or (b) a
re-examination of the base assumptions (slides 2/3/4) that lead to
this UI, if the conflation was accidental.

··· On 16 April 2015 at 14:44, Ori Rabin wrote:

Hi,

Can you clarify the last two slides? I read it as global parameters
always being attatched to a puppet class or environment. And it seems
like that has some kind of priority in the UI - being that it's
displayed in the index list, and a the top of the form.

That's strictly the Smart Variable case, which I think should be
deprioritized (it's really a leftover from pre-parameterized class
days). Global Parameters the same set of parameters as those on a
Hostgroup, Domain, Organization, Location params - all sprinkled
throughout the UI in various places. Those are never attached to a
puppet class like a smart variable is.

I'd think you should merge those all into a single UI where I can apply
a global parameter and value based on a combination of matchers like:

environment = production
hostname =~ /store.*/
puppetclass = httpd

Where puppetclass is an equal citizen as any other property of the host.
That should be able to replace smart variables cleanly, and make it more
flexible. Does that make sense?

··· On Thu, Apr 16, 2015 at 04:44:53PM +0300, Ori Rabin wrote: > Hello, > As posted on the user list we are trying to improve the workflows > around parameters usage. The feature team used last sprint to get some > more feedback, mostly through > a survey [1]. > > Taking the results and the existing tracker bug [2] into consideration > we divided the refactoring into two steps: > > First step: > 1. Changing Smart class Parameter/Smart variable UI (without touching > Global Parameters). > 2. Moving validations and type casting out of lookup key. > 3. Adding the option to hide smart variables values by moving the password > helper out of global parameters and reusing it. > > Second step: > 1. Finishing UI changes for Smart class Parameter/Smart variable. > 2. Merging Smart Variables into Global Parameters which could be attached > to puppetclass or other objects. > 3. Basic editor for yaml/json values. > > All of the expected UI changes can be seen in [3] (thanks to Kyle!). > > More significant changes depend on the how these changes are integrated. > > Please notify us of any suggestion, comments, objections. > We would like to start working on this next week and would appreciate > feedback so we know we haven't missed anything. > > [1] http://goo.gl/forms/7TZoZG2zIC > [2] http://projects.theforeman.org/issues/4470 > [3] *https://dl.dropboxusercontent.com/u/5892944/Foreman-Parameters-2015-04-16.pdf > * > > -- > You received this message because you are subscribed to the Google Groups "foreman-dev" group. > To unsubscribe from this group and stop receiving emails from it, send an email to foreman-dev+unsubscribe@googlegroups.com. > For more options, visit https://groups.google.com/d/optout.


Best Regards,

Stephen Benjamin
Red Hat Engineering

Thanks for all the comments,
I answered below, I hope it makes more sense.

> > Hello,
> > As posted on the user list we are trying to improve the workflows
> > around parameters usage. The feature team used last sprint to get some
> more
> > feedback, mostly through a survey [1].
>
> Can we have a link to the results?
>
When we have a full summery I'll send it here.

>
> > Taking the results and the existing tracker bug [2] into consideration
> > we divided the refactoring into two steps:
> >
> > First step:
> > 1. Changing Smart class Parameter/Smart variable UI (without touching
> Global
> > Parameters).
> > 2. Moving validations and type casting out of lookup key.
> > 3. Adding the option to hide smart variables values by moving the
> password
> > helper out of global parameters and reusing it.
> >
> > Second step:
> > 1. Finishing UI changes for Smart class Parameter/Smart variable.
> > 2. Merging Smart Variables into Global Parameters which could be
> attached to
> > puppetclass or other objects.
> > 3. Basic editor for yaml/json values.
> >
> > All of the expected UI changes can be seen in [3] (thanks to Kyle!).
>
> Some comments based on these slides:
>
> Slide 3: "Global Parameters" is completely separate to class
> parameters, and ends up in a different part of the ENC. Thus the
> "current workflow" on slide 3 is wrong - the true case is actually as
> depicted on slide 4. Global parameters (at any level, be that Host,
> Hostgroup, Domain, OS, or Common) are modified independantly of class
> paramaters. (EDIT: I see Stephem noticed this too ;P)

> Slide 5, Note 2: I agree that Smart Variables is outdated. However,
> I'd like to see the multi-type options available to class parameters
> (hash, yaml etc) be available in global parameters too, so we should
> remove the requrement for smart variables to have a base class, and
> instead use the smart variable code paths for global params.
>

That is what we wanted and it can be seen on the last slide in global
parameters.
The connection to puppetclass on slide 3 and the two last slides should be
removed.
These are leftovers from smart variables as they look today and shouldn't
have been shown
in global parameters, thanks for noticing.

>
> Slide 5, Note 3: How will a user stop the ENC containing a parameter?
> That's the function of the override flag (and the use-puppet-default
> flag) and they seem to be missing. I don't want that to be a
> regression…
>

The reasoning was that use puppet default prevents from sending the default
and also checking if the user changes the default or not.
The only issue is the default, if overrides where added it's as if the
override checkbox was clicked.
Maybe this should be in the next step of changes and not right away,
the idea was to eliminate the need for the override all button and maybe
get some unexpected results.

>
> Slide 6: Fully agree with moving optional stuff to the end.
>
> Slide 7: I like the wireframe here, class filtering is a good idea.
> Note 4: Add Parameter is fairly useless as a button on the Class
> Parameter page, as it adds a Global Parameter (unless you're planning
> on allowing overrides to be added from this page, which would be
> awesome but I suspect a lot of work). We don't see a wireframe for the
> Global tab, but if the Source Column is there it should say "Host" not
> Custom, as it's a host level parameter (as compared to hostgroup, os,
> domain etc)
>

I agree, the button should be moved to Global Parameter and it can say host.
The hostgroup there should show these parameters were inherited from the
hostgroup.
I guess we should change it to inherited or maybe just add them as normal
class parameters
and in the additional info put a comment about it.

>
> Slide 8: again we see a conflation of global and class parameters -
> the page is called "Global Parameters" but the table contains class
> parameters. Whats the intention here? I do like the revamp of the
> class parameter display though.

> Slide 9: again the conflation - what are class-related fields doing on
> a global parameter page?
>

I responded to both above - this wasn't the intention and it will be fixed.

>
> Overall I think we're going in the right direction (thanks Kyle!), but
> I'd like to see either (a) an explanation of the thinking behind the
> conflation of global and class params (their separate in the ENC, I'm
> not sure I like the idea of blurring that in Foreman), or (b) a
> re-examination of the base assumptions (slides 2/3/4) that lead to
> this UI, if the conflation was accidental.
>

They will be separate. I'll try to explain the parts of global parameters
that are missing from the wireframes.
The reasoning was to merge smart variables and global parameters.
We want to keep the global parameters functionality (adding it from
domain/os… and now from puppetclass)
and the smart variable backend (without the connection to puppetclass that
shouldn't be there).
Instead of the current STI for parameters we want the meaning of adding a
global parameter to be
adding another matcher. Instead of adding a DomainParameter just add a
domain=example.com matcher
to a global parameter. All the existing parameters will be migrated into
matchers for a global parameter.

··· On Thu, Apr 16, 2015 at 6:38 PM, Greg Sutcliffe wrote: > On 16 April 2015 at 14:44, Ori Rabin wrote:


You received this message because you are subscribed to the Google Groups
"foreman-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

>> Can we have a link to the results?
>
> When we have a full summery I'll send it here.

Fair enough, but how do you know whwn it's done? I was expecting a
link to the poll results on completing the survey myself, thats all :wink:

>> Slide 5, Note 3: How will a user stop the ENC containing a parameter?
>> That's the function of the override flag (and the use-puppet-default
>> flag) and they seem to be missing. I don't want that to be a
>> regression…
>
> The reasoning was that use puppet default prevents from sending the default
> and also checking if the user changes the default or not.
> The only issue is the default, if overrides where added it's as if the
> override checkbox was clicked.
> Maybe this should be in the next step of changes and not right away,
> the idea was to eliminate the need for the override all button and maybe get
> some unexpected results.

I don't quite follow. There are three sceanrios:

  1. Don't mess with the class parameter at all - no line should ever
    appear in the ENC
  2. Provide a default, perhaps with overrides for various matchers
  3. Don't use a default (not present in the ENC normally), but do use
    matchers for specifics

I agree that if you add matchers, then you know the difference between
2 or 3, based on the presence of a default. However, without matchers
(most common case, since on import of a new class, you'll have every
class parameter with no matchers), then you cannot tell the difference
between 1 and 2/3 because most class parameters come with a default.
You need the override flag so that the user can mark which parameters
He's interested in.

What you're suggesting seems to be a reversal of the default
behaviour - that parameters are assumed to be case 2/3 unless the user
explicitly goes and ticks use Puppet Default. The problem with that is
that most people only care about one or two parameters, and don't want
to edit the other 18 parameters in the class, just to use it.

Or did I miss something? :slight_smile:

>> Slide 6: Fully agree with moving optional stuff to the end.
>>
>> Slide 7: I like the wireframe here, class filtering is a good idea.
>> Note 4: Add Parameter is fairly useless as a button on the Class
>> Parameter page, as it adds a Global Parameter (unless you're planning
>> on allowing overrides to be added from this page, which would be
>> awesome but I suspect a lot of work). We don't see a wireframe for the
>> Global tab, but if the Source Column is there it should say "Host" not
>> Custom, as it's a host level parameter (as compared to hostgroup, os,
>> domain etc)
>
>
> I agree, the button should be moved to Global Parameter and it can say host.
> The hostgroup there should show these parameters were inherited from the
> hostgroup.
> I guess we should change it to inherited or maybe just add them as normal
> class parameters
> and in the additional info put a comment about it.

When you say "maybe just add them as normal class parameters" do you
just mean merging the two tabs and display them together? Anything
else sounds like you want to use class parameter code paths here,
which is incorrect I think.

If you do just mean merging the tabs, that's fine - I like the current
wireframes, but a single tab is what we see today on the Host#edit
page, so either is fine.

>> Slide 8: …
>> Slide 9: …
>
> I responded to both above - this wasn't the intention and it will be fixed

Cool, thats fine. Just checking up on you :wink:

>> Overall I think we're going in the right direction (thanks Kyle!), but
>> I'd like to see either (a) an explanation of the thinking behind the
>> conflation of global and class params (their separate in the ENC, I'm
>> not sure I like the idea of blurring that in Foreman), or (b) a
>> re-examination of the base assumptions (slides 2/3/4) that lead to
>> this UI, if the conflation was accidental.
>
> They will be separate. I'll try to explain the parts of global parameters
> that are missing from the wireframes.
> The reasoning was to merge smart variables and global parameters.
> We want to keep the global parameters functionality (adding it from
> domain/os… and now from puppetclass)
> and the smart variable backend (without the connection to puppetclass that
> shouldn't be there).
> Instead of the current STI for parameters we want the meaning of adding a
> global parameter to be
> adding another matcher. Instead of adding a DomainParameter just add a
> domain=example.com matcher
> to a global parameter. All the existing parameters will be migrated into
> matchers for a global parameter.

That makes a lot of sense - I've wanted to see smart-variable style
functionality for basic parameters for a long time.

So you're basically saying that we can add parameters (now actually
matchers) on the Host/Group/OS/Domain pages just like we always used
to, but the Common Parameters page will now look very like the Class
Edit page, with a left pane for selecting each common parameter, and
the right pane displaying the default/matchers? I like that. I like
that a lot :slight_smile:

Greg

··· On 19 April 2015 at 09:57, Ori Rabin wrote:

> >> Can we have a link to the results?
> >
> > When we have a full summery I'll send it here.
>
> Fair enough, but how do you know whwn it's done? I was expecting a
> link to the poll results on completing the survey myself, thats all :wink:
>
> >> Slide 5, Note 3: How will a user stop the ENC containing a parameter?
> >> That's the function of the override flag (and the use-puppet-default
> >> flag) and they seem to be missing. I don't want that to be a
> >> regression…
> >
> > The reasoning was that use puppet default prevents from sending the
> default
> > and also checking if the user changes the default or not.
> > The only issue is the default, if overrides where added it's as if the
> > override checkbox was clicked.
> > Maybe this should be in the next step of changes and not right away,
> > the idea was to eliminate the need for the override all button and maybe
> get
> > some unexpected results.
>
> I don't quite follow. There are three sceanrios:
>
> 1) Don't mess with the class parameter at all - no line should ever
> appear in the ENC
> 2) Provide a default, perhaps with overrides for various matchers
> 3) Don't use a default (not present in the ENC normally), but do use
> matchers for specifics
>
> I agree that if you add matchers, then you know the difference between
> 2 or 3, based on the presence of a default. However, without matchers
> (most common case, since on import of a new class, you'll have every
> class parameter with no matchers), then you cannot tell the difference
> between 1 and 2/3 because most class parameters come with a default.
> You need the override flag so that the user can mark which parameters
> He's interested in.
>
> What you're suggesting seems to be a reversal of the default
> behaviour - that parameters are assumed to be case 2/3 unless the user
> explicitly goes and ticks use Puppet Default. The problem with that is
> that most people only care about one or two parameters, and don't want
> to edit the other 18 parameters in the class, just to use it.
>
> Or did I miss something? :slight_smile:
>
The parameter will only be overridden if you change the default or add a
matcher.
If you don't change the default the parameter will not appear in the ENC.
This will be part of the second step of changes since I would like to get
some more feedback about the workflow.

>
> >> Slide 6: Fully agree with moving optional stuff to the end.
> >>
> >> Slide 7: I like the wireframe here, class filtering is a good idea.
> >> Note 4: Add Parameter is fairly useless as a button on the Class
> >> Parameter page, as it adds a Global Parameter (unless you're planning
> >> on allowing overrides to be added from this page, which would be
> >> awesome but I suspect a lot of work). We don't see a wireframe for the
> >> Global tab, but if the Source Column is there it should say "Host" not
> >> Custom, as it's a host level parameter (as compared to hostgroup, os,
> >> domain etc)
> >
> >
> > I agree, the button should be moved to Global Parameter and it can say
> host.
> > The hostgroup there should show these parameters were inherited from the
> > hostgroup.
> > I guess we should change it to inherited or maybe just add them as normal
> > class parameters
> > and in the additional info put a comment about it.
>
> When you say "maybe just add them as normal class parameters" do you
> just mean merging the two tabs and display them together? Anything
> else sounds like you want to use class parameter code paths here,
> which is incorrect I think.
>
> If you do just mean merging the tabs, that's fine - I like the current
> wireframes, but a single tab is what we see today on the Host#edit
> page, so either is fine.
>
Looking at the wireframes again I think that part in unnecessary.
I meant there are two possibilities for how to interpret the hostgroup
parameters from the wireframes:

  1. All the parameters that are inherited from the hostgroup
  2. global parameters matching the host's hostgroup

If you think of 1 there is no reason to add them separately,
since they are just like the parameters added from the puppetclasses
directly connected to the host (that's what I meant by normal).
Option 2 is what should be correct so again no reason to separate them from
the global parameters.

>
> >> Slide 8: …
> >> Slide 9: …
> >
> > I responded to both above - this wasn't the intention and it will be
> fixed
>
> Cool, thats fine. Just checking up on you :wink:
>
> >> Overall I think we're going in the right direction (thanks Kyle!), but
> >> I'd like to see either (a) an explanation of the thinking behind the
> >> conflation of global and class params (their separate in the ENC, I'm
> >> not sure I like the idea of blurring that in Foreman), or (b) a
> >> re-examination of the base assumptions (slides 2/3/4) that lead to
> >> this UI, if the conflation was accidental.
> >
> > They will be separate. I'll try to explain the parts of global parameters
> > that are missing from the wireframes.
> > The reasoning was to merge smart variables and global parameters.
> > We want to keep the global parameters functionality (adding it from
> > domain/os… and now from puppetclass)
> > and the smart variable backend (without the connection to puppetclass
> that
> > shouldn't be there).
> > Instead of the current STI for parameters we want the meaning of adding a
> > global parameter to be
> > adding another matcher. Instead of adding a DomainParameter just add a
> > domain=example.com matcher
> > to a global parameter. All the existing parameters will be migrated into
> > matchers for a global parameter.
>
> That makes a lot of sense - I've wanted to see smart-variable style
> functionality for basic parameters for a long time.
>
> So you're basically saying that we can add parameters (now actually
> matchers) on the Host/Group/OS/Domain pages just like we always used
> to, but the Common Parameters page will now look very like the Class
> Edit page, with a left pane for selecting each common parameter, and
> the right pane displaying the default/matchers? I like that. I like
> that a lot :slight_smile:
>
That's what we're aiming for :slight_smile:

··· On Mon, Apr 20, 2015 at 10:05 PM, Greg Sutcliffe wrote: > On 19 April 2015 at 09:57, Ori Rabin wrote:

Greg


You received this message because you are subscribed to the Google Groups
"foreman-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.