----- Original Message -----
> From: ssht...@redhat.com
> To: "foreman-dev" <foreman-dev@googlegroups.com>
> Sent: Sunday, November 6, 2016 3:34:40 AM
> Subject: Re: Re: Creating a plugin-for-tests (was [foreman-dev] Plugin test 
> failures)
> 
> +1 for Daniel.
> 
> IMHO most of the breakages that I saw were related to changes in the code
> that were not "officially declared" as API. Good examples are
> alias_method_chain for various methods.

The wiki says that public methods will be deprecated and given a chance
to adjust our code in a reasonable time where possible:

    "Foreman will always strive to make no incompatible changes in a minor 
release, but be prepared
    to make updates on major releases. Where possible, deprecation warnings 
will be added for old
    public methods before their removal. Warnings will be issued for two major 
releases and then the
    old method removed in the third release, giving plenty of time to update 
plugins."

I read that as being quasi-official to be able to do alias_method_chain on
public methods, but very often - nearly always - they are not deprecated and
the signature just changes or maybe the method is even removed. It constantly 
breaks
my plugin.

The last time I had test green, they were green for ONE DAY.  There's no 
consideration
at all for changes to Foreman's public methods.

And the plugin API (which itself is a mess given it grows organically and ad 
hoc instead
of some team spending time to get it right) is pretty limited if you want
to add on to Foreman objects.

Being a plugin maintainer really sucks.



- Stephen


> 
> On Friday, November 4, 2016 at 1:48:13 PM UTC+2, Daniel Lobato wrote:
> >
> > On 11/03, Greg Sutcliffe wrote:
> > > 
> > > 
> > > > You should file a bug against Foreman immediately if you see that a
> > > > plugin interface has been broken, so we can ensure the change isn't
> > > > released and a fix can be written.
> > > > 
> > > 
> > > Fair enough - in this case it's an interface that wasn't tested and a
> > user
> > > has found
> > > it subsequently (#17203 in set_hostgroup_defaults), so I think the
> > > not-releasing-it
> > > option is gone. I'll open an issue to write some tests for that
> > interface,
> > > though.
> > > 
> > > More generally, does it make sense for someone to do an audit of the
> > most
> > > common
> > > places that plugins hook in, and make sure we have tests for them?
> >
> > The 'problem' is that the places plugins hook in are usually parts of
> > the app, e.g 'Host.foo', 'computeresource.bar'. The defined endpoints
> > for the plugin API are usually fine, but other methods that are equally
> > as important to the plugin could change behavior unexpectedly.
> >
> > Personally I think from core the important part is being aware of these
> > changes and communicating them promptly - helping to fix them when
> > possible too.
> >
> > > 
> > > Cheers
> > > 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...@googlegroups.com <javascript:>.
> > > 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&search=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.
> 

-- 
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.

Reply via email to