Skip to content

Conversation

gcp-cherry-pick-bot[bot]
Copy link

Cherry-picked chore: Graceful shutdown for API Server (#18642) (#21224)

Closes #18642

Implements a graceful shutdown the the API server. Without this, ArgoCD API server will eventually return 502 during rolling update. However, healthcheck would return 503 if the server is terminating.

Signed-off-by: Andrii Korotkov andrii.korotkov@verkada.com
Co-authored-by: Leonardo Luz Almeida leonardo_almeida@intuit.com
Co-authored-by: Michael Crenshaw 350466+crenshaw-dev@users.noreply.github.com

  • Init server only once, but keep re-initializing listeners

Signed-off-by: Andrii Korotkov andrii.korotkov@verkada.com

  • Check error for SetParamInSettingConfigMap as needed after fresh master

Signed-off-by: Andrii Korotkov andrii.korotkov@verkada.com

  • Prevent a data race

Signed-off-by: Andrii Korotkov andrii.korotkov@verkada.com

  • Remove unused variable, don't pass lock when not necessary

Signed-off-by: Andrii Korotkov andrii.korotkov@verkada.com

  • Try overriding URL instead of additional URLs

Signed-off-by: Andrii Korotkov andrii.korotkov@verkada.com

  • Use a more specific url

Signed-off-by: Andrii Korotkov andrii.korotkov@verkada.com


Signed-off-by: Andrii Korotkov andrii.korotkov@verkada.com
Co-authored-by: Leonardo Luz Almeida leonardo_almeida@intuit.com
Co-authored-by: Michael Crenshaw 350466+crenshaw-dev@users.noreply.github.com

  • Use a custom signal for graceful restart

Signed-off-by: Andrii Korotkov andrii.korotkov@verkada.com

  • Re-run tests

Signed-off-by: Andrii Korotkov andrii.korotkov@verkada.com


Signed-off-by: Andrii Korotkov andrii.korotkov@verkada.com
Co-authored-by: Leonardo Luz Almeida leonardo_almeida@intuit.com
Co-authored-by: Michael Crenshaw 350466+crenshaw-dev@users.noreply.github.com

* fix: Graceful shutdown for the API server (#18642) (#20981)

* fix: Graceful shutdown for the API server (#18642)

Closes #18642

Implements a graceful shutdown the the API server. Without this, ArgoCD API server will eventually return 502 during rolling update. However, healthcheck would return 503 if the server is terminating.

Signed-off-by: Andrii Korotkov <andrii.korotkov@verkada.com>
Co-authored-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* Init server only once, but keep re-initializing listeners

Signed-off-by: Andrii Korotkov <andrii.korotkov@verkada.com>

* Check error for SetParamInSettingConfigMap as needed after fresh master

Signed-off-by: Andrii Korotkov <andrii.korotkov@verkada.com>

* Prevent a data race

Signed-off-by: Andrii Korotkov <andrii.korotkov@verkada.com>

* Remove unused variable, don't pass lock when not necessary

Signed-off-by: Andrii Korotkov <andrii.korotkov@verkada.com>

* Try overriding URL instead of additional URLs

Signed-off-by: Andrii Korotkov <andrii.korotkov@verkada.com>

* Use a more specific url

Signed-off-by: Andrii Korotkov <andrii.korotkov@verkada.com>

---------

Signed-off-by: Andrii Korotkov <andrii.korotkov@verkada.com>
Co-authored-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* Use a custom signal for graceful restart

Signed-off-by: Andrii Korotkov <andrii.korotkov@verkada.com>

* Re-run tests

Signed-off-by: Andrii Korotkov <andrii.korotkov@verkada.com>

---------

Signed-off-by: Andrii Korotkov <andrii.korotkov@verkada.com>
Co-authored-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
@gcp-cherry-pick-bot gcp-cherry-pick-bot bot requested a review from a team as a code owner December 17, 2024 22:02
Copy link

codecov bot commented Dec 17, 2024

Codecov Report

Attention: Patch coverage is 71.07438% with 35 lines in your changes missing coverage. Please review.

Project coverage is 55.18%. Comparing base (a89d012) to head (1966506).
Report is 51 commits behind head on release-2.14.

Files with missing lines Patch % Lines
server/server.go 79.80% 17 Missing and 4 partials ⚠️
cmd/argocd-server/commands/argocd_server.go 0.00% 8 Missing ⚠️
util/cache/redis.go 20.00% 3 Missing and 1 partial ⚠️
util/session/state.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@               Coverage Diff                @@
##           release-2.14   #21229      +/-   ##
================================================
+ Coverage         55.01%   55.18%   +0.16%     
================================================
  Files               338      338              
  Lines             57075    57167      +92     
================================================
+ Hits              31401    31548     +147     
+ Misses            22972    22920      -52     
+ Partials           2702     2699       -3     

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

@pasha-codefresh pasha-codefresh merged commit 018014c into release-2.14 Dec 18, 2024
22 of 25 checks passed
@pasha-codefresh pasha-codefresh deleted the cherry-pick-d693e5-release-2.14 branch December 18, 2024 13:11
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.

2 participants