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
PAO must-gather e2e test #365
Conversation
@marioferh: The
Use In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/retest-required |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we want to add the expanded archive, which is a pretty large tree, or do we want to add the must gather archive as a tgz, so as binary blob?
Additionally, please clarify the (very terse) "Test in local image" line
test/e2e/performanceprofile/functests/6_mustgather_testing/mustgather.go
Outdated
Show resolved
Hide resolved
test/e2e/performanceprofile/functests/6_mustgather_testing/mustgather.go
Show resolved
Hide resolved
test/e2e/performanceprofile/functests/6_mustgather_testing/mustgather.go
Outdated
Show resolved
Hide resolved
test/e2e/performanceprofile/functests/6_mustgather_testing/mustgather.go
Outdated
Show resolved
Hide resolved
test/e2e/performanceprofile/functests/6_mustgather_testing/mustgather.go
Outdated
Show resolved
Hide resolved
test/e2e/performanceprofile/functests/6_mustgather_testing/mustgather.go
Outdated
Show resolved
Hide resolved
var _ = BeforeSuite(func() { | ||
Expect(testclient.ClientsEnabled).To(BeTrue(), "package client not enabled") | ||
// create test namespace | ||
err := testclient.Client.Create(context.TODO(), namespaces.TestingNamespace) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need a testing namespace?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's copied from other suites, not sure if needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we have a conclusion? it seems to me the namespace is not really needed here
test/e2e/performanceprofile/functests/6_mustgather_testing/mustgather.go
Outdated
Show resolved
Hide resolved
test/e2e/performanceprofile/functests/6_mustgather_testing/mustgather.go
Outdated
Show resolved
Hide resolved
test/e2e/performanceprofile/functests/6_mustgather_testing/mustgather.go
Outdated
Show resolved
Hide resolved
test/e2e/performanceprofile/functests/6_mustgather_testing/mustgather.go
Show resolved
Hide resolved
test/e2e/performanceprofile/functests/6_mustgather_testing/test_suite_mustgather_test.go
Show resolved
Hide resolved
The test data folders are composed from long generated paths, maybe we can downsize that for better navigation if we can. |
this paths are generated from must-gather |
test/e2e/performanceprofile/functests/6_mustgather_testing/mustgather.go
Show resolved
Hide resolved
test/e2e/performanceprofile/functests/6_mustgather_testing/mustgather.go
Outdated
Show resolved
Hide resolved
test/e2e/performanceprofile/functests/6_mustgather_testing/mustgather.go
Outdated
Show resolved
Hide resolved
test/e2e/performanceprofile/functests/6_mustgather_testing/mustgather.go
Outdated
Show resolved
Hide resolved
test/e2e/performanceprofile/functests/6_mustgather_testing/mustgather.go
Outdated
Show resolved
Hide resolved
test/e2e/performanceprofile/functests/6_mustgather_testing/mustgather.go
Outdated
Show resolved
Hide resolved
test/e2e/performanceprofile/functests/6_mustgather_testing/mustgather.go
Outdated
Show resolved
Hide resolved
test/e2e/performanceprofile/functests/6_mustgather_testing/mustgather.go
Show resolved
Hide resolved
test/e2e/performanceprofile/functests/6_mustgather_testing/test_suite_mustgather_test.go
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jmencak Hi Jiri, we want to test must-gather. We add a bunch (quite a lot) of files here as test data. I'm not sure we want to add so many. The alternative would be to add a tar/tgz blob and unpack it when test runs. Any preference/guidance? thanks!
test/e2e/performanceprofile/functests/6_mustgather_testing/mustgather.go
Outdated
Show resolved
Hide resolved
Expect(err).ToNot(HaveOccurred(), "failed to read sysinfo.tgz file %s: %v", snapshotName, err) | ||
} | ||
|
||
err = Untar(snapshotDir, snapshotName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how do we do cleanup?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how was this addressed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here,
Line 40 in 7e46efa
snapshotProc := filepath.Join(snapshotDir, "proc") |
maybe it could be better but I think is enough for this PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's fine to do this in the aftersuite. It would be better to untar into a randomly generated temporary folder (https://pkg.go.dev/os#TempDir) and remove the temporary directory straight away when the suite ends.
I think this is a further step we should do for safety and robustness (and to minimize the risk we clog the disk of the CI boxes).
In the future we can move all the snapshot handling at the same level - make temp dir and untar in beforesuite, clean up (just remove the temp dir and all its content) on aftersuite
test/e2e/performanceprofile/functests/6_mustgather_testing/mustgather.go
Outdated
Show resolved
Hide resolved
test/e2e/performanceprofile/functests/6_mustgather_testing/mustgather.go
Show resolved
Hide resolved
var _ = BeforeSuite(func() { | ||
Expect(testclient.ClientsEnabled).To(BeTrue(), "package client not enabled") | ||
// create test namespace | ||
err := testclient.Client.Create(context.TODO(), namespaces.TestingNamespace) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we have a conclusion? it seems to me the namespace is not really needed here
I don't understand, I have deleted the files and uploaded sysinfo.tgz. This one is a previous PR to the next one to collect the data from the cluster. Then no files will be uploaded to test/data |
do we have a conclusion? it seems to me the namespace is not really needed here` Yes, its like that in other suites, if we need to delete, it should be done in another PR in all suites |
ok, let's keep it. |
Add e2e must-gather test with pre-collected data. Untar sysinfo.tgz Check if generated files are present Signed-off-by: Mario Fernandez <mariofer@redhat.com>
/retest-required |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from my pov, I think we need to do a step further in how we handle the untarred snapshot, and than we're good to go. Everything else seems OK or better.
Expect(err).ToNot(HaveOccurred(), "failed to read sysinfo.tgz file %s: %v", snapshotName, err) | ||
} | ||
|
||
err = Untar(snapshotDir, snapshotName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's fine to do this in the aftersuite. It would be better to untar into a randomly generated temporary folder (https://pkg.go.dev/os#TempDir) and remove the temporary directory straight away when the suite ends.
I think this is a further step we should do for safety and robustness (and to minimize the risk we clog the disk of the CI boxes).
In the future we can move all the snapshot handling at the same level - make temp dir and untar in beforesuite, clean up (just remove the temp dir and all its content) on aftersuite
@[fromanirh]
I did it like that at the very begging as in debug-tools, the issue here is we have hardoded data besides the tar file in a no tmp folder. If we untar the data in a tmp dir we have the data split in two different folders, and copy the there and the delete it is not so elegant. For that I've changed to this way, and in the next PR when data is generated in the cluster untar all in same folder and then delete all. |
ack, let's start this way then |
/lgtm |
/retest |
@fromanirh PTAL please |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fromanirh, marioferh The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@marioferh: all tests passed! Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
Add e2e must-gather test with pre-collected data. Untar sysinfo.tgz Check if generated files are present Signed-off-by: Mario Fernandez <mariofer@redhat.com>
Add e2e must-gather test with pre-collected data. Untar sysinfo.tgz Check if generated files are present Signed-off-by: Mario Fernandez <mariofer@redhat.com>
must-gather e2e test
Add e2e must-gather test with pre-collected data.
Untar sysinfo.tgz
Check if generated files are present
Test in local image