Skip to content

[PWI-1849][Henrico] feat!: add thread-safe config implementation and upgrade to gomod - #1

Merged
ricoferdian-gtf merged 17 commits into
masterfrom
PWI-1849
Aug 4, 2025
Merged

[PWI-1849][Henrico] feat!: add thread-safe config implementation and upgrade to gomod#1
ricoferdian-gtf merged 17 commits into
masterfrom
PWI-1849

Conversation

@ricoferdian-gtf

@ricoferdian-gtf ricoferdian-gtf commented Jul 28, 2025

Copy link
Copy Markdown
Collaborator

Background

Current config map cache implementation is not thread-safe, concurrent map write could trigger fatal panic. The goal of this change is to implement thread-safe config map by using mutex approach.

Minimal changes is recommended to ensure seamless integration with latest goconfig library on client side.

Feature changes

  • Implement thread-safe config map cache to address issues when config getters were called from goroutine
  • Set minimum go version to 1.18 (released in 2022)

Chores

  • v2 release candidate, package renamed to goconfig/v2
  • Upgrade from glide to go modules
  • Add actions pipeline to run tests

Notes

  • minimum go version supported in GTF infrastructure is go 1.13
  • minimum go version officially supported in arm-based mac is go 1.16

@ricoferdian-gtf ricoferdian-gtf changed the title [PWI-1849][Henrico] feat: add thread-safe config implementation and upgrade to gomod [PWI-1849][Henrico] feat!: add thread-safe config implementation and upgrade to gomod Jul 30, 2025
Comment thread config.go Outdated
Comment thread concurrent_config_test.go
Comment thread concurrent_config_test.go Outdated
Comment thread config.go Outdated
Comment thread config.go
@tejasjadhav

Copy link
Copy Markdown
Collaborator

question: Do we need to update the README as well?

@ricoferdian-gtf

Copy link
Copy Markdown
Collaborator Author

question: Do we need to update the README as well?

oh yeah, turns out we don't have readme. Let me update it as well

@ricoferdian-gtf
ricoferdian-gtf force-pushed the PWI-1849 branch 2 times, most recently from 81a4454 to 875a251 Compare August 1, 2025 03:56
@ricoferdian-gtf

Copy link
Copy Markdown
Collaborator Author

will add readme at the very end

Comment thread config.go Outdated
Comment thread config.go
@ricoferdian-gtf
ricoferdian-gtf merged commit 8c0d300 into master Aug 4, 2025
1 check 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.

2 participants