-
Notifications
You must be signed in to change notification settings - Fork 153
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
feat: add promotion step to remove a file/directory #3086
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: nitishfy <[email protected]>
✅ Deploy Preview for docs-kargo-io ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3086 +/- ##
==========================================
+ Coverage 51.20% 51.22% +0.01%
==========================================
Files 283 284 +1
Lines 25466 25505 +39
==========================================
+ Hits 13041 13065 +24
- Misses 11729 11743 +14
- Partials 696 697 +1 ☔ View full report in Codecov by Sentry. |
}, | ||
}, | ||
{ | ||
name: "fails for non-existent path", |
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.
In addition to these tests, can you add:
- One which removes a symlink (should remove the literal symlink, and not the file).
- One which removes a file or directory within a symlink (should traverse into the symlink and remove it).
This needs docs. |
@nitishfy we're looking to have 1.2 work done by 12/20 with plans to release after the winter break. Are you able to implement feedback before then? |
Signed-off-by: nitishfy <[email protected]>
}, | ||
}, | ||
{ | ||
name: "removes symlink only", |
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.
name: "removes symlink only", | |
name: "removes symlink only", |
@hiddeco I tried debugging to understand why is this test case failing even though the path specified is correct. After debugging i found that, SecureJoin()
is actually joining the file input/input.txt
that is linked by the symlink.txt
instead of joining the file symlink.txt
, Following is the error message
=== RUN Test_fileDeleter_runPromotionStep
--- FAIL: Test_fileDeleter_runPromotionStep (120.72s)
=== RUN Test_fileDeleter_runPromotionStep/removes_symlink_only
path to delete: /tmp/Test_fileDeleter_runPromotionStepremoves_symlink_only1504252788/001/input/input.txt
file_deleter_test.go:100:
Error Trace: /home/nitish/Documents/Work/Open-Source/kargo/internal/directives/file_deleter_test.go:100
/home/nitish/Documents/Work/Open-Source/kargo/internal/directives/file_deleter_test.go:115
Error: Received unexpected error:
stat /tmp/Test_fileDeleter_runPromotionStepremoves_symlink_only1504252788/001/input.txt: no such file or directory
Test: Test_fileDeleter_runPromotionStep/removes_symlink_only
--- FAIL: Test_fileDeleter_runPromotionStep/removes_symlink_only (120.72s)
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.
cc @hiddeco PTAL
Yes. The failing test case is the only blockage so far, once the CI checks are running I'll add the docs. |
Fixes #2860