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

feat: Add workDir API to the script and command operation APIs to make parametrize the working directory #1913

Merged
merged 3 commits into from
Sep 6, 2024

Conversation

sergenyalcin
Copy link
Contributor

Explanation

The working directory for the script and command operations is hard-coded for the test directory. For some scripts it can affect the logic of some commands like cp. This is directly affects the end users of uptest after kuttl to chainsaw migration.

This PR adds workDir API to the script and command operation APIs to make parametrize the working directory.

Related issue

Fixes #1912

Proposed Changes

Checklist

  • I have read the contributing guidelines.
  • I have read the PR documentation guide and followed the process including adding proof manifests to this PR.
  • This is a bug fix and I have added unit tests that prove my fix is effective.

Further Comments

Sorry, something went wrong.

…metrize the working directory

Signed-off-by: Sergen Yalçın <yalcinsergen97@gmail.com>
@sergenyalcin sergenyalcin requested a review from a team as a code owner September 3, 2024 09:43
@eddycharly
Copy link
Member

@sergenyalcin did you see my reply on slack https://kubernetes.slack.com/archives/C067LUFL43U/p1725360878442449 ?

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@eddycharly eddycharly changed the title Add workDir API to the script and command operation APIs to make parametrize the working directory feat: Add workDir API to the script and command operation APIs to make parametrize the working directory Sep 6, 2024
@eddycharly eddycharly added this to the v0.2.9 milestone Sep 6, 2024
@eddycharly
Copy link
Member

eddycharly commented Sep 6, 2024

@sergenyalcin I'm going to merge this and do follow ups.

Thanks for initiating the changes!

@eddycharly
Copy link
Member

/cherry-pick release-0.2

eddycharly
eddycharly previously approved these changes Sep 6, 2024
@eddycharly eddycharly enabled auto-merge (squash) September 6, 2024 07:33
Copy link

codecov bot commented Sep 6, 2024

Codecov Report

Attention: Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.

Project coverage is 69.96%. Comparing base (54866f9) to head (680e2b9).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
pkg/engine/operations/command/operation.go 0.00% 1 Missing and 1 partial ⚠️
pkg/engine/operations/script/operation.go 0.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1913      +/-   ##
==========================================
- Coverage   70.01%   69.96%   -0.06%     
==========================================
  Files         134      134              
  Lines        5489     5493       +4     
==========================================
  Hits         3843     3843              
- Misses       1332     1334       +2     
- Partials      314      316       +2     

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

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
@eddycharly eddycharly disabled auto-merge September 6, 2024 07:51
@eddycharly eddycharly merged commit 2d2fcf4 into kyverno:main Sep 6, 2024
12 of 14 checks passed
gcp-cherry-pick-bot bot pushed a commit that referenced this pull request Sep 6, 2024
…e parametrize the working directory (#1913)

* Add workDir API to the script and command operation APIs to make parametrize the working directory

Signed-off-by: Sergen Yalçın <yalcinsergen97@gmail.com>

* update codegen

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

---------

Signed-off-by: Sergen Yalçın <yalcinsergen97@gmail.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Co-authored-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
eddycharly added a commit that referenced this pull request Sep 6, 2024
…e parametrize the working directory (#1913) (#1919)

* Add workDir API to the script and command operation APIs to make parametrize the working directory



* update codegen



---------

Signed-off-by: Sergen Yalçın <yalcinsergen97@gmail.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Co-authored-by: Sergen Yalçın <44261342+sergenyalcin@users.noreply.github.com>
Co-authored-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Parametrize the working directory for script and command operations
2 participants