pkg/currency: Add error tags on currency exchange errors#76
Merged
Conversation
xgoffin
approved these changes
Jul 2, 2025
Co-authored-by: Xavier Goffin <86716549+xgoffin@users.noreply.github.com>
tgallice
approved these changes
Jul 2, 2025
karitham
reviewed
Jul 2, 2025
Co-authored-by: PL Pery <kar@karitham.dev>
.github/workflows/ci.yml
Outdated
| ${{ runner.os }}-go- | ||
| - name: Run tests | ||
| run: go test -v ./... | ||
| uses: upfluence/private-actions/.github/workflows/lib-go-test.yml@master |
26b397d to
26915e7
Compare
AlexisMontagne
approved these changes
Jul 2, 2025
| ${{ runner.os }}-go- | ||
| - name: Run tests | ||
| run: go test -v ./... | ||
|
|
Member
There was a problem hiding this comment.
when i said, no private i meant you can use the public action: https://github.com/upfluence/actions/blob/master/.github/workflows/lib-go-test.yml
44af27d to
ecf3443
Compare
Member
|
Can you attach the following diff to fix the CI? diff --git a/syncutil/singleflight_test.go b/syncutil/singleflight_test.go
index 14a11ec..514ffd3 100644
--- a/syncutil/singleflight_test.go
+++ b/syncutil/singleflight_test.go
@@ -114,6 +114,7 @@ func TestSingleflightStopOnClose(t *testing.T) {
var (
sf Singleflight
ctr int32
+ wg sync.WaitGroup
ctx = context.Background()
donec = make(chan struct{})
@@ -130,17 +131,23 @@ func TestSingleflightStopOnClose(t *testing.T) {
return nil
}
+ wg.Add(1)
+
go func() {
ok, err := sf.Do(ctx, fn)
assert.True(t, ok)
assert.Equal(t, context.Canceled, err)
+
+ wg.Done()
}()
time.Sleep(10 * time.Millisecond)
+ sf.Close()
close(donec)
- assert.Equal(t, int32(0), atomic.LoadInt32(&ctr))
- sf.Close()
+ wg.Wait()
+
+ assert.Equal(t, int32(0), atomic.LoadInt32(&ctr))
} |
karitham
approved these changes
Jul 9, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Add error tags and wrapping for currency exchange to make debugging easier
What are the observable changes?
Good PR checklist
Additional Notes