Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

I'd like to contribute ansible-trace under ansible-collections #52

Closed
2 tasks
mhansen opened this issue Oct 27, 2021 · 13 comments
Closed
2 tasks

I'd like to contribute ansible-trace under ansible-collections #52

mhansen opened this issue Oct 27, 2021 · 13 comments

Comments

@mhansen
Copy link

mhansen commented Oct 27, 2021

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:

I'm wondering if this could be released as a standalone collection under https://github.com/ansible-collections/
u/markhnsn If you'd like to raise an issues here https://github.com/ansible-community/community-topics/issues we can use that to track the steps needed to move the repo over.

The repo now has a GPLv3 license. I imagine there might be some more steps to make this ready to land (just guesses):

  • add tests
  • maybe make sure it works on all versions of Python that Ansible supports
@webknjaz
Copy link
Member

@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?

@webknjaz
Copy link
Member

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

@mhansen
Copy link
Author

mhansen commented Oct 28, 2021 via email

@mhansen
Copy link
Author

mhansen commented Oct 28, 2021 via email

@webknjaz
Copy link
Member

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.

@mhansen
Copy link
Author

mhansen commented Oct 28, 2021 via email

@felixfontein
Copy link
Contributor

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.

@mhansen
Copy link
Author

mhansen commented Oct 30, 2021 via email

@mhansen
Copy link
Author

mhansen commented Oct 30, 2021 via email

@felixfontein
Copy link
Contributor

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 :)

@mhansen
Copy link
Author

mhansen commented Oct 30, 2021 via email

@dmsimard
Copy link

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

@mhansen
Copy link
Author

mhansen commented Jan 29, 2022 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants