Closed zaynetro closed 4 months ago
This is great, thanks @zaynetro ! A bit unsure of the go version update on the main package, will that break existing clients on v1.18? Given they might not have a pinned version of posthog-go. Not really familiar with go package management yet.
Can we use a "polyfill" of sync/atomic
for that specific test?
Go 1.19 was released on 2022-08-02. Since then there were three major Go releases 1.20, 1.21 and 1.22. It is rather old and no longer supported version.
Since sync/atomic
is used only in the test it looks like go 1.18 will continue to build posthog-go module but will fail to run tests.
% /nix/store/lmddll9adkay4qgdphgjz77ydik73gj3-go-1.18.10/bin/go version
go version go1.18.10 darwin/arm64
% /nix/store/lmddll9adkay4qgdphgjz77ydik73gj3-go-1.18.10/bin/go build
% echo $?
0
% /nix/store/lmddll9adkay4qgdphgjz77ydik73gj3-go-1.18.10/bin/go test
# github.com/posthog/posthog-go [github.com/posthog/posthog-go.test]
./feature_flags_test.go:3391:20: undefined: atomic.Uint32
note: module requires Go 1.19
FAIL github.com/posthog/posthog-go [build failed]
@neilkakkar what do you think? Do you still want me to revert Go version update?
Hey @zaynetro , been trying to find if we have any clients on v1.18 , but we don't really track this information so hard to say what the impact will be, specially since this Go SDK doesn't yet have proper minor version - versioning.
As such, would prefer minimising chance of things going wrong and reverting the version update change.
ok rolled back the change of Go compiler version
Sorry for the low responsiveness here, thursday's incident + review has me busy 😅 - will merge this monday!
@neilkakkar just a friendly reminder
Thank you, this is great :)
If we get HTTP timeouts or server errors then this SDK will happily block itself.
In case of an error
poller.loaded <- false
will block indefinitely since we read from this channel only once. Blocking on the channel will in turn block the infinite loop that polls for the latest state. SDK users are not blocked but will get outdated flags' state.Tests before:
Here you can see that we are waiting on
which is
poller.loaded <- false