Re: [foreman-dev] Webpack merged into develop branch

2016-08-19 Thread Stephen Benjamin


- Original Message -
> From: "Stephen Benjamin" 
> To: foreman-dev@googlegroups.com
> Sent: Friday, August 19, 2016 7:29:21 AM
> Subject: Re: [foreman-dev] Webpack merged into develop branch
> 
> 
> 
> - Original Message -
> > From: "Greg Sutcliffe" 
> > To: "Foreman" 
> > Sent: Friday, August 19, 2016 4:24:17 AM
> > Subject: Re: [foreman-dev] Webpack merged into develop branch
> > 
> > On 19 August 2016 at 07:26, Daniel Lobato  wrote:
> > 
> > > I'm not sure why - but I also can reproduce this.
> > >
> > > It seems like having `foreman_templates` on your list of plugins is
> > > what's
> > > causing this. I don't really know why yet but I don't get the error
> > > without
> > > that plugin, and I get it the moment I put it in bundler.d
> > >
> > 
> > I know I haven't updated templates for this: https://groups.google.com/d/
> > topic/foreman-dev/MFW1bAj-eFk/discussion (hit that myself last night). Not
> > the same error, but possibly related. I'll push that change to
> > templates/develop today and hopefully it'll help.
> > 
> 
> Thank you, that was it. foreman_chef wasn't updated for that.
> 
> 
> - Stephen

Well, sort of.  Now none of the menus, dropdowns etc work.  There's plenty
of errors in the JS console like this:

  ReferenceError: $ is not defined editable_form.self.js:5:5
  ReferenceError: jQuery is not defined

I've tried cleaning out the node_modules dir and reinstalled, and trying 
webpack:compile with the server off, and it doesn't help.


- Stephen


-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [foreman-dev] Webpack merged into develop branch

2016-08-19 Thread Stephen Benjamin


- Original Message -
> From: "Greg Sutcliffe" 
> To: "Foreman" 
> Sent: Friday, August 19, 2016 4:24:17 AM
> Subject: Re: [foreman-dev] Webpack merged into develop branch
> 
> On 19 August 2016 at 07:26, Daniel Lobato  wrote:
> 
> > I'm not sure why - but I also can reproduce this.
> >
> > It seems like having `foreman_templates` on your list of plugins is what's
> > causing this. I don't really know why yet but I don't get the error without
> > that plugin, and I get it the moment I put it in bundler.d
> >
> 
> I know I haven't updated templates for this: https://groups.google.com/d/
> topic/foreman-dev/MFW1bAj-eFk/discussion (hit that myself last night). Not
> the same error, but possibly related. I'll push that change to
> templates/develop today and hopefully it'll help.
> 

Thank you, that was it. foreman_chef wasn't updated for that.


- Stephen

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [foreman-dev] Extending the host's otp field for Active Directory offline join

2016-08-19 Thread Dominic Cleal
On 19/08/16 10:43, Andreas Rogge wrote:
> Hello Everyone,
> 
> we're looking into deploying Windows workstations and servers with 
> theforeman.
> Happily there's already something that supports realms (right now only 
> FreeIPA). Having had a look at the API I guess it should be quite 
> straightforward to add another provider for Active Directory using DJoin 
> (the Active Directoy Offline Join tool).
> The only issue I see is that the host's otp field in the database is 
> limited to 255 chars whereas DJoin produces a quite large base64 encoded 
> blob.
> As the length of that blob is not documented anywhere I guess it may 
> differ from domain to domain and from Windows version to Windows version.
> 
> So here's my request: can we please upgrade the host's otp field to 
> store an arbitrary length string?

Sure, it's best if you just submit a new database migration to Foreman
to fix it. There are examples of DB migrations in db/migrate/, e.g.
db/migrate/20120607074318_convert_params_to_text.rb which changes some
columns to text types.

https://theforeman.org/contribute.html has info on submitting pull
requests, and installing a dev environment to try it in.

http://guides.rubyonrails.org/active_record_migrations.html#creating-a-standalone-migration
has more information on database migrations in Rails.

-- 
Dominic Cleal
domi...@cleal.org

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: OpenPGP digital signature


Re: Re: [foreman-dev] Hash rocket syntax

2016-08-19 Thread Daniel Lobato Garcia
On 08/19, Lukas Zapletal wrote:
> > As discussed on IRC yesterday there should be consistency and there is an
> > option to autofix with rubocop if the style is changed to change existing
> > code with less effort.
>
> TL;DR - Let's keep Rubocop away from rockethash thing.
>
> What the consistency gives us? We all know there are two ways and both
> will work. Let's avoid big bangs that will make cherry picking harder
> and just let's slowly improve as the time goes on.

Not sure what cherry-picking becomes harder after this change? It's just
that people might have to rebase their PRs? That's a small price to pay
considering code is read 1000x more often than written.

> I see no point in changing a single line of code from old to new syntax
> just for that. We should only change it when changing logic.
>
> Even if Rubocop is able to check only for changed lines, I won't like
> that at all. I do not want to switch my brain between Smart Proxy and
> Foreman Core codebases. Both ways should work and be accepted. Let's
> only make the old syntax preferable when reviewing and that's it.

Precisely that's the painpoint, reviewers shouldn't have to pay
attention to that. One of the points for having style guidelines is that
the code looks and reads as if it had been written by one person.

Think of it from the POV of the ocassional contributor who is just
confused about which syntax to use because the code mixes them both for
no reason.

> I think we implemented Rubocop far beyond what's reasonable point. It
> make sense for dangerous constructs, but not in this case (and few
> others).

I'd argue the opposite, in foreman_docker or foreman_ansible I think
rubocop (with *all* cops enabled) helped maintain good coding standards
immensely and making the project *much easier* to read and get used to.

Again I think we're really bikeshedding when the purpose of a style
guide is to stop it and make code look more homogeneous

>
> --
> Later,
>  Lukas #lzap Zapletal
>
> --
> 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+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

--
Daniel Lobato Garcia

@dLobatog
blog.daniellobato.me
daniellobato.me

GPG: http://keys.gnupg.net/pks/lookup?op=get=0x7A92D6DD38D6DE30
Keybase: https://keybase.io/elobato

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: PGP signature


[foreman-dev] Extending the host's otp field for Active Directory offline join

2016-08-19 Thread Andreas Rogge

Hello Everyone,

we're looking into deploying Windows workstations and servers with 
theforeman.
Happily there's already something that supports realms (right now only 
FreeIPA). Having had a look at the API I guess it should be quite 
straightforward to add another provider for Active Directory using DJoin 
(the Active Directoy Offline Join tool).
The only issue I see is that the host's otp field in the database is 
limited to 255 chars whereas DJoin produces a quite large base64 encoded 
blob.
As the length of that blob is not documented anywhere I guess it may 
differ from domain to domain and from Windows version to Windows version.


So here's my request: can we please upgrade the host's otp field to 
store an arbitrary length string?


What do you think?

Kind Regards,
Andreas

--
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.