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

NAS-124303 / 23.10.1 / Add glob based item to collect artifacts (by Qubad786) #91

Merged
merged 1 commit into from
Oct 10, 2023

Conversation

bugclerk
Copy link

Context

It was requested that we have the feature to allow specifying a glob pattern to copy over artifacts and relevant changes have been made to introduce this functionality. To consume this functionality, following diff can be applied to make use of this:

diff --git a/ixdiagnose/artifacts/logs.py b/ixdiagnose/artifacts/logs.py
index b49fb2e..a55deb1 100644
--- a/ixdiagnose/artifacts/logs.py
+++ b/ixdiagnose/artifacts/logs.py
@@ -1,5 +1,5 @@
 from .base import Artifact
-from .items import Directory, File, Pattern
+from .items import Directory, File, Glob, Pattern


 class Logs(Artifact):
@@ -25,4 +25,5 @@ class Logs(Artifact):
         Pattern('fenced.+'),
         Pattern('middlewared.+'),
         Pattern('zettarepl.+'),
+        Glob('/sys/module/*/parameters/*'),
     ]

Original PR: #89
Jira URL: https://ixsystems.atlassian.net/browse/NAS-124303

@codecov
Copy link

codecov bot commented Oct 10, 2023

Codecov Report

Merging #91 (29f54a6) into stable/cobia (5c433db) will increase coverage by 1.77%.
Report is 11 commits behind head on stable/cobia.
The diff coverage is 95.67%.

@@               Coverage Diff                @@
##           stable/cobia      #91      +/-   ##
================================================
+ Coverage         93.13%   94.90%   +1.77%     
================================================
  Files                89       94       +5     
  Lines              1675     2002     +327     
================================================
+ Hits               1560     1900     +340     
+ Misses              115      102      -13     
Files Coverage Δ
ixdiagnose/artifact.py 91.30% <100.00%> (+1.30%) ⬆️
ixdiagnose/artifacts/factory.py 100.00% <100.00%> (ø)
ixdiagnose/artifacts/items/__init__.py 100.00% <100.00%> (ø)
ixdiagnose/artifacts/proc.py 100.00% <100.00%> (ø)
ixdiagnose/config.py 100.00% <100.00%> (ø)
ixdiagnose/plugin.py 91.30% <100.00%> (+0.39%) ⬆️
ixdiagnose/plugins/factory.py 100.00% <100.00%> (ø)
ixdiagnose/plugins/kubernetes.py 100.00% <ø> (ø)
ixdiagnose/plugins/network.py 100.00% <ø> (ø)
ixdiagnose/plugins/smb.py 70.37% <ø> (ø)
... and 14 more

... and 2 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@yocalebo yocalebo merged commit 9214be0 into stable/cobia Oct 10, 2023
6 checks passed
@yocalebo yocalebo deleted the NAS-124303-23.10.1 branch October 10, 2023 12:40
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