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(repo-server): excess git requests, cache lock on revisions #2

Open
wants to merge 263 commits into
base: lsremote-part2
Choose a base branch
from

Conversation

nromriell
Copy link
Owner

@nromriell nromriell commented Nov 21, 2023

Fixes argoproj#14725

Third part of a split of the argoproj#16309 and follow-up to argoproj#16410

Another piece of the fixes for argoproj#14725. This resolves the excess ls-remote requests that still occur in high application count environments due to the fact that all active processes get their cache invalidated at the same time. When this happens they all try to re-fetch the remotes at the same time and all miss the cache.

The solution is to add a soft cache level lock on the key, the first process to try and access that key on a miss will obtain the lock and attempt to refresh the cache.

This changed required adding the ability to use "set only if not exists" on the util/cache (redis NX or memcached add) interface. Without this option all of the processes could still end up in a position where they think they own the lock, so there are some minor changes to the util/cache interface:

  • Adds a DisableOverwrite option to represent the NX/add during set option
  • The Item struct now also contains options for the cache set actions. This allows passing Delete and DisableOverwrite in a shared options value and replaces the position of the current delete option in the SetItem call

This is the final major logic portion of the changes to remove all the excess git calls, but we can get some good performance improvements by also adding the two layer cache to the caching layer for revisions. So I'll be following up with another PR to add that. Most of the abstraction to prepare for that was handled as part of this PR.

Baseline v2.9.0 with 200 multi-source applications with a ref only source:
Screenshot from 2023-11-18 18-24-30

With all the changes up to and including this PR under the same conditions:
Screenshot from 2023-11-21 03-19-14

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • The title of the PR conforms to the Toolchain Guide
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • Optional. My organization is added to USERS.md.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).
  • My new feature complies with the feature status guidelines.
  • I have added a brief description of why this PR is necessary and/or what this PR solves.

ashutosh16 and others added 20 commits December 18, 2023 20:15
…16603)

* fix(ui): show prompt when using prune option

Signed-off-by: ashutosh16 <[email protected]>

* fix(ui): show prompt when using prune option

Signed-off-by: ashutosh16 <[email protected]>

* fix(ui): show prompt when using prune option

Signed-off-by: ashutosh16 <[email protected]>

fix(ui): show prompt when using prune option

Signed-off-by: ashutosh16 <[email protected]>

* chore: update message and simplify code

Signed-off-by: Michael Crenshaw <[email protected]>

* don't warn on partial sync

Signed-off-by: Michael Crenshaw <[email protected]>

* fix(ui): lint

Signed-off-by: ashutosh16 <[email protected]>

---------

Signed-off-by: ashutosh16 <[email protected]>
Signed-off-by: Michael Crenshaw <[email protected]>
Co-authored-by: Michael Crenshaw <[email protected]>
* feat: Implement Server-Side Diff

Signed-off-by: Leonardo Luz Almeida <[email protected]>

* propagate the refreshtype to the diff config

Signed-off-by: Leonardo Luz Almeida <[email protected]>

* Create the serverSideDiff config

Signed-off-by: Leonardo Luz Almeida <[email protected]>

* chore: add featureflag utility package

Signed-off-by: Leonardo Luz Almeida <[email protected]>

* remove featureflag package

Signed-off-by: Leonardo Luz Almeida <[email protected]>

* add param

Signed-off-by: Leonardo Luz Almeida <[email protected]>

* make ssd configurable with app annotation

Signed-off-by: Leonardo Luz Almeida <[email protected]>

* add server-side-diff flags

Signed-off-by: Leonardo Luz Almeida <[email protected]>

* apply the same logic regardless of the refresh type

Signed-off-by: Leonardo Luz Almeida <[email protected]>

* fix gitops-engine reference

Signed-off-by: Leonardo Luz Almeida <[email protected]>

* address review comments

Signed-off-by: Leonardo Luz Almeida <[email protected]>

* Address review comments

Signed-off-by: Leonardo Luz Almeida <[email protected]>

