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

[cos]Fixed issue by adding valid plugin class and change CosLogs as a hierarchy of Independent logs #3287

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vteratipally
Copy link
Contributor

@vteratipally vteratipally commented Jun 23, 2023

Fixed issue by adding valid plugin class
change CosLogs as a hierarchy of Independent logs

Signed-off-by: Varsha Teratipally [email protected]


Please place an 'X' inside each '[]' to confirm you adhere to our Contributor Guidelines

  • Is the commit message split over multiple lines and hard-wrapped at 72 characters?
  • Is the subject and message clear and concise?
  • Does the subject start with [plugin_name] if submitting a plugin patch or a [section_name] if part of the core sosreport code?
  • Does the commit contain a Signed-off-by: First Lastname [email protected]?
  • [] Are any related Issues or existing PRs properly referenced via a Closes (Issue) or Resolved (PR) line?

hierarchy of Independent logs

Signed-off-by: varsha teratipally <[email protected]>
@packit-as-a-service
Copy link

Congratulations! One of the builds has completed. 🍾

You can install the built RPMs by following these steps:

  • sudo yum install -y dnf-plugins-core on RHEL 8
  • sudo dnf install -y dnf-plugins-core on Fedora
  • dnf copr enable packit/sosreport-sos-3287
  • And now you can install the packages.

Please note that the RPMs should be used only in a testing environment.

@@ -41,7 +41,7 @@ def __init__(self, sysroot=None, init=None, probe_runtime=True,
super(CosPolicy, self).__init__(sysroot=sysroot, init=init,
probe_runtime=probe_runtime,
remote_exec=remote_exec)
self.valid_subclasses += [CosPolicy]
self.valid_subclasses += [CosPlugin]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

curious, the valid_subclasses already has CosPlugin already at line 36

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 36 needs to be removed, as it gets overwritten by the super() in __init__() from the base Policy class.

@@ -118,7 +118,7 @@ class IndependentLogs(LogsBase, IndependentPlugin):
profiles = ('system', 'hardware', 'storage')


class CosLogs(LogsBase, CosPlugin):
class CosLogs(IndependentLogs, CosPlugin):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean that you don't want to be collecting all the logs defined in LogsBase as above?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will make it so that CosLogs has the IndependentPlugin tagging class assigned to it, which will enable it for all distros, which is precisely why we made the change to split out LogsBase.

The change to valid_subclasses is correct (and can be made "more" correct by removing line 36), but this change here is not going to get us where we need to be.

@arif-ali
Copy link
Member

can you also rebase your commit to the main branch that solves the CI for the snap build, and hence the rest of the checks

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 this pull request may close these issues.

3 participants