Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

version.txt contains lots of unhelpful noise #2495

Closed
slashdd opened this issue Apr 14, 2021 · 5 comments
Closed

version.txt contains lots of unhelpful noise #2495

slashdd opened this issue Apr 14, 2021 · 5 comments

Comments

@slashdd
Copy link

slashdd commented Apr 14, 2021

See Ubuntu LP:# 1922925 for context.

@slashdd
Copy link
Author

slashdd commented Apr 14, 2021

'unversioned' is the default behaviour, but I can't see any plugin having version number, and see the value of such information.

    def version(self):
        """Fetch version information from all plugins and store in the report
        version file"""

        versions = []
        versions.append("sosreport: %s" % __version__)

        for plugname, plug in self.loaded_plugins:
            versions.append("%s: %s" % (plugname, plug.version))

        self.archive.add_string(content="\n".join(versions),
                                dest='version.txt')
    :cvar version:      The version of the plugin, defaults to 'unversioned'
    :vartype version:   ``str``

@slashdd
Copy link
Author

slashdd commented Apr 14, 2021

Only jars and pacemaker, seems to use this feature.

pacemaker.py: version = "1.0"
jars.py: version = "1.0.0"

@slashdd
Copy link
Author

slashdd commented Apr 14, 2021

One thing we can do, is to put the 'unversioned' plugin into silence to stop the unecessary noise.

        for plugname, plug in self.loaded_plugins:
+         if plug.version != 'unversioned':
              versions.append("%s: %s" % (plugname, plug.version))

Or drop this version (which seems to be like legacy) option that very few plugins uses anyway.

@TurboTurtle
Copy link
Member

Yeah, plugin versions never really took off. I think it would be more relevant if there was wider (any?) adoption of users writing their own local plugins, or plugins being shipped with individual components/packages, but in the current packaging design I'd be in favor of dropping it.

We did experiment for a little while in products shipping their own plugins, but in reality they went unmaintained and even those that did ship did not keep updated versioning.

+1 to rip it out for plugins. This does raise the question in my mind though, do we want to separately version sos components like report, collect, or clean, or just keep them all under the "umbrella" version of the sos packaging? I'm in favor of the latter but I'm open to hearing reasons for making that kind of change.

@slashdd
Copy link
Author

slashdd commented Apr 14, 2021

I'm in favor of the latter as well.

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

Successfully merging a pull request may close this issue.

2 participants