Skip to content

Commit

Permalink
Merge branch 'master' into feature/s3_passthrough
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnyaug committed Dec 28, 2020
2 parents 8b69db3 + 07e7b31 commit 4537a33
Show file tree
Hide file tree
Showing 33 changed files with 635 additions and 695 deletions.
140 changes: 0 additions & 140 deletions .all-contributorsrc

This file was deleted.

35 changes: 34 additions & 1 deletion .github/workflows/go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,47 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: '10.x'
- name: install UI dependencies
- name: Cache node_modules # TODO(ariels): Share with UI build
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: node_modules/
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('webui/package-lock.json') }}
restore-keys:
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install UI dependencies
run: npm install
working-directory: ./webui
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: 1.15.2
id: go

# No way to share code between workflows :-( If you change this, find and change the
# same code wherever "Find Go module and build caches" appears!
- name: Find Go module and build caches
run: |
echo GOMODCACHE=`go env GOMODCACHE` >> $GITHUB_ENV
echo GOCACHE=`go env GOCACHE` >> $GITHUB_ENV
cat $GITHUB_ENV
- name: Cache Go modules and builds
uses: actions/cache@v2
env:
cache-name: cache-go-modules
with:
path: |
${{ env.GOMODCACHE }}
${{ env.GOCACHE }}
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('go.mod', 'go.sum') }}
restore-keys:
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-

- name: Run tests
run: |
make test
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/nessie.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,27 @@ jobs:
go-version: 1.15.2
id: go

# No way to share code between workflows :-( If you change this, find and change the
# same code wherever "Find Go module and build caches" appears!
- name: Find Go module and build caches
run: |
echo GOMODCACHE=`go env GOMODCACHE` >> $GITHUB_ENV
echo GOCACHE=`go env GOCACHE` >> $GITHUB_ENV
cat $GITHUB_ENV
- name: Cache Go modules and builds
uses: actions/cache@v2
env:
cache-name: cache-go-modules
with:
path: |
${{ env.GOMODCACHE }}
${{ env.GOCACHE }}
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('go.mod', 'go.sum') }}
restore-keys:
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-

- name: Generate code
run: |
make gen
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,6 @@ terraform.rc

