fix: change to write lock for thread safety in json unmarshal #242

Merged
argoyle merged 1 commits from fix/thread-safety-json-unmarshal into main 2025-11-02 21:09:19 +00:00
argoyle commented 2025-11-02 20:57:11 +00:00 (Migrated from gitlab.com)

Replace read lock with write lock in client.go to ensure thread
safety during the unmarshalling of JSON data. This prevents
concurrent read access and potential data races, improving
the integrity of the privileges data structure.

Replace read lock with write lock in client.go to ensure thread safety during the unmarshalling of JSON data. This prevents concurrent read access and potential data races, improving the integrity of the privileges data structure.
argoyle (Migrated from gitlab.com) scheduled this pull request to auto merge when all checks succeed 2025-11-02 20:59:14 +00:00
argoyle commented 2025-11-02 21:08:53 +00:00 (Migrated from gitlab.com)

Codecov Report

All modified and coverable lines are covered by tests.
Project coverage is 94.35%. Comparing base (46e26ef) to head (af93e41).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #239   +/-   ##
=======================================
  Coverage   94.35%   94.35%           
=======================================
  Files           2        2           
  Lines         124      124           
=======================================
  Hits          117      117           
  Misses          7        7           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
## [Codecov](https://app.codecov.io/gl/unboundsoftware:shiny/authz_client/pull/239?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=gitlab&utm_content=comment&utm_campaign=pr+comments&utm_term=shiny) Report :white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: Project coverage is 94.35%. Comparing base ([`46e26ef`](https://app.codecov.io/gl/unboundsoftware:shiny/authz_client/commit/46e26efe677becc22174bd1f3f4dd47d2c933344?dropdown=coverage&el=desc&utm_medium=referral&utm_source=gitlab&utm_content=comment&utm_campaign=pr+comments&utm_term=shiny)) to head ([`af93e41`](https://app.codecov.io/gl/unboundsoftware:shiny/authz_client/commit/af93e418f44a7d6ced9390ac1bd69aa87ad2207e?dropdown=coverage&el=desc&utm_medium=referral&utm_source=gitlab&utm_content=comment&utm_campaign=pr+comments&utm_term=shiny)). <details><summary>Additional details and impacted files</summary> ```diff @@ Coverage Diff @@ ## main #239 +/- ## ======================================= Coverage 94.35% 94.35% ======================================= Files 2 2 Lines 124 124 ======================================= Hits 117 117 Misses 7 7 ``` </details> [:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gl/unboundsoftware:shiny/authz_client/pull/239?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=gitlab&utm_content=comment&utm_campaign=pr+comments&utm_term=shiny). :loudspeaker: Have feedback on the report? [Share it here](https://gitlab.com/codecov-open-source/codecov-user-feedback/-/issues/4). <details><summary> :rocket: New features to boost your workflow: </summary> - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems. </details>
argoyle commented 2025-11-02 21:09:19 +00:00 (Migrated from gitlab.com)

mentioned in commit 9dd2b5aaa8

mentioned in commit 9dd2b5aaa884525fbba4930742917d166dd3f981
argoyle (Migrated from gitlab.com) merged commit 9dd2b5aaa8 into main 2025-11-02 21:09:19 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: shiny/authz_client#242