Skip to content

SK-246 // add transform option to skctl export and snapshot#260

Open
ogorman89 wants to merge 11 commits into
mainfrom
ian/transform-export
Open

SK-246 // add transform option to skctl export and snapshot#260
ogorman89 wants to merge 11 commits into
mainfrom
ian/transform-export

Conversation

@ogorman89

@ogorman89 ogorman89 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Description and Rationale

How

  • add transform flag to export in CLI --transform <file.skel> for skctl export
  • add a transform option to the ExportRequest object
  • modify collect_events to apply an optional SKEL transformation if specified on the ExportRequest object

Test Steps

  • I copied one of our existing collect_events tests and modified it to just create some events with named deployments and then wrote a simple delete SKEL command to remove one of them and assert its removal.
  • for manual testing I build a cluster with isengard, created some deployments and then ran exports with and without SKEL transformations to compare

My test deployments were just a small-service, medium-service, and large-service

The simple SKEL I am using to test is a test.skel file with; which should delete all events related to the large-service:
delete(metadata.name == "large-service");

Without transformation
(note I'm removing default from --excluded-namespaces since thats where my test pods where deployed.

./.build/skctl export --excluded-namespaces cert-manager,kube-public,kube-node-lease,kube-system,local-path-storage,monitoring,simkube -o first.sktrace

With transformation

./.build/skctl export --excluded-namespaces cert-manager,kube-public,kube-node-lease,kube-system,local-path-storage,monitoring,simkube -o second.sktrace --transform test.skel

I inspected all the results with skctl xray

Other Notes

  • N/A

  • [ X ] I certify that this PR does not contain any code that has been generated with GitHub Copilot or any other AI-based code generation tool, in accordance with this project's policies.

@ogorman89 ogorman89 self-assigned this Jul 2, 2026
@linear-code

linear-code Bot commented Jul 2, 2026

Copy link
Copy Markdown

SK-246

@codecov

codecov Bot commented Jul 2, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 73.33333% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.25%. Comparing base (9525b70) to head (d4d8f5f).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
sk-cli/src/export.rs 0.00% 8 Missing ⚠️
sk-cli/src/transform.rs 0.00% 2 Missing ⚠️
sk-skel/src/lib.rs 80.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #260      +/-   ##
==========================================
+ Coverage   79.00%   79.25%   +0.25%     
==========================================
  Files          61       61              
  Lines        3986     4010      +24     
==========================================
+ Hits         3149     3178      +29     
+ Misses        837      832       -5     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ogorman89 ogorman89 changed the title SK-246 // add transform option to skctl export SK-246 // add transform option to skctl export and snapshot Jul 2, 2026
@ogorman89 ogorman89 marked this pull request as ready for review July 2, 2026 21:17
@ogorman89 ogorman89 requested a review from drmorr0 July 2, 2026 21:18
Base automatically changed from ian/refactor to main July 9, 2026 22:53
@ogorman89 ogorman89 force-pushed the ian/transform-export branch from 1c7e090 to 794e4dc Compare July 10, 2026 20:15
@ogorman89 ogorman89 removed the blocked label Jul 10, 2026
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.

1 participant