# generated mock files
/graveler/committed/**/mock/
/pyramid/mock/*

.eslintcache
28 changes: 0 additions & 28 deletions CONTRIBUTORS.md

This file was deleted.

20 changes: 12 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,18 @@
</p>

<p align="center">
<a href="https://raw.githubusercontent.com/treeverse/lakeFS/master/LICENSE" alt="License">
<img src="https://img.shields.io/badge/License-Apache%202.0-blue.svg" /></a>
<a href="https://github.com/treeverse/lakeFS/actions?query=workflow%3AGo+branch%3Amaster++" alt="Go">
<img src="https://github.com/treeverse/lakeFS/workflows/Go/badge.svg?branch=master" /></a>
<a href="https://github.com/treeverse/lakeFS/actions?query=workflow%3ANode+branch%3Amaster++" alt="Node">
<img src="https://github.com/treeverse/lakeFS/workflows/Node/badge.svg?branch=master" /></a>
<a href="https://artifacthub.io/packages/search?repo=lakefs" alt="Artifact HUB">
<img src="https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/lakefs" /></a>
<a href="https://raw.githubusercontent.com/treeverse/lakeFS/master/LICENSE" >
<img src="https://img.shields.io/badge/License-Apache%202.0-blue.svg" alt="Apache License" /></a>
<a href="https://github.com/treeverse/lakeFS/actions?query=workflow%3AGo+branch%3Amaster++">
<img src="https://github.com/treeverse/lakeFS/workflows/Go/badge.svg?branch=master" alt="Go tests status" /></a>
<a href="https://github.com/treeverse/lakeFS/actions?query=workflow%3ANode+branch%3Amaster++" >
<img src="https://github.com/treeverse/lakeFS/workflows/Node/badge.svg?branch=master" alt="Node tests status" /></a>
<a href="https://github.com/treeverse/lakeFS/actions?query=workflow%3ANessie">
<img src="https://github.com/treeverse/lakeFS/workflows/Nessie/badge.svg" alt="nessie integration tests status" /></a>
<a href="https://artifacthub.io/packages/search?repo=lakefs">
<img src="https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/lakefs" alt="Artifact HUB" /></a>
<a href="CODE_OF_CONDUCT.md">
<img src="https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg" alt="code of conduct"></a>
</p>


Expand Down
7 changes: 6 additions & 1 deletion cache/refcnted.go → cache/reference_counted.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ type ParamsWithDisposal struct {
// keyus have a String() method that is compatible with their equality, i.e. k1.GoString() ==
// k2.GoString() implies k1 equals k2 in the sense of map comparison.
type shardedCacheWithDisposal struct {
name string
Seed maphash.Seed
Shards []CacheWithDisposal
}
Expand All @@ -50,7 +51,11 @@ func NewCacheWithDisposal(p ParamsWithDisposal) *shardedCacheWithDisposal {
for i := 0; i < p.Shards; i++ {
shards[i] = NewSingleThreadedCacheWithDisposal(p)
}
return &shardedCacheWithDisposal{Seed: maphash.MakeSeed(), Shards: shards}
return &shardedCacheWithDisposal{name: p.Name, Seed: maphash.MakeSeed(), Shards: shards}
}

func (s *shardedCacheWithDisposal) Name() string {
return s.name
}

func (s *shardedCacheWithDisposal) GetOrSet(k interface{}, setFn SetFn) (interface{}, Derefer, error) {
Expand Down
File renamed without changes.
16 changes: 14 additions & 2 deletions catalog/rocks/cataloger.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
)

type cataloger struct {
EntryCatalog EntryCatalog
EntryCatalog *EntryCatalog
log logging.Logger
dummyDedupCh chan *catalog.DedupReport
hooks catalog.CatalogerHooks
Expand Down Expand Up @@ -655,7 +655,19 @@ func listDiffHelper(it EntryDiffIterator, limit int, after string) (catalog.Diff
}

func (c *cataloger) Merge(ctx context.Context, repository string, leftBranch string, rightBranch string, committer string, message string, metadata catalog.Metadata) (*catalog.MergeResult, error) {
panic("not implemented") // TODO: Implement
repositoryID := graveler.RepositoryID(repository)
leftRef := graveler.Ref(leftBranch)
rightBranchID := graveler.BranchID(rightBranch)
meta := graveler.Metadata(metadata)
commitID, err := c.EntryCatalog.Merge(ctx, repositoryID, leftRef, rightBranchID, committer, message, meta)
if err != nil {
return nil, err
}
return &catalog.MergeResult{
// TODO(barak): require implementation by graveler's merge
Summary: map[catalog.DifferenceType]int{},
Reference: commitID.String(),
}, nil
}

func (c *cataloger) Hooks() *catalog.CatalogerHooks {
Expand Down
6 changes: 3 additions & 3 deletions catalog/rocks/cataloger_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func Test_cataloger_ListRepositories(t *testing.T) {
RepositoryIterator: NewFakeRepositoryIterator(gravelerData),
}
c := &cataloger{
EntryCatalog: &entryCatalog{
EntryCatalog: &EntryCatalog{
store: gravelerMock,
},
}
Expand Down Expand Up @@ -186,7 +186,7 @@ func TestCataloger_ListBranches(t *testing.T) {
BranchIterator: NewFakeBranchIterator(gravelerData),
}
c := &cataloger{
EntryCatalog: &entryCatalog{
EntryCatalog: &EntryCatalog{
store: gravelerMock,
},
}
Expand Down Expand Up @@ -309,7 +309,7 @@ func TestCataloger_ListEntries(t *testing.T) {
ListIterator: NewFakeValueIterator(gravelerData),
}
c := &cataloger{
EntryCatalog: &entryCatalog{
EntryCatalog: &EntryCatalog{
store: gravelerMock,
},
}
Expand Down
Loading

0 comments on commit 4537a33

Please sign in to comment.