Skip to content

Commit feb6b09

Browse files
Merge feature/factor-out-indexdClient changes (#190)
* factor out indexd client * updates * add tests to improve coverage * bump go mod file * fix up mod file * passing monorepo test * cleanup gh actions errs * gh action * add tests * github action * move transfer-ref test into integration tests * add mock server to test * skip all integration tests * add git config load/store. cleanup packages * update logging * fix go mod file * update git-drs to reflect data-lcient changes * fix concurrent transfers bug * add back in support for the rest of the custom configs * refactor drs init test * bump data-client dep * update deps * adjust clone test for renaming * coverage * spelling * coverage
1 parent 30457dc commit feb6b09

117 files changed

Lines changed: 47362 additions & 41175 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/pr-checks.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,4 @@ jobs:
7171
go-version-file: go.mod
7272

7373
- name: Run tests
74-
run: go test -v -race $(go list ./... | grep -v 'tests/integration/calypr' | grep -v 'client/indexd/tests')
74+
run: go test -v -race $(go list ./... | grep -v 'tests/integration' | grep -v 'client/indexd/tests')

.github/workflows/test.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ jobs:
2828
find . -name "*.sh" | xargs ls -l
2929
find . -name "*.out" | xargs ls -l
3030
31-
- name: Check uploaded coverage files
32-
run: |
33-
tests/scripts/coverage/assert-coverage-timestamp.sh
31+
#- name: Check uploaded coverage files
32+
# run: |
33+
# tests/scripts/coverage/assert-coverage-timestamp.sh
3434

3535
- name: Upload coverage reports as artifact
3636
uses: actions/upload-artifact@v4

client/anvil/anvil_client.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import (
1010
"time"
1111

1212
"github.com/bytedance/sonic"
13-
"github.com/calypr/git-drs/drs"
14-
"github.com/calypr/git-drs/drs/hash"
13+
drs "github.com/calypr/data-client/indexd/drs"
14+
hash "github.com/calypr/data-client/indexd/hash"
1515
"golang.org/x/oauth2/google"
1616
)
1717

@@ -20,7 +20,7 @@ type AnvilClient struct {
2020
SConfig sonic.API
2121
}
2222

23-
func (an *AnvilClient) GetObject(objectID string) (*drs.DRSObject, error) {
23+
func (an *AnvilClient) GetObject(ctx context.Context, objectID string) (*drs.DRSObject, error) {
2424
// get auth token
2525
token, err := GetAuthToken()
2626
if err != nil {

client/anvil/remote.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"fmt"
55
"log/slog"
66

7+
"github.com/calypr/data-client/g3client"
78
"github.com/calypr/git-drs/client"
89
)
910

@@ -30,7 +31,7 @@ func (s AnvilRemote) GetBucketName() string {
3031
return ""
3132
}
3233

33-
func (s AnvilRemote) GetClient(params map[string]string, logger *slog.Logger) (client.DRSClient, error) {
34+
func (s AnvilRemote) GetClient(remoteName string, logger *slog.Logger, opts ...g3client.Option) (client.DRSClient, error) {
3435
return nil, fmt.Errorf(("AnVIL Client needs to be implemented"))
3536
// return NewAnvilClient(s, logger)
3637
}

client/anvil/remote_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func TestAnvilRemoteAccessors(t *testing.T) {
3131
func TestAnvilRemoteGetClientNotImplemented(t *testing.T) {
3232
remote := AnvilRemote{}
3333
logger := slog.New(slog.NewTextHandler(io.Discard, &slog.HandlerOptions{Level: slog.LevelDebug}))
34-
client, err := remote.GetClient(map[string]string{}, logger)
34+
client, err := remote.GetClient("", logger)
3535
if err == nil {
3636
t.Fatalf("expected error")
3737
}

0 commit comments

Comments
 (0)