Infra scripting style guide proposal

David Caro dcaroest at redhat.com
Tue Mar 11 11:46:38 UTC 2014


On Tue 11 Mar 2014 10:41:47 AM CET, Ewoud Kohl van Wijngaarden wrote:
> I strongly feel the wiki page name should reflect that it is for infra.
> The current name is very generic and leads to assuptions that it's for
> the entire project. And you know what happens when you assume[1].

Agree, I'll change it, it's not clear is for infra at first sight (it 
says so in the first lines, but in the title would make it a lot 
clearer).

>
> Other than that, I agree with you.
>
> [1]: https://xkcd.com/1339/

hehehehe, good one xd

>
> On Tue, Mar 11, 2014 at 04:35:11AM -0400, David Caro Estevez wrote:
>> Correct.
>>
>> It seems that ovirt is targeted also to non-gnu oses (in the future I suppose) so portability inside the product is an issue, thus making the strict POSIX standard the appropriate tool. I'm not sure if there's any milestone set for that, but as I see it, is quite far, as I've been more than one year in the project, and we haven't got out of redhat based distributions, I see really hard to support non-gnu oses but if that's what was decided, let's go for it.
>>
>> But for any script we use to maintain the infrastructure of the project, from running a jenkins job, to creating repositories or adding a nagios check, we don't need to limit ourselves with POSIX, so we can benefit from the whole range of advantages and features bash offers and that gives us easy to write and easy to read scripts, making it easier to maintain and debug.
>>
>> ----- Original Message -----
>>> From: "Kiril Nesenko" <knesenko at redhat.com>
>>> To: "Eli Mesika" <emesika at redhat.com>
>>> Cc: "David Caro" <dcaroest at redhat.com>, "infra" <infra at ovirt.org>
>>> Sent: Tuesday, March 11, 2014 9:11:28 AM
>>> Subject: Re: Infra scripting style guide proposal
>>>
>>>
>>>
>>> ----- Original Message -----
>>>> From: "Eli Mesika" <emesika at redhat.com>
>>>> To: "David Caro" <dcaroest at redhat.com>
>>>> Cc: "infra" <infra at ovirt.org>
>>>> Sent: Tuesday, March 11, 2014 1:32:40 AM
>>>> Subject: Re: Infra scripting style guide proposal
>>>>
>>>>
>>>>
>>>> ----- Original Message -----
>>>>> From: "David Caro" <dcaroest at redhat.com>
>>>>> To: "infra" <infra at ovirt.org>
>>>>> Sent: Monday, March 10, 2014 9:17:13 PM
>>>>> Subject: Infra scripting style guide proposal
>>>>>
>>>>> Hi everyone,
>>>>>
>>>>> Following the discussion thread and seeing that there's no more input
>>>>> there,
>>>>> I'd
>>>>> like to propose this style guide:
>>>>>
>>>>> http://www.ovirt.org/Bash_style_guide
>>>>>
>>>>> As standard for our infrastructure scripts and guideline when reviewing
>>>>> scripts.
>>>>>
>>>>> All the infra members please review the style guide and answer this email
>>>>> with
>>>>> your vote (+1 I like it, 0 I don't mind, -1 It has to change), if -1, add
>>>>> also a
>>>>> description of the problems you see so we can work on them.
>>>>
>>>> Hi David
>>>> First of all thanks for your efforts in writing that, I am certainly for
>>>> standards.
>>>> However, I feel that we have to decide what kind of scripts we want to
>>>> write.
>>>> Alon (Bar Lev), for example , is for removing what he is calling 'bashisem'
>>>> from the infra code, lately we had turned all dbscripts/dbutils code from
>>>> bash to POSIX.
>>>> So, I think that we should decide first on the direction ('to bash or not
>>>> to
>>>> bash, this is the question')
>>>> Otherwise, we are left with a bunch of scripts, each written differently,
>>>> and
>>>> even if each has its code style guidelines, I believe that it makes our
>>>> development environment harder to maintain and more buggy ...
>>>
>>> Hello Eli,
>>>
>>> Scripts that are going to be shipped with the product should be written in
>>> POSIX shell and this is correct.
>>> But here we are talking about scripts that we (infra team) are going to use
>>> to maintain our infrastructure - so there should be no problem to use bash
>>> here,
>>> since those scripts wont be shipped with the product.
>>>
>>> - Kiril
>>>>
>>>>
>>>>>
>>>>> All the non-infra people, you are welcome to vote also and give input,
>>>>> but
>>>>> your
>>>>> single vote will not be decisive.
>>>>>
>>>>> I'll close the voting next monday if no changes to the Style guide are
>>>>> proposed.
>>>>>
>>>>> Thanks!
>>>>>
>>>>> dcaro +1
>>>>>
>>>>> --
>>>>> David Caro
>>>>>
>>>>> Red Hat S.L.
>>>>> Continuous Integration Engineer - EMEA ENG Virtualization R&D
>>>>>
>>>>> Email: dcaro at redhat.com
>>>>> Web: www.redhat.com
>>>>> RHT Global #: 82-62605
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Infra mailing list
>>>>> Infra at ovirt.org
>>>>> http://lists.ovirt.org/mailman/listinfo/infra
>>>>>
>>>> _______________________________________________
>>>> Infra mailing list
>>>> Infra at ovirt.org
>>>> http://lists.ovirt.org/mailman/listinfo/infra
>>>>
>>>
>> _______________________________________________
>> Infra mailing list
>> Infra at ovirt.org
>> http://lists.ovirt.org/mailman/listinfo/infra
> _______________________________________________
> Infra mailing list
> Infra at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/infra



--
David Caro

Red Hat S.L.
Continuous Integration Engineer - EMEA ENG Virtualization R&D

Email: dcaro at redhat.com
Web: www.redhat.com
RHT Global #: 82-62605

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.ovirt.org/pipermail/infra/attachments/20140311/2ad049a6/attachment.sig>


More information about the Infra mailing list