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: kustomize write target starts failing after indeterminate period at time #583

Merged
merged 1 commit into from
Jul 6, 2023

Conversation

dmavis
Copy link
Contributor

@dmavis dmavis commented Jul 1, 2023

Fixes at least one of the causes of the image kustomize write back with git failing as documented in this issue: #240

Our Argo CD Image Updater deployment started having the same issue after switching to use Kustomize from Helm. After troubleshooting the issue with our setup, the process chdir that is happening in the write kustomization func didn't always chdir back to the original dir. Then subsequent os.Getwd() calls would fail with getwd: no such file or directory because the process working directory was still set to a previous temp dir that no longer exists. After reviewing the implementation details and testing, the chdir code doesn't appear to be needed anyway so it has been removed in the PR fixing the issue.

Note: make test, make test-race and make lint targets are all still passing after the changes.

Also during testing, I noticed that zombie git processes are building up in the running container after each periodic image updater run. The Argo CD project had a similar issue: argoproj/argo-cd#3611. I will be opening another PR with a similar fix as well

@dmavis dmavis changed the title Fix: kustomize write target issue starts failing after indeterminate period at time Fix: kustomize write target starts failing after indeterminate period at time Jul 1, 2023
@codecov-commenter
Copy link

codecov-commenter commented Jul 1, 2023

Codecov Report

Merging #583 (008ff24) into master (5366cc1) will increase coverage by 0.11%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #583      +/-   ##
==========================================
+ Coverage   65.86%   65.97%   +0.11%     
==========================================
  Files          22       22              
  Lines        2045     2037       -8     
==========================================
- Hits         1347     1344       -3     
+ Misses        569      567       -2     
+ Partials      129      126       -3     
Impacted Files Coverage Δ
pkg/argocd/git.go 65.87% <ø> (+1.03%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Signed-off-by: Daniel Mavis <daniel.mavis@faa.gov>
Copy link
Contributor

@jannfis jannfis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@jannfis jannfis merged commit 7c93d60 into argoproj-labs:master Jul 6, 2023
9 of 10 checks passed
@dmavis dmavis deleted the write-kust-fix branch July 6, 2023 01:43
ks-yim pushed a commit to ks-yim/argocd-image-updater that referenced this pull request Jul 9, 2023
Signed-off-by: Daniel Mavis <daniel.mavis@faa.gov>
Signed-off-by: KS. Yim <ks.yim@linecorp.com>
jwhy89 pushed a commit to jwhy89/argocd-image-updater that referenced this pull request Aug 17, 2023
Signed-off-by: Daniel Mavis <daniel.mavis@faa.gov>
Signed-off-by: Jarvis Yang <jarvis.yang@recurohealth.com>
xescab pushed a commit to xescab/argocd-image-updater that referenced this pull request Sep 8, 2023
Signed-off-by: Daniel Mavis <daniel.mavis@faa.gov>
Signed-off-by: Francesc Arbona <francesc.arbona@global.ntt>
dlactin pushed a commit to dlactin/argocd-image-updater that referenced this pull request May 9, 2024
Signed-off-by: Daniel Mavis <daniel.mavis@faa.gov>
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.

None yet

3 participants