-
Notifications
You must be signed in to change notification settings - Fork 9
I'd like to contribute ansible-trace under ansible-collections #52
Comments
@mhansen we only host Ansible Collections under @ansible-collections. Your project is not a collection. Did you mean @ansible-community, maybe? This is the org for more general-purpose projects. Or are you planning to convert it into a collection? |
Ah, I see, it's a callback plugin. In this case, follow https://docs.ansible.com/ansible-core/devel/dev_guide/developing_collections.html to create a proper collection directory layout. |
I’m not sure the tradeoffs of making a standalone collection vs not. I’d
just like to contribute this to the broader ansible project somehow (I
think it’s at least as useful as the profile_tasks executor which comes
bundled). I’m not sure the best/most idiomatic/usual place to contribute
such callback plugins. Advice appreciated :-)
…On Thu, 28 Oct 2021 at 09:33, Sviatoslav Sydorenko ***@***.***> wrote:
Ah, I see, it's a callback plugin. In this case, follow
https://docs.ansible.com/ansible-core/devel/dev_guide/developing_collections.html
to create a proper collection directory layout.
I don't think this would be something for ansible-core to accept but it
could be distributed via Galaxy. Also, if it's hosted among other community
collections, it could be included in the Ansible bundle maybe (don't
confuse with ansible-core).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#52 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAZYOJPLJW5BOZDSP6WDULUJCD4PANCNFSM5G3LKKFA>
.
|
Perhaps this desire to “contribute to ansible project” might be slightly in
conflict with ansible trying to be more decentralised (I’m seeing a bunch
of stuff that used to be bundled standard is now in separate git repos).
I’m not sure how to navigate this.
…On Thu, 28 Oct 2021 at 12:06, Mark Hansen ***@***.***> wrote:
I’m not sure the tradeoffs of making a standalone collection vs not. I’d
just like to contribute this to the broader ansible project somehow (I
think it’s at least as useful as the profile_tasks executor which comes
bundled). I’m not sure the best/most idiomatic/usual place to contribute
such callback plugins. Advice appreciated :-)
On Thu, 28 Oct 2021 at 09:33, Sviatoslav Sydorenko <
***@***.***> wrote:
> Ah, I see, it's a callback plugin. In this case, follow
> https://docs.ansible.com/ansible-core/devel/dev_guide/developing_collections.html
> to create a proper collection directory layout.
> I don't think this would be something for ansible-core to accept but it
> could be distributed via Galaxy. Also, if it's hosted among other community
> collections, it could be included in the Ansible bundle maybe (don't
> confuse with ansible-core).
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#52 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAAZYOJPLJW5BOZDSP6WDULUJCD4PANCNFSM5G3LKKFA>
> .
>
|
IIRC currently the policy is to not accept new "stdlib" stuff. You should contribute to collections (either start a new one or find some, where this content would fit). Even if you were to contribute this to ansible-core, it'd only become available to most of the users in a year or so when ansible-core 2.13 is out. Shipping content via collections will make it available immediately, besides it could work with Ansible 2.9, ansible-base 2.10, ansible-core 2.11, not only ansible-core 2.13+. Also, it's easier to get updates/fixes published when your collection is not tightly bound to the release cycle of ansible-core. Anyway, your first step is to have a collection layout. Moving it around, to different projects/repos would probably be simpler if you have something collection-ready. |
Thanks, this is exactly the advice I need. I’ll refactor the project to a
collection layout 🙏
…On Thu, 28 Oct 2021 at 12:16, Sviatoslav Sydorenko ***@***.***> wrote:
IIRC currently the policy is to not accept new "stdlib" stuff. You should
contribute to collections (either start a new one or find some, where this
content would fit).
Even if you were to contribute this to ansible-core, it'd only become
available to most of the users in a year or so when ansible-core 2.13 is
out. Shipping content via collections will make it available immediately,
besides it could work with Ansible 2.9, ansible-base 2.10, ansible-core
2.11, not only ansible-core 2.13+. Also, it's easier to get updates/fixes
published when your collection is not tightly bound to the release cycle of
ansible-core.
Anyway, your first step is to have a collection layout. Moving it around,
to different projects/repos would probably be simpler if you have something
collection-ready.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#52 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAZYOOJ6ZWA5HWOZICQS7DUJCXA5ANCNFSM5G3LKKFA>
.
|
Yep, a collection layout is a good idea (and publishing it as a collection), that makes it easier to install for users. Then step 1 of https://github.com/mhansen/ansible-trace#usage converts to |
Thanks all. I've converted to a collection (this is heaps easier to
install!)
…On Thu, 28 Oct 2021 at 15:59, Felix Fontein ***@***.***> wrote:
Yep, a collection layout is a good idea (and publishing it as a
collection), that makes it easier to install for users. Then step 1 of
https://github.com/mhansen/ansible-trace#usage converts to ansible-galaxy
collection install yourcollection.name. In step 2 you will have to change
the plugin name to yourcollection.name.trace then.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#52 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAZYOMCMOSOVNOHU36JBRTUJDRCRANCNFSM5G3LKKFA>
.
|
I see there are bunch of similar-ish plugins under
https://github.com/ansible-collections/community.general:
- community.general.cgroup_memory_recap
- community.general.counter_enabled
- community.general.dense
- community.general.elastic
- community.general.loganalytics
- community.general.opentelemetry
etc...
I don't know if this is just an accident of history that so many logs are
in here, maybe it's better to have a new, more granular repository for new
things.
…On Sat, 30 Oct 2021 at 15:15, Mark Hansen ***@***.***> wrote:
Thanks all. I've converted to a collection (this is heaps easier to
install!)
On Thu, 28 Oct 2021 at 15:59, Felix Fontein ***@***.***>
wrote:
> Yep, a collection layout is a good idea (and publishing it as a
> collection), that makes it easier to install for users. Then step 1 of
> https://github.com/mhansen/ansible-trace#usage converts to ansible-galaxy
> collection install yourcollection.name. In step 2 you will have to
> change the plugin name to yourcollection.name.trace then.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#52 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAAZYOMCMOSOVNOHU36JBRTUJDRCRANCNFSM5G3LKKFA>
> .
>
|
There are two aspects:
Having a more specialized collection is definitely a good idea IMO, but it is a bit more effort to get it included into the Ansible package (https://github.com/ansible-collections/ansible-inclusion/) and won't happen until (at least) Ansible 6.0.0 since the inclusion window for Ansible 5 just closed. Obviously folks can also install the collection manually until then (or thereafter if they don't use the Ansible package), so it's not really a big drawback :) |
Thanks for the guidance. I'm fairly new to this. Maybe it's enough to just
have the easy ansible-galaxy installation. Or perhaps this is general
enough / there would be benefits from community ownership. Not sure. I'm
fairly happy for now to wait and see, or get advice for whether packages
like this should be best in or out of the community package.
It would be pretty nice to have it included in the bundle out of the box
and have docs on docs.ansible.com if it fits with your vision for that repo
(in particular, would be cool if we could link it from the docs about
profiling execution for discoverability), but otherwise I'm probably fairly
happy with the galaxy distribution, it doesn't seem too hard to install.
…On Sat, 30 Oct 2021 at 17:08, Felix Fontein ***@***.***> wrote:
I don't know if this is just an accident of history that so many logs are
in here, maybe it's better to have a new, more granular repository for new
things.
There are two aspects:
1. When the large Ansible repository was split up into ansible-base
(now ansible-core) and a set of collections, most plugins and modules that
nobody wanted to take ownership of (in a separate collection) were moved
into community.general. That's one reason why a lot of them ended up in
there.
2. Some new ones were added since then; community.general is a kind of
popular target for new plugins and modules since it is included in the
Ansible community package, so if you manage to get your plugin/module added
there everyone using that package can use your plugin/module out of the box
and docs for your plugin/module will show up on docs.ansible.com.
Having a more specialized collection is definitely a good idea IMO, but it
is a bit more effort to get it included into the Ansible package (
https://github.com/ansible-collections/ansible-inclusion/) and won't
happen until (at least) Ansible 6.0.0 since the inclusion window for
Ansible 5 just closed. Obviously folks can also install the collection
manually until then (or thereafter if they don't use the Ansible package),
so it's not really a big drawback :)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#52 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAZYOILUVMUKR42GSAOG7LUJOKVFANCNFSM5G3LKKFA>
.
|
Hi @mhansen and sorry for not getting back to you sooner. First, thanks for working on ansible-trace and congratulations on getting the collection out on galaxy, I'm happy that it works for you :) We discussed this particular issue in the community meeting today to see how the community working group might help. With your collection now on galaxy, anyone can install it relatively easily and that's great.
In terms of benefits, some examples are that being in the ansible-collections organization allows us to provide CI resources so PRs can be tested and collections can be automatically published to ansible galaxy when a new git tag is pushed. Another question that came up during the meeting was whether it would be appropriate to create a more general purpose collection (say, community.performance_tools or community.debug_tools) but we would need to get traction on it. Let us know what you think ? Happy to answer questions. |
With your collection now on galaxy, anyone can install it relatively
easily and that's great.
If this is OK with you and you are satisfied, we can stop there
I can confirm I’m satisfied with the galaxy arrangement. I didn’t know
about galaxy at the start of this, and it solves the install and use
problem nicely I think.
I’m very open to making this community or part of ansible collections,
those benefits you list are good. A performance tools collection might also
be good (but tradeoff is it might suffer from many unrelated tools wanting
different release schedules? Not sure).
In conclusion, I’m happy as is, I’m also happy to contribute to something
community or a more core-ish collection, but I think I’ll let you decide if
that’s desired / if there is a broader pattern here. e.g. if you decide
ansible needs a tracer built in and want to make that be ansible-trace or a
fork or rewrite of my code, I’m cool with that. Otherwise fine as is.
Thanks!
…On Thu, 13 Jan 2022 at 06:15, David Moreau Simard ***@***.***> wrote:
Hi @mhansen <https://github.com/mhansen> and sorry for not getting back
to you sooner.
First, thanks for working on ansible-trace and congratulations on getting
the collection out on galaxy, I'm happy that it works for you :)
We discussed this particular issue in the community meeting today to see
how the community working group might help.
We came up with a number of ideas and questions so before settling on
anything, I suggested we reach out to you first in order to ask how things
were going, what were your expectations and how we might be able to provide
guidance.
With your collection now on galaxy, anyone can install it relatively
easily and that's great.
If this is OK with you and you are satisfied, we can stop there but there
are other possibilities like:
- Moving the repository to the ansible-collections organization
- Renaming the collection from mhansen.ansible_trace to
community.ansible_trace
In terms of benefits, some examples are that being in the
ansible-collections organization allows us to provide CI resources so PRs
can be tested and collections can be automatically published to ansible
galaxy when a new git tag is pushed.
Another question that came up during the meeting was whether it would be
appropriate to create a more general purpose collection (say,
community.performance_tools or community.debug_tools) but we would need to
get traction on it.
Let us know what you think ? Happy to answer questions.
—
Reply to this email directly, view it on GitHub
<#52 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAZYOI2KGAFICVIDAHE2BTUVXHOBANCNFSM5G3LKKFA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Summary
I'd like to contribute https://github.com/mhansen/ansible-trace to ansible-collections.
Additional Information
Hi there, I've developed https://github.com/mhansen/ansible-trace, a tool for visualising where ansible execution time is spent.
I think this could have broad usefulness to the ansible community, and I wonder if the best way to increase it's reach is by contributing it to Ansible somehow.
I was chatting with @gundalow on https://www.reddit.com/r/ansible/comments/q49h2d/ansibletrace_visualise_execution_time_of_ansible/ and he suggested:
The repo now has a GPLv3 license. I imagine there might be some more steps to make this ready to land (just guesses):
The text was updated successfully, but these errors were encountered: