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: infer correct shard in statefulset setup (#17124, #17016) (#17167) #17204

Merged
merged 2 commits into from
Feb 13, 2024
Merged

fix: infer correct shard in statefulset setup (#17124, #17016) (#17167) #17204

merged 2 commits into from
Feb 13, 2024

Conversation

ishitasequeira
Copy link
Member

cherrypick fix: infer correct shard in statefulset setup (#17124, #17016) (#17167)

* fix: infer correct shard in statefulset setup

Signed-off-by: Lukas Wöhrl <[email protected]>

* fix the case if only a single replica

Signed-off-by: Lukas Wöhrl <[email protected]>

* fix: resolving pointer on shard compare

Signed-off-by: Lukas Wöhrl <[email protected]>

* fix: add readlock for cluster accessor

Signed-off-by: Lukas Wöhrl <[email protected]>

* fix: use defer to protect access of 'shard'

Signed-off-by: Lukas Wöhrl <[email protected]>

* fix: revert locking in getclusteraccessor

Signed-off-by: Lukas Wöhrl <[email protected]>

* fix: handle nil shard case

Signed-off-by: Lukas Wöhrl <[email protected]>

* fix: handle any nil shard value as false

Signed-off-by: Lukas Wöhrl <[email protected]>

* fix: handle nil case and fix another missing pointer dereference

Signed-off-by: Lukas Wöhrl <[email protected]>

* revert

Signed-off-by: Lukas Wöhrl <[email protected]>

* fix: added tests and fixed some behaviour bugs

Signed-off-by: Lukas Wöhrl <[email protected]>

* test: add test to validate that Shard value is not overriden

Signed-off-by: Lukas Wöhrl <[email protected]>

* fix: added tests and fixe the case when server is changed inside a secret

Signed-off-by: Lukas Wöhrl <[email protected]>

* tests: add test cases for infering the shard logic

Signed-off-by: Lukas Wöhrl <[email protected]>

---------

Signed-off-by: Lukas Wöhrl <[email protected]>
(cherry picked from commit 5d6111b)
@ishitasequeira ishitasequeira requested a review from a team as a code owner February 13, 2024 18:04
Signed-off-by: ishitasequeira <[email protected]>
Copy link

codecov bot commented Feb 13, 2024

Codecov Report

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

Comparison is base (a1a5c58) 49.41% compared to head (a6de4f4) 49.72%.

Files Patch % Lines
controller/sharding/sharding.go 88.00% 4 Missing and 2 partials ⚠️
Additional details and impacted files
@@               Coverage Diff                @@
##           release-2.10   #17204      +/-   ##
================================================
+ Coverage         49.41%   49.72%   +0.31%     
================================================
  Files               272      272              
  Lines             47897    47964      +67     
================================================
+ Hits              23666    23850     +184     
+ Misses            21896    21765     -131     
- Partials           2335     2349      +14     

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

@crenshaw-dev crenshaw-dev merged commit 2268f08 into argoproj:release-2.10 Feb 13, 2024
19 of 20 checks passed
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.

3 participants