* docs: add docs related to server-side-diff

Signed-off-by: Leonardo Luz Almeida <[email protected]>

* docs: update doc

Signed-off-by: Leonardo Luz Almeida <[email protected]>

* Add config to include mutation webhooks

Signed-off-by: Leonardo Luz Almeida <[email protected]>

* Address review comments

Signed-off-by: Leonardo Luz Almeida <[email protected]>

* go mod update

Signed-off-by: Leonardo Luz Almeida <[email protected]>

* Add sdd cache test case

Signed-off-by: Leonardo Luz Almeida <[email protected]>

* fix ssd cache unit test

Signed-off-by: Leonardo Luz Almeida <[email protected]>

* Update clidocs

Signed-off-by: Leonardo Luz Almeida <[email protected]>

* update manifests

Signed-off-by: Leonardo Luz Almeida <[email protected]>

* Fix procfile

Signed-off-by: Leonardo Luz Almeida <[email protected]>

* additional doc changes

Signed-off-by: Leonardo Luz Almeida <[email protected]>

* update gitops-engine version

Signed-off-by: Leonardo Luz Almeida <[email protected]>

---------

Signed-off-by: Leonardo Luz Almeida <[email protected]>
* add extension

Signed-off-by: Alexy Mantha <[email protected]>

* rename to status panel

Signed-off-by: Alexy Mantha <[email protected]>

* wip

Signed-off-by: Alexy Mantha <[email protected]>

* cleanup

Signed-off-by: Alexy Mantha <[email protected]>

* add docs

Signed-off-by: Alexy Mantha <[email protected]>

* add key

Signed-off-by: Alexy Mantha <[email protected]>

* fix copy/paste

Signed-off-by: Alexy Mantha <[email protected]>

* wip

Signed-off-by: Alexy Mantha <[email protected]>

* flyout

Signed-off-by: Alexy Mantha <[email protected]>

* cleanup

Signed-off-by: Alexy Mantha <[email protected]>

* lint

Signed-off-by: Alexy Mantha <[email protected]>

* document flyout

Signed-off-by: Alexy Mantha <[email protected]>

* rename

Signed-off-by: Alexy Mantha <[email protected]>

* linting

Signed-off-by: Alexy Mantha <[email protected]>

---------

