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

fix error invoking kargo render #1114

Merged
merged 2 commits into from
Nov 15, 2023

Conversation

krancour
Copy link
Member

This is a follow-up to #1109.

I'm not sure how it was that I ever observed #1109 working correctly. All Kargo Render CLI invocations now fail.

The issue is that once cmd.Env for the child process exec'ing Kargo Render becomes non-nil (as it did starting in #1109), the child process no longer inherits its parent's environment -- the Go docs say so:

// Env specifies the environment of the process.
// Each entry is of the form "key=value".
// If Env is nil, the new process uses the current process's
// environment.
// If Env contains duplicate environment keys, only the last
// value in the slice for each duplicate key is used.
// As a special case on Windows, SYSTEMROOT is always added if
// missing and not explicitly set to the empty string.
Env []string

This causes PATH to be missing when the Kargo CLI spawns its own child processes to execute git commands.

This PR fixes the issue.

Signed-off-by: Kent <kent.rancourt@gmail.com>
@krancour krancour added this to the v0.2.1 milestone Nov 15, 2023
@krancour krancour self-assigned this Nov 15, 2023
@krancour krancour requested a review from a team as a code owner November 15, 2023 05:56
Copy link

netlify bot commented Nov 15, 2023

Deploy Preview for docs-kargo-akuity-io ready!

Name Link
🔨 Latest commit 1ebba2e
🔍 Latest deploy log https://app.netlify.com/sites/docs-kargo-akuity-io/deploys/6554603c1acdee000811e016
😎 Deploy Preview https://deploy-preview-1114.kargo.akuity.io
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Nov 15, 2023

Codecov Report

Attention: 25 lines in your changes are missing coverage. Please review.

Comparison is base (9007727) 50.37% compared to head (1ebba2e) 50.32%.
Report is 1 commits behind head on main.

Files Patch % Lines
internal/kubeclient/indexer.go 0.00% 23 Missing ⚠️
internal/controller/stages/stages.go 75.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1114      +/-   ##
==========================================
- Coverage   50.37%   50.32%   -0.05%     
==========================================
  Files         114      114              
  Lines        8076     8089      +13     
==========================================
+ Hits         4068     4071       +3     
- Misses       3861     3871      +10     
  Partials      147      147              

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

@krancour krancour enabled auto-merge (squash) November 15, 2023 06:09
@krancour krancour merged commit a926f27 into akuity:main Nov 15, 2023
12 of 14 checks passed
@krancour krancour deleted the krancour/kargo-render-fix branch January 8, 2024 21:15
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.

2 participants