containerbuildsystem / koji-containerbuild

Container build support for Koji buildsystem
GNU Lesser General Public License v2.1
29 stars 32 forks source link

location for container inspection scripts #169

Closed ktdreyer closed 4 years ago

ktdreyer commented 4 years ago

I have a couple of read-only tools for inspecting containers:

I can keep these tools in https://pagure.io/koji-tools, but they all share quite a few methods, so I would need to refactor them to use a central library. (For example, I have a method get_metadata() that downloads the OSBS metadata.json, another one that parses it, etc).

I'm wondering if it makes more sense to put these tools into the koji-containerbuild-cli plugin as additional sub-commands. What do you think?

ktdreyer commented 4 years ago

One other reason for merging these into koji-containerbuild is that eventually if kojiweb ever becomes pluggable, we could do things like "diff RPMs" in the kojiweb interface.

athos-ribeiro commented 4 years ago

Hi Ken,

That would be very nice to have! +1

Cc @twaugh @MartinBasti @rcerven

I am also wondering if we would be able to extend these in the future to find content based on cachito stored data.

MartinBasti commented 4 years ago

Hello, we discussed about this and the best solution seems to create a new repo within this namespace, called osbs-scripts or osbs-tools (name TBD)

koji command should stay minimal, this builds on top of current koji api so we should have it in different tool to not make mess in koji CLI itself.

There is also open question if we should:

ktdreyer commented 4 years ago

There is a discussion on koji-devel about moving some of the koji-tools scripts into koji CLI sub-commands. That is why I think it could be useful to do that here.

Here are the specific reasons I wanted to build this into koji-containerbuild (or some common library):

1) When I am walking new team members through the process of building containers, it is already really difficult to understand dist-git, rpkg, kerberos, etc. If we add an entirely separate set tool on top of that, it raises the barrier to entry, which makes OSBS harder for users to understand and contribute.

2) In Ceph, we have internal tooling that already uses the logic I've written for koji-container-signatures. Ideally this container-signature-checking would be a library that other higher-level Python tools could call, rather than a standalone script. Also, there are other internal tools (MetaXOR) that would benefit from sharing methods like parse_rpm_signatures() if they were in a real library.

MartinBasti commented 4 years ago

OK, if this is a way how koji devs wants to handle such toolings, we can reevaluate that decision.

MartinBasti commented 4 years ago

We agreed to go with the same approach as koji then. Are you willing to contribute patches to koji-c for this?

ktdreyer commented 4 years ago

Absolutely. We can close this ticket since it was just a discussion, and I'll send separate PRs for the tools I listed above.