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

test: enhance e2e debuggability by capturing resource changes and storing them as artifacts #281

Merged
merged 10 commits into from
Sep 23, 2024

Conversation

dpadhiar
Copy link
Contributor

@dpadhiar dpadhiar commented Sep 19, 2024

Fixes #276

Modifications

To add to the controller artifacts that we currently have, it is also useful to track information of all the resources and their child resources. The best way to do this would be to store the output of kubectl get <resource> -o yaml anytime there is a change. We can achieve this by using a watch.Interface to watch each resource and generate an output file <resource>.yaml that continually receives the updated resource YAML every time a change occurs.

Verification

Ran make test-e2e locally to verify resource file are output correctly.

Verified artifacts are uploaded when test fails on Github CI.

Failed commit: 218e6b4

@juliev0
Copy link
Collaborator

juliev0 commented Sep 19, 2024

Looks like we watch the entire resource Kind for each file generated. That seems fine. In the future, perhaps we will generate multiple files per resource name. But right now we don't have that need, since for these resources at least we only have one of each.

@dpadhiar
Copy link
Contributor Author

Looks like we watch the entire resource Kind for each file generated. That seems fine. In the future, perhaps we will generate multiple files per resource name. But right now we don't have that need, since for these resources at least we only have one of each.

Sounds good, this would be a pretty simple change when we need it: just adding the resource name as a parameter and using it in the label selector.

@dpadhiar dpadhiar marked this pull request as ready for review September 23, 2024 15:12
@juliev0 juliev0 merged commit c2e29ae into numaproj:main Sep 23, 2024
7 checks passed
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.

e2e debuggability - capture resource changes and store artifacts
2 participants