You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficcontrol.apache.org by ocket 8888 <oc...@gmail.com> on 2021/04/13 17:15:37 UTC
Scripting guidelines/suggestions
I was thinking about adding a section to CONTRIBUTING.md and/or the
development docs that suggests Python as the language to use for scripts
that are too complex for bash but don't need the performance afforded by a
compiled language - any objections?
Re: [EXTERNAL] Scripting guidelines/suggestions
Posted by Jeremy Mitchell <mi...@gmail.com>.
I suppose let's just build up a library of scripts (many that are converted
from perl) written in python and then it should be pretty obvious what the
preference is but won't preclude people from taking a different route that
may suit their needs better.
On Wed, Apr 14, 2021 at 1:23 PM Rawlin Peters <ra...@apache.org> wrote:
> > It's really just meant to be a suggestion.
>
> Right, I'm just worried about the tendency of codified suggestions to
> become rules/requirements (or be wielded as such) later on.
>
> - Rawlin
>
> On Wed, Apr 14, 2021 at 1:06 PM ocket 8888 <oc...@gmail.com> wrote:
> >
> > > requiring
> >
> > I would never
> >
> > It's really just meant to be a suggestion. If that seems like it would
> > sound like a requirement, we shouldn't put it in. That wasn't the
> intention.
> >
> > I really don't feel strongly about this, personally. It's just something
> > that came up in the WG meeting and I volunteered to talk about it on the
> > list.
> >
> > On Wed, Apr 14, 2021 at 9:56 AM Rawlin Peters <ra...@apache.org> wrote:
> >
> > > I don't think we should really make any kind of language suggestions
> > > in the project. While I agree Python should be considered for scripts
> > > that are too complex for Bash, there may be other reasons where it
> > > would make more sense for it to be written in Go or some other
> > > compiled language. For instance, `db/admin.pl` was replaced with Go
> > > instead of Python because we didn't want to add internet dependencies
> > > during installation and wanted a single static binary to include in
> > > the rpm. For those reasons, Go was the best tool for the job, and we
> > > should always try to use the best tool for the job rather than
> > > requiring everyone to use a specific tool.
> > >
> > > - Rawlin
> > >
> > > On Wed, Apr 14, 2021 at 8:50 AM ocket 8888 <oc...@gmail.com>
> wrote:
> > > >
> > > > > What would that be for?
> > > >
> > > > Not much, to be honest. Just a suggestion. I also see I didn't
> mention
> > > this
> > > > originally, but the suggestion is also intended to specifically
> mention
> > > > Python as a good choice for when rewriting old scripts from Perl.
> > > >
> > > > > From the homepage of the project, you can see what languages are
> > > > leveraged and realize that by picking something else you run the
> risk of
> > > > having your PR rejected for unmaintainability
> > > >
> > > > Sort of. If you looked a month ago using that decision-making process
> > > you'd
> > > > maybe conclude you should write your scripts in Perl. If you look
> today,
> > > > you'll see:
> > > > -
> > > > - * Go 55.3% <https://github.com/apache/trafficcontrol/search?l=go>
> > > > - * <https://github.com/apache/trafficcontrol/search?l=go>JavaScript
> > > 12.2%
> > > > <https://github.com/apache/trafficcontrol/search?l=javascript>
> > > > <https://github.com/apache/trafficcontrol/search?l=java>
> > > > - * Java 9.0% <
> https://github.com/apache/trafficcontrol/search?l=java>
> > > > - * HTML 7.2% <
> https://github.com/apache/trafficcontrol/search?l=html>
> > > > - <https://github.com/apache/trafficcontrol/search?l=typescript>*
> > > TypeScript
> > > > 4.3% <https://github.com/apache/trafficcontrol/search?l=typescript>
> > > > - <https://github.com/apache/trafficcontrol/search?l=shell>* Shell
> 3.4%
> > > > <https://github.com/apache/trafficcontrol/search?l=shell>
> > > > * Other 8.6%
> > > > <https://github.com/apache/trafficcontrol/search?l=shell>
> > > >
> > > > So you wouldn't see Python anywhere on that list
> > > >
> > > > On Tue, Apr 13, 2021 at 11:35 AM Gray, Jonathan
> > > > <Jo...@comcast.com.invalid> wrote:
> > > >
> > > > > What would that be for? The project should accept useful
> additions in
> > > any
> > > > > maintainable language already. From the homepage of the project,
> you
> > > can
> > > > > see what languages are leveraged and realize that by picking
> something
> > > else
> > > > > you run the risk of having your PR rejected for
> unmaintainability. In
> > > > > those cases, sharing links to the scripts are still useful on the
> > > mailing
> > > > > lists, but simply wouldn't be merged.
> > > > >
> > > > > Jonathan G
> > > > >
> > > > > On 4/13/21, 11:16 AM, "ocket 8888" <oc...@gmail.com> wrote:
> > > > >
> > > > > I was thinking about adding a section to CONTRIBUTING.md
> and/or the
> > > > > development docs that suggests Python as the language to use
> for
> > > > > scripts
> > > > > that are too complex for bash but don't need the performance
> > > afforded
> > > > > by a
> > > > > compiled language - any objections?
> > > > >
> > > > >
> > >
>
Re: [EXTERNAL] Scripting guidelines/suggestions
Posted by Rawlin Peters <ra...@apache.org>.
> It's really just meant to be a suggestion.
Right, I'm just worried about the tendency of codified suggestions to
become rules/requirements (or be wielded as such) later on.
- Rawlin
On Wed, Apr 14, 2021 at 1:06 PM ocket 8888 <oc...@gmail.com> wrote:
>
> > requiring
>
> I would never
>
> It's really just meant to be a suggestion. If that seems like it would
> sound like a requirement, we shouldn't put it in. That wasn't the intention.
>
> I really don't feel strongly about this, personally. It's just something
> that came up in the WG meeting and I volunteered to talk about it on the
> list.
>
> On Wed, Apr 14, 2021 at 9:56 AM Rawlin Peters <ra...@apache.org> wrote:
>
> > I don't think we should really make any kind of language suggestions
> > in the project. While I agree Python should be considered for scripts
> > that are too complex for Bash, there may be other reasons where it
> > would make more sense for it to be written in Go or some other
> > compiled language. For instance, `db/admin.pl` was replaced with Go
> > instead of Python because we didn't want to add internet dependencies
> > during installation and wanted a single static binary to include in
> > the rpm. For those reasons, Go was the best tool for the job, and we
> > should always try to use the best tool for the job rather than
> > requiring everyone to use a specific tool.
> >
> > - Rawlin
> >
> > On Wed, Apr 14, 2021 at 8:50 AM ocket 8888 <oc...@gmail.com> wrote:
> > >
> > > > What would that be for?
> > >
> > > Not much, to be honest. Just a suggestion. I also see I didn't mention
> > this
> > > originally, but the suggestion is also intended to specifically mention
> > > Python as a good choice for when rewriting old scripts from Perl.
> > >
> > > > From the homepage of the project, you can see what languages are
> > > leveraged and realize that by picking something else you run the risk of
> > > having your PR rejected for unmaintainability
> > >
> > > Sort of. If you looked a month ago using that decision-making process
> > you'd
> > > maybe conclude you should write your scripts in Perl. If you look today,
> > > you'll see:
> > > -
> > > - * Go 55.3% <https://github.com/apache/trafficcontrol/search?l=go>
> > > - * <https://github.com/apache/trafficcontrol/search?l=go>JavaScript
> > 12.2%
> > > <https://github.com/apache/trafficcontrol/search?l=javascript>
> > > <https://github.com/apache/trafficcontrol/search?l=java>
> > > - * Java 9.0% <https://github.com/apache/trafficcontrol/search?l=java>
> > > - * HTML 7.2% <https://github.com/apache/trafficcontrol/search?l=html>
> > > - <https://github.com/apache/trafficcontrol/search?l=typescript>*
> > TypeScript
> > > 4.3% <https://github.com/apache/trafficcontrol/search?l=typescript>
> > > - <https://github.com/apache/trafficcontrol/search?l=shell>* Shell 3.4%
> > > <https://github.com/apache/trafficcontrol/search?l=shell>
> > > * Other 8.6%
> > > <https://github.com/apache/trafficcontrol/search?l=shell>
> > >
> > > So you wouldn't see Python anywhere on that list
> > >
> > > On Tue, Apr 13, 2021 at 11:35 AM Gray, Jonathan
> > > <Jo...@comcast.com.invalid> wrote:
> > >
> > > > What would that be for? The project should accept useful additions in
> > any
> > > > maintainable language already. From the homepage of the project, you
> > can
> > > > see what languages are leveraged and realize that by picking something
> > else
> > > > you run the risk of having your PR rejected for unmaintainability. In
> > > > those cases, sharing links to the scripts are still useful on the
> > mailing
> > > > lists, but simply wouldn't be merged.
> > > >
> > > > Jonathan G
> > > >
> > > > On 4/13/21, 11:16 AM, "ocket 8888" <oc...@gmail.com> wrote:
> > > >
> > > > I was thinking about adding a section to CONTRIBUTING.md and/or the
> > > > development docs that suggests Python as the language to use for
> > > > scripts
> > > > that are too complex for bash but don't need the performance
> > afforded
> > > > by a
> > > > compiled language - any objections?
> > > >
> > > >
> >
Re: [EXTERNAL] Scripting guidelines/suggestions
Posted by ocket 8888 <oc...@gmail.com>.
> requiring
I would never
It's really just meant to be a suggestion. If that seems like it would
sound like a requirement, we shouldn't put it in. That wasn't the intention.
I really don't feel strongly about this, personally. It's just something
that came up in the WG meeting and I volunteered to talk about it on the
list.
On Wed, Apr 14, 2021 at 9:56 AM Rawlin Peters <ra...@apache.org> wrote:
> I don't think we should really make any kind of language suggestions
> in the project. While I agree Python should be considered for scripts
> that are too complex for Bash, there may be other reasons where it
> would make more sense for it to be written in Go or some other
> compiled language. For instance, `db/admin.pl` was replaced with Go
> instead of Python because we didn't want to add internet dependencies
> during installation and wanted a single static binary to include in
> the rpm. For those reasons, Go was the best tool for the job, and we
> should always try to use the best tool for the job rather than
> requiring everyone to use a specific tool.
>
> - Rawlin
>
> On Wed, Apr 14, 2021 at 8:50 AM ocket 8888 <oc...@gmail.com> wrote:
> >
> > > What would that be for?
> >
> > Not much, to be honest. Just a suggestion. I also see I didn't mention
> this
> > originally, but the suggestion is also intended to specifically mention
> > Python as a good choice for when rewriting old scripts from Perl.
> >
> > > From the homepage of the project, you can see what languages are
> > leveraged and realize that by picking something else you run the risk of
> > having your PR rejected for unmaintainability
> >
> > Sort of. If you looked a month ago using that decision-making process
> you'd
> > maybe conclude you should write your scripts in Perl. If you look today,
> > you'll see:
> > -
> > - * Go 55.3% <https://github.com/apache/trafficcontrol/search?l=go>
> > - * <https://github.com/apache/trafficcontrol/search?l=go>JavaScript
> 12.2%
> > <https://github.com/apache/trafficcontrol/search?l=javascript>
> > <https://github.com/apache/trafficcontrol/search?l=java>
> > - * Java 9.0% <https://github.com/apache/trafficcontrol/search?l=java>
> > - * HTML 7.2% <https://github.com/apache/trafficcontrol/search?l=html>
> > - <https://github.com/apache/trafficcontrol/search?l=typescript>*
> TypeScript
> > 4.3% <https://github.com/apache/trafficcontrol/search?l=typescript>
> > - <https://github.com/apache/trafficcontrol/search?l=shell>* Shell 3.4%
> > <https://github.com/apache/trafficcontrol/search?l=shell>
> > * Other 8.6%
> > <https://github.com/apache/trafficcontrol/search?l=shell>
> >
> > So you wouldn't see Python anywhere on that list
> >
> > On Tue, Apr 13, 2021 at 11:35 AM Gray, Jonathan
> > <Jo...@comcast.com.invalid> wrote:
> >
> > > What would that be for? The project should accept useful additions in
> any
> > > maintainable language already. From the homepage of the project, you
> can
> > > see what languages are leveraged and realize that by picking something
> else
> > > you run the risk of having your PR rejected for unmaintainability. In
> > > those cases, sharing links to the scripts are still useful on the
> mailing
> > > lists, but simply wouldn't be merged.
> > >
> > > Jonathan G
> > >
> > > On 4/13/21, 11:16 AM, "ocket 8888" <oc...@gmail.com> wrote:
> > >
> > > I was thinking about adding a section to CONTRIBUTING.md and/or the
> > > development docs that suggests Python as the language to use for
> > > scripts
> > > that are too complex for bash but don't need the performance
> afforded
> > > by a
> > > compiled language - any objections?
> > >
> > >
>
Re: [EXTERNAL] Scripting guidelines/suggestions
Posted by Zach Hoffman <zr...@apache.org>.
> Agreed that we don't want to limit ourselves in terms of languages to
use, decisions like that should be made as a result of PR review.
Meant on a case-by-case basis during PR review.
On Wed, Apr 14, 2021 at 2:10 PM Zach Hoffman <zr...@apache.org> wrote:
> Agreed that we don't want to limit ourselves in terms of languages to use,
> decisions like that should be made as a result of PR review.
>
> > For instance, `db/admin.pl` was replaced with Go instead of Python
> because we didn't want to add internet dependencies during installation and
> wanted a single static binary to include in the rpm.
>
> On the master branch but not in any release yet, we use a Python rewrite
> for the Postinstall script (install/bin/_postinstall) (which works
> according to both CDN in a Box and internal Comcast testing so far). No
> Python dependency is required, other than `python(abi)`, which is already
> satisfied by a stock CentOS install (checked CentOS 5 through 8). To verify
> that you have that dependency satisfied, you can run:
>
> rpm -q --whatprovides 'python(abi)'
>
> It runs under Python 2.7 (CentOS 7) or Python 3.6+ (CentOS 8), using a
> `python(abi)`-provided Python binary or a normal Python binary that is
> already in the PATH, in case the host distro is not CentOS:
> https://github.com/apache/trafficcontrol/blob/1dc6a0678a/traffic_ops/install/bin/_postinstall#L1-L2
>
> So, that is not to say that we should converge on Python (or any other
> language), just that, if a given script supports both Python 2.7 and Python
> 3.6+ and has no Python module dependencies, Python is another language,
> besides Go, that we can use with no additional dependencies installed.
>
> -Zach
>
> On Wed, Apr 14, 2021 at 9:56 AM Rawlin Peters <ra...@apache.org> wrote:
>
>> I don't think we should really make any kind of language suggestions
>> in the project. While I agree Python should be considered for scripts
>> that are too complex for Bash, there may be other reasons where it
>> would make more sense for it to be written in Go or some other
>> compiled language. For instance, `db/admin.pl` was replaced with Go
>> instead of Python because we didn't want to add internet dependencies
>> during installation and wanted a single static binary to include in
>> the rpm. For those reasons, Go was the best tool for the job, and we
>> should always try to use the best tool for the job rather than
>> requiring everyone to use a specific tool.
>>
>> - Rawlin
>>
>> On Wed, Apr 14, 2021 at 8:50 AM ocket 8888 <oc...@gmail.com> wrote:
>> >
>> > > What would that be for?
>> >
>> > Not much, to be honest. Just a suggestion. I also see I didn't mention
>> this
>> > originally, but the suggestion is also intended to specifically mention
>> > Python as a good choice for when rewriting old scripts from Perl.
>> >
>> > > From the homepage of the project, you can see what languages are
>> > leveraged and realize that by picking something else you run the risk of
>> > having your PR rejected for unmaintainability
>> >
>> > Sort of. If you looked a month ago using that decision-making process
>> you'd
>> > maybe conclude you should write your scripts in Perl. If you look today,
>> > you'll see:
>> > -
>> > - * Go 55.3% <https://github.com/apache/trafficcontrol/search?l=go>
>> > - * <https://github.com/apache/trafficcontrol/search?l=go>JavaScript
>> 12.2%
>> > <https://github.com/apache/trafficcontrol/search?l=javascript>
>> > <https://github.com/apache/trafficcontrol/search?l=java>
>> > - * Java 9.0% <https://github.com/apache/trafficcontrol/search?l=java>
>> > - * HTML 7.2% <https://github.com/apache/trafficcontrol/search?l=html>
>> > - <https://github.com/apache/trafficcontrol/search?l=typescript>*
>> TypeScript
>> > 4.3% <https://github.com/apache/trafficcontrol/search?l=typescript>
>> > - <https://github.com/apache/trafficcontrol/search?l=shell>* Shell 3.4%
>> > <https://github.com/apache/trafficcontrol/search?l=shell>
>> > * Other 8.6%
>> > <https://github.com/apache/trafficcontrol/search?l=shell>
>> >
>> > So you wouldn't see Python anywhere on that list
>> >
>> > On Tue, Apr 13, 2021 at 11:35 AM Gray, Jonathan
>> > <Jo...@comcast.com.invalid> wrote:
>> >
>> > > What would that be for? The project should accept useful additions
>> in any
>> > > maintainable language already. From the homepage of the project, you
>> can
>> > > see what languages are leveraged and realize that by picking
>> something else
>> > > you run the risk of having your PR rejected for unmaintainability. In
>> > > those cases, sharing links to the scripts are still useful on the
>> mailing
>> > > lists, but simply wouldn't be merged.
>> > >
>> > > Jonathan G
>> > >
>> > > On 4/13/21, 11:16 AM, "ocket 8888" <oc...@gmail.com> wrote:
>> > >
>> > > I was thinking about adding a section to CONTRIBUTING.md and/or
>> the
>> > > development docs that suggests Python as the language to use for
>> > > scripts
>> > > that are too complex for bash but don't need the performance
>> afforded
>> > > by a
>> > > compiled language - any objections?
>> > >
>> > >
>>
>
Re: [EXTERNAL] Scripting guidelines/suggestions
Posted by Zach Hoffman <zr...@apache.org>.
Agreed that we don't want to limit ourselves in terms of languages to use,
decisions like that should be made as a result of PR review.
> For instance, `db/admin.pl` was replaced with Go instead of Python
because we didn't want to add internet dependencies during installation and
wanted a single static binary to include in the rpm.
On the master branch but not in any release yet, we use a Python rewrite
for the Postinstall script (install/bin/_postinstall) (which works
according to both CDN in a Box and internal Comcast testing so far). No
Python dependency is required, other than `python(abi)`, which is already
satisfied by a stock CentOS install (checked CentOS 5 through 8). To verify
that you have that dependency satisfied, you can run:
rpm -q --whatprovides 'python(abi)'
It runs under Python 2.7 (CentOS 7) or Python 3.6+ (CentOS 8), using a
`python(abi)`-provided Python binary or a normal Python binary that is
already in the PATH, in case the host distro is not CentOS:
https://github.com/apache/trafficcontrol/blob/1dc6a0678a/traffic_ops/install/bin/_postinstall#L1-L2
So, that is not to say that we should converge on Python (or any other
language), just that, if a given script supports both Python 2.7 and Python
3.6+ and has no Python module dependencies, Python is another language,
besides Go, that we can use with no additional dependencies installed.
-Zach
On Wed, Apr 14, 2021 at 9:56 AM Rawlin Peters <ra...@apache.org> wrote:
> I don't think we should really make any kind of language suggestions
> in the project. While I agree Python should be considered for scripts
> that are too complex for Bash, there may be other reasons where it
> would make more sense for it to be written in Go or some other
> compiled language. For instance, `db/admin.pl` was replaced with Go
> instead of Python because we didn't want to add internet dependencies
> during installation and wanted a single static binary to include in
> the rpm. For those reasons, Go was the best tool for the job, and we
> should always try to use the best tool for the job rather than
> requiring everyone to use a specific tool.
>
> - Rawlin
>
> On Wed, Apr 14, 2021 at 8:50 AM ocket 8888 <oc...@gmail.com> wrote:
> >
> > > What would that be for?
> >
> > Not much, to be honest. Just a suggestion. I also see I didn't mention
> this
> > originally, but the suggestion is also intended to specifically mention
> > Python as a good choice for when rewriting old scripts from Perl.
> >
> > > From the homepage of the project, you can see what languages are
> > leveraged and realize that by picking something else you run the risk of
> > having your PR rejected for unmaintainability
> >
> > Sort of. If you looked a month ago using that decision-making process
> you'd
> > maybe conclude you should write your scripts in Perl. If you look today,
> > you'll see:
> > -
> > - * Go 55.3% <https://github.com/apache/trafficcontrol/search?l=go>
> > - * <https://github.com/apache/trafficcontrol/search?l=go>JavaScript
> 12.2%
> > <https://github.com/apache/trafficcontrol/search?l=javascript>
> > <https://github.com/apache/trafficcontrol/search?l=java>
> > - * Java 9.0% <https://github.com/apache/trafficcontrol/search?l=java>
> > - * HTML 7.2% <https://github.com/apache/trafficcontrol/search?l=html>
> > - <https://github.com/apache/trafficcontrol/search?l=typescript>*
> TypeScript
> > 4.3% <https://github.com/apache/trafficcontrol/search?l=typescript>
> > - <https://github.com/apache/trafficcontrol/search?l=shell>* Shell 3.4%
> > <https://github.com/apache/trafficcontrol/search?l=shell>
> > * Other 8.6%
> > <https://github.com/apache/trafficcontrol/search?l=shell>
> >
> > So you wouldn't see Python anywhere on that list
> >
> > On Tue, Apr 13, 2021 at 11:35 AM Gray, Jonathan
> > <Jo...@comcast.com.invalid> wrote:
> >
> > > What would that be for? The project should accept useful additions in
> any
> > > maintainable language already. From the homepage of the project, you
> can
> > > see what languages are leveraged and realize that by picking something
> else
> > > you run the risk of having your PR rejected for unmaintainability. In
> > > those cases, sharing links to the scripts are still useful on the
> mailing
> > > lists, but simply wouldn't be merged.
> > >
> > > Jonathan G
> > >
> > > On 4/13/21, 11:16 AM, "ocket 8888" <oc...@gmail.com> wrote:
> > >
> > > I was thinking about adding a section to CONTRIBUTING.md and/or the
> > > development docs that suggests Python as the language to use for
> > > scripts
> > > that are too complex for bash but don't need the performance
> afforded
> > > by a
> > > compiled language - any objections?
> > >
> > >
>
Re: [EXTERNAL] Scripting guidelines/suggestions
Posted by Rawlin Peters <ra...@apache.org>.
I don't think we should really make any kind of language suggestions
in the project. While I agree Python should be considered for scripts
that are too complex for Bash, there may be other reasons where it
would make more sense for it to be written in Go or some other
compiled language. For instance, `db/admin.pl` was replaced with Go
instead of Python because we didn't want to add internet dependencies
during installation and wanted a single static binary to include in
the rpm. For those reasons, Go was the best tool for the job, and we
should always try to use the best tool for the job rather than
requiring everyone to use a specific tool.
- Rawlin
On Wed, Apr 14, 2021 at 8:50 AM ocket 8888 <oc...@gmail.com> wrote:
>
> > What would that be for?
>
> Not much, to be honest. Just a suggestion. I also see I didn't mention this
> originally, but the suggestion is also intended to specifically mention
> Python as a good choice for when rewriting old scripts from Perl.
>
> > From the homepage of the project, you can see what languages are
> leveraged and realize that by picking something else you run the risk of
> having your PR rejected for unmaintainability
>
> Sort of. If you looked a month ago using that decision-making process you'd
> maybe conclude you should write your scripts in Perl. If you look today,
> you'll see:
> -
> - * Go 55.3% <https://github.com/apache/trafficcontrol/search?l=go>
> - * <https://github.com/apache/trafficcontrol/search?l=go>JavaScript 12.2%
> <https://github.com/apache/trafficcontrol/search?l=javascript>
> <https://github.com/apache/trafficcontrol/search?l=java>
> - * Java 9.0% <https://github.com/apache/trafficcontrol/search?l=java>
> - * HTML 7.2% <https://github.com/apache/trafficcontrol/search?l=html>
> - <https://github.com/apache/trafficcontrol/search?l=typescript>* TypeScript
> 4.3% <https://github.com/apache/trafficcontrol/search?l=typescript>
> - <https://github.com/apache/trafficcontrol/search?l=shell>* Shell 3.4%
> <https://github.com/apache/trafficcontrol/search?l=shell>
> * Other 8.6%
> <https://github.com/apache/trafficcontrol/search?l=shell>
>
> So you wouldn't see Python anywhere on that list
>
> On Tue, Apr 13, 2021 at 11:35 AM Gray, Jonathan
> <Jo...@comcast.com.invalid> wrote:
>
> > What would that be for? The project should accept useful additions in any
> > maintainable language already. From the homepage of the project, you can
> > see what languages are leveraged and realize that by picking something else
> > you run the risk of having your PR rejected for unmaintainability. In
> > those cases, sharing links to the scripts are still useful on the mailing
> > lists, but simply wouldn't be merged.
> >
> > Jonathan G
> >
> > On 4/13/21, 11:16 AM, "ocket 8888" <oc...@gmail.com> wrote:
> >
> > I was thinking about adding a section to CONTRIBUTING.md and/or the
> > development docs that suggests Python as the language to use for
> > scripts
> > that are too complex for bash but don't need the performance afforded
> > by a
> > compiled language - any objections?
> >
> >
Re: [EXTERNAL] Scripting guidelines/suggestions
Posted by ocket 8888 <oc...@gmail.com>.
> What would that be for?
Not much, to be honest. Just a suggestion. I also see I didn't mention this
originally, but the suggestion is also intended to specifically mention
Python as a good choice for when rewriting old scripts from Perl.
> From the homepage of the project, you can see what languages are
leveraged and realize that by picking something else you run the risk of
having your PR rejected for unmaintainability
Sort of. If you looked a month ago using that decision-making process you'd
maybe conclude you should write your scripts in Perl. If you look today,
you'll see:
-
- * Go 55.3% <https://github.com/apache/trafficcontrol/search?l=go>
- * <https://github.com/apache/trafficcontrol/search?l=go>JavaScript 12.2%
<https://github.com/apache/trafficcontrol/search?l=javascript>
<https://github.com/apache/trafficcontrol/search?l=java>
- * Java 9.0% <https://github.com/apache/trafficcontrol/search?l=java>
- * HTML 7.2% <https://github.com/apache/trafficcontrol/search?l=html>
- <https://github.com/apache/trafficcontrol/search?l=typescript>* TypeScript
4.3% <https://github.com/apache/trafficcontrol/search?l=typescript>
- <https://github.com/apache/trafficcontrol/search?l=shell>* Shell 3.4%
<https://github.com/apache/trafficcontrol/search?l=shell>
* Other 8.6%
<https://github.com/apache/trafficcontrol/search?l=shell>
So you wouldn't see Python anywhere on that list
On Tue, Apr 13, 2021 at 11:35 AM Gray, Jonathan
<Jo...@comcast.com.invalid> wrote:
> What would that be for? The project should accept useful additions in any
> maintainable language already. From the homepage of the project, you can
> see what languages are leveraged and realize that by picking something else
> you run the risk of having your PR rejected for unmaintainability. In
> those cases, sharing links to the scripts are still useful on the mailing
> lists, but simply wouldn't be merged.
>
> Jonathan G
>
> On 4/13/21, 11:16 AM, "ocket 8888" <oc...@gmail.com> wrote:
>
> I was thinking about adding a section to CONTRIBUTING.md and/or the
> development docs that suggests Python as the language to use for
> scripts
> that are too complex for bash but don't need the performance afforded
> by a
> compiled language - any objections?
>
>
Re: [EXTERNAL] Scripting guidelines/suggestions
Posted by "Gray, Jonathan" <Jo...@comcast.com.INVALID>.
What would that be for? The project should accept useful additions in any maintainable language already. From the homepage of the project, you can see what languages are leveraged and realize that by picking something else you run the risk of having your PR rejected for unmaintainability. In those cases, sharing links to the scripts are still useful on the mailing lists, but simply wouldn't be merged.
Jonathan G
On 4/13/21, 11:16 AM, "ocket 8888" <oc...@gmail.com> wrote:
I was thinking about adding a section to CONTRIBUTING.md and/or the
development docs that suggests Python as the language to use for scripts
that are too complex for bash but don't need the performance afforded by a
compiled language - any objections?