Signed-off-by: Alexy Mantha <[email protected]>
…#16645)

Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.14.0 to 0.17.0.
- [Commits](golang/crypto@v0.14.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* docs: remove core install commands from getting started

I often accidentally run the core install commands when quickly copying and pasting commands from the getting started guide, which leads to confusion. I've also spent plenty of time helping newcomers to Argo CD who have done the same and are confused when they can't reach the UI.

Given that this is a "getting started" guide, it's ideal to provide only the commands required. I've removed the commands and left the link out to the core install page for those who are interested in going down that path.

Signed-off-by: Nicholas Morey <[email protected]>

* fix: use link to install commands in core docs

Signed-off-by: Nicholas Morey <[email protected]>

* fix: use tip and improve wording

Signed-off-by: Nicholas Morey <[email protected]>

---------

Signed-off-by: Nicholas Morey <[email protected]>
…j#16727)

* Fixed log horizontal scroll

Signed-off-by: Yi Cai <[email protected]>

* Updated log line-height

Signed-off-by: Yi Cai <[email protected]>

---------

Signed-off-by: Yi Cai <[email protected]>
Missing \ in example

Signed-off-by: mfreeman451 <[email protected]>
* add list permissions for deployments to application controller

Signed-off-by: ishitasequeira <[email protected]>

* revert redis-ha chart changes

Signed-off-by: ishitasequeira <[email protected]>

* revert redis-ha chart changes

Signed-off-by: ishitasequeira <[email protected]>

---------

Signed-off-by: ishitasequeira <[email protected]>
alexmt and others added 26 commits March 13, 2024 23:39
…for one chart (argoproj#17518)

* fix: Argo CD unnecessary enforce sequential helm manifest generation for one chart

Signed-off-by: Alexander Matyushentsev <[email protected]>

* Update docs/operator-manual/high_availability.md

Signed-off-by: Dan Garfield <[email protected]>

---------

Signed-off-by: Alexander Matyushentsev <[email protected]>
Signed-off-by: Dan Garfield <[email protected]>
Co-authored-by: Dan Garfield <[email protected]>
Bumps [actions/checkout](https://github.com/actions/checkout) from 3df4ab11eba7bda6032a0b82a6bb43b11571feac to 8410ad0602e1e429cee44a835ae9f77f654a6694.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@3df4ab1...8410ad0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…on (argoproj#17521)

* Add error messages to return statements in BlockingDial function

Signed-off-by: danqixu <[email protected]>

* amend error wrapping from %s to %w

Signed-off-by: danqixu <[email protected]>

---------

Signed-off-by: danqixu <[email protected]>
* chore(deps): upgrade helm to 3.14.3

Signed-off-by: David Bunn <[email protected]>

* chore(deps): upgrade helm to 3.14.3

Signed-off-by: David Bunn <[email protected]>

---------

Signed-off-by: David Bunn <[email protected]>
…roj#17537)

Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5.2.0 to 5.3.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](docker/build-push-action@af5a7ed...2cdde99)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ta to stable (argoproj#17529)

* Update the status of the feature, app in any namespace, from beta to stable

Signed-off-by: Mangaal <[email protected]>

* adding warning and removing **Current feature state**

Signed-off-by: Mangaal <[email protected]>

---------

Signed-off-by: Mangaal <[email protected]>
* feat: pick random user and exclude admin user and current user from deletion candidates

Signed-off-by: pashakostohrys <[email protected]>

* feat: increase default max cache size

Signed-off-by: pashakostohrys <[email protected]>

* add nil protection

Signed-off-by: pashakostohrys <[email protected]>

* Update util/session/sessionmanager.go

Signed-off-by: Dan Garfield <[email protected]>

Signed-off-by: Dan Garfield <[email protected]>

* chore: fix linter issues

Signed-off-by: pashakostohrys <[email protected]>

---------

Signed-off-by: pashakostohrys <[email protected]>
Signed-off-by: Dan Garfield <[email protected]>
Co-authored-by: Dan Garfield <[email protected]>
* fix: Fix concurrency issue in session manager

Signed-off-by: jannfis <[email protected]>

* Add note that modification to the map must be done in a thread safe manner

* chore: fix linter issues

Signed-off-by: pashakostohrys <[email protected]>

---------

Signed-off-by: jannfis <[email protected]>
Signed-off-by: pashakostohrys <[email protected]>
Co-authored-by: Dan Garfield <[email protected]>
Co-authored-by: pashakostohrys <[email protected]>
…17555)

Bumps [postcss](https://github.com/postcss/postcss) from 8.4.35 to 8.4.36.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](postcss/postcss@8.4.35...8.4.36)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps library/registry from `f4e1b87` to `fb9c9ae`.

---
updated-dependencies:
- dependency-name: library/registry
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…rgoproj#15950)

* doc(cli): update argocd_app_diff

Adding the fact that secrets are ignored by the diff (not really stated in the doc so far)

Signed-off-by: ario0 <[email protected]>

* doc: remove whitespace

Signed-off-by: ario0 <[email protected]>

---------

Signed-off-by: ario0 <[email protected]>
Signed-off-by: Alexis Renard <[email protected]>
Co-authored-by: pasha-codefresh <[email protected]>
Co-authored-by: Ishita Sequeira <[email protected]>
…rce application (argoproj#17425)

* "feat:add cli commands to create/set/unset/edit sources for multi-source app"

Signed-off-by: ishitasequeira <[email protected]>

* fixed the ci failure

Signed-off-by: ishitasequeira <[email protected]>

* update commands

Signed-off-by: ishitasequeira <[email protected]>

* error out if source-index not specified for multi-source applications

Signed-off-by: ishitasequeira <[email protected]>

* fixed the ci failure

Signed-off-by: ishitasequeira <[email protected]>

* fix tests

Signed-off-by: ishitasequeira <[email protected]>

* set 0 as default source index for app create

Signed-off-by: ishitasequeira <[email protected]>

* add index to ParameterOverrides function

Signed-off-by: ishitasequeira <[email protected]>

* do not allow overrides for applications with multiple sources

Signed-off-by: ishitasequeira <[email protected]>

* update tests

Signed-off-by: ishitasequeira <[email protected]>

* remove create with override example

Signed-off-by: ishitasequeira <[email protected]>

* address comments

Signed-off-by: ishitasequeira <[email protected]>

* update tests

Signed-off-by: ishitasequeira <[email protected]>

* update examples in docs

Signed-off-by: ishitasequeira <[email protected]>

* update logs

Signed-off-by: ishitasequeira <[email protected]>

* Add test and update docs

Signed-off-by: ishitasequeira <[email protected]>

---------

Signed-off-by: ishitasequeira <[email protected]>
* cluster-add-link

Signed-off-by: Surajyadav <[email protected]>

* docs

Signed-off-by: Surajyadav <[email protected]>

* docs-panel

Signed-off-by: Surajyadav <[email protected]>

* added

Signed-off-by: Surajyadav <[email protected]>

* fixed

Signed-off-by: Surajyadav <[email protected]>

---------

Signed-off-by: Surajyadav <[email protected]>
…17573)

Bumps [postcss](https://github.com/postcss/postcss) from 8.4.36 to 8.4.37.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](postcss/postcss@8.4.36...8.4.37)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [slsa-framework/slsa-github-generator](https://github.com/slsa-framework/slsa-github-generator) from 1.9.0 to 1.10.0.
- [Release notes](https://github.com/slsa-framework/slsa-github-generator/releases)
- [Changelog](https://github.com/slsa-framework/slsa-github-generator/blob/main/CHANGELOG.md)
- [Commits](slsa-framework/slsa-github-generator@v1.9.0...v1.10.0)

---
updated-dependencies:
- dependency-name: slsa-framework/slsa-github-generator
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…rgoproj#17598)

Bumps [webpack-dev-middleware](https://github.com/webpack/webpack-dev-middleware) from 5.3.1 to 5.3.4.
- [Release notes](https://github.com/webpack/webpack-dev-middleware/releases)
- [Changelog](https://github.com/webpack/webpack-dev-middleware/blob/v5.3.4/CHANGELOG.md)
- [Commits](webpack/webpack-dev-middleware@v5.3.1...v5.3.4)

---
updated-dependencies:
- dependency-name: webpack-dev-middleware
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…17582)

Bumps [postcss](https://github.com/postcss/postcss) from 8.4.37 to 8.4.38.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](postcss/postcss@8.4.37...8.4.38)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…proj#17542)

Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.5 to 1.15.6.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](follow-redirects/follow-redirects@v1.15.5...v1.15.6)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…7524)

Bumps [docker/login-action](https://github.com/docker/login-action) from 2.2.0 to 3.1.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](docker/login-action@465a078...e92390c)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [ip](https://github.com/indutny/node-ip) from 1.1.5 to 1.1.9.
- [Commits](indutny/node-ip@v1.1.5...v1.1.9)

---
updated-dependencies:
- dependency-name: ip
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: pasha-codefresh <[email protected]>
Signed-off-by: nromriell <[email protected]>
agaudreault and others added 3 commits March 23, 2024 16:35
* fix: invalid badge validation

Signed-off-by: Alexandre Gaudreault <[email protected]>

* use util methods

Signed-off-by: Alexandre Gaudreault <[email protected]>

* rfc accept both lower and upper

Signed-off-by: Alexandre Gaudreault <[email protected]>

* fix unit test affecting each other with var modification

Signed-off-by: Alexandre Gaudreault <[email protected]>

---------

Signed-off-by: Alexandre Gaudreault <[email protected]>
Co-authored-by: Jann Fischer <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment