-
Notifications
You must be signed in to change notification settings - Fork 261
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
Add option to allow enviornment variables using file #1433
Conversation
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. ℹ️ Googlers: Go here for more info. |
Welcome @boaz0! It looks like this is your first PR to knative/client 🎉 |
Hi @boaz0. Thanks for your PR. I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
@googlebot I fixed it. |
/ok-to-test |
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.
Thanks for the PR. At first glance, I noticed that unit tests were missing. Can you please add some tests while we review the PR. Thanks
Can you please rerun codegen and commit the changes? And as Muru mentioned that'd nice to have unit tests, otherwise the PR won't pass Codecov checks. ./hack/build.sh -c |
@boaz0 thanks a lot for the PR and your contribution. There are some minor comments and suggestions to the PR. Would you have time to address those? No problem if not, we would then help you here. |
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.
Please address the go format changes as it makes reviewing a bit painful (first world problem I know) and please add some tests (unit and integration)
Thanks for contribution
@maximilien @rhuss @itsmurugappan @dsimansk I updated the PR as you requested. Feel free to give a second code-review. |
@rhuss @dsimansk why are we iterating the whole array of args here -> client/pkg/kn/flags/podspec_helper.go Line 70 in dedcad7
It could simplify this pr if its not there. |
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.
Codecov Report
@@ Coverage Diff @@
## main #1433 +/- ##
==========================================
- Coverage 78.98% 78.69% -0.29%
==========================================
Files 162 162
Lines 8416 8392 -24
==========================================
- Hits 6647 6604 -43
- Misses 1088 1101 +13
- Partials 681 687 +6
Continue to review full report at Codecov.
|
afair its so to keep the order of the environment variables as specified (a simple map is not good enough). haven't check this PR yet, but we should also take care that mixing |
@boaz0 sorry for the delay. Here is the summary of changes
Please let me know if you have any questions. |
@itsmurugappan thanks for the guidance. I updated the PR. I hope it's good enough. |
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
* Add `GetEnvsFromFile` to `util` * Add to `podspec` flags `--env-file` and `EnvFile` to `PodSpec`. * If `env-file` is specified load env vars from file to memory, convert them into ordered map and pass them to UpdateEnvVars function by setting custom args for each one of them instead of using command line args. Signed-off-by: Boaz <[email protected]>
The following is the coverage report on the affected files.
|
changes look good to me, the only thing is code coverage is reduced so the pr merge might not succeed. @rhuss @maximilien @dsimansk can you please approve this pr, so it would allow the additional workflows to run. |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: boaz0, rhuss 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 |
@itsmurugappan the error looks strange, like a commit with an improper email. Would it be possible to squash the PR manually and force push it, to get rid of this ? |
There was once a very similar error in the kamelet repository. rebase to |
/lgtm |
Sorry for the late response (holidays and family...). |
Description
This PR gives the option to set environment variables from a file by specifying its path in
--env-file
.Changes
GetEnvsFromFile
toutil
UpdateEnvsFromFile
topodspec_helpers
podspec
flags--env-file
andEnvFile
toPodSpec
.UpdateEnvsFromFile
ifenv-file
was changed.Reference
Closes #278