Skip to content

Commit

Permalink
Merge branch 'main' into save-rpc-addr-to-context
Browse files Browse the repository at this point in the history
  • Loading branch information
Wu22e authored Sep 3, 2023
2 parents d51024f + d0c265b commit 7e40b95
Show file tree
Hide file tree
Showing 103 changed files with 5,454 additions and 2,329 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,19 @@ on:
pull_request:
branches: [ main ]

env:
GO_VERSION: '1.19.2'

jobs:
build:
name: build
strategy:
matrix:
go_version:
- 1.19.2
runs-on: ubuntu-latest
steps:

- name: Set up Go ${{ matrix.go_version }}
- name: Set up Go ${{ env.GO_VERSION }}
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go_version }}
go-version: ${{ env.GO_VERSION }}

- name: Setup buf action
uses: bufbuild/buf-setup-action@v1
Expand Down Expand Up @@ -51,7 +50,7 @@ jobs:
run: make bench

- name: Download previous benchmark data
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: ./cache
key: ${{ runner.os }}-benchmark
Expand All @@ -69,6 +68,6 @@ jobs:
comment-always: true

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3
with:
file: ./coverage.txt
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,35 @@ and Yorkie adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html)

## [Unreleased]

## [0.4.6] - 2023-08-25

### Added
* Set cobra default output to stdout by @blurfx in https://github.com/yorkie-team/yorkie/pull/599
* Fetch latest snapshot metadata to determine snapshot creation need by @hyemmie in https://github.com/yorkie-team/yorkie/pull/597
* Update contributing docs by @MoonGyu1 in https://github.com/yorkie-team/yorkie/pull/601
* Add Pagination to Listing Projects for Housekeeping by @tedkimdev in https://github.com/yorkie-team/yorkie/pull/587
* Update workflow with latest versions of the actions which runs on Node16 by @jongwooo in https://github.com/yorkie-team/yorkie/pull/620
* Add integration tree test for sync with js-sdk by @MoonGyu1 in https://github.com/yorkie-team/yorkie/pull/611
* Add testcases for sync with js-sdk by @MoonGyu1 in https://github.com/yorkie-team/yorkie/pull/621
* Add tree document by @MoonGyu1 in https://github.com/yorkie-team/yorkie/pull/608
* Cache ProjectInfo by @blurfx in https://github.com/yorkie-team/yorkie/pull/586
* Handle concurrent editing of Tree.Edit by @hackerwins, @MoonGyu1, @sejongk in https://github.com/yorkie-team/yorkie/pull/607
* Support multi-level and partial element selection by @sejongk, @hackerwins in https://github.com/yorkie-team/yorkie/pull/624

### Changed
* Remove Select operation from Text by @joonhyukchoi in https://github.com/yorkie-team/yorkie/pull/589
* Change 'Documents' from plural to singular in DocEvent by @chacha912 in https://github.com/yorkie-team/yorkie/pull/613
* Cleanup proto by @chacha912 in https://github.com/yorkie-team/yorkie/pull/614
* Replace matrix strategy with environment variable by @jongwooo in https://github.com/yorkie-team/yorkie/pull/619
* Change TreeNode to have IDs instead of insPrev, insNext by @JOOHOJANG in https://github.com/yorkie-team/yorkie/pull/622

### Fixed
* Fix typos and invalid link in the yorkie design document by @g2hhh2ee in https://github.com/yorkie-team/yorkie/pull/591
* Clean up code by @hackerwins in https://github.com/yorkie-team/yorkie/pull/595
* Clean up methods related to presence by @chacha912 in https://github.com/yorkie-team/yorkie/pull/594
* Remove panic from crdt.RGATreeList by @sejongk in https://github.com/yorkie-team/yorkie/pull/596
* Fix treePos calculating logic for text node by @JOOHOJANG in https://github.com/yorkie-team/yorkie/pull/615

## [0.4.5] - 2023-07-20

### Added
Expand Down
15 changes: 15 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ docker-compose -f build/docker/docker-compose.yml up --build -d
make test
```

You can automatically check the programmatic and stylistic errors of your code.

```sh
make lint
```

## Design Documents

For developers, [design documents](design/README.md) about core features are provided. You can refer to the docs for understanding the overall structure of Yorkie.
Expand Down Expand Up @@ -88,6 +94,13 @@ There are multiple types of tests. The location of the test code varies with typ
- Integration: These tests cover interactions of package components or interactions between Yorkie packages and some other non-Yorkie system resource (eg: MongoDB, ETCD).
- Benchmark: These confirm that the performance of the implemented function.

### Code Coverage
We are using [Codecov](https://about.codecov.io) for analyzing PR's code coverage. If you want to check the coverage of your code in local browser, you can run the command below.

```sh
make coverage
```

## Contributor License Agreement (CLA)

We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution.
Expand All @@ -98,6 +111,8 @@ Open a pull request ("PR") to any of our open source projects to sign the CLA. A

Follow the steps given by the bot to sign the CLA. This will require you to log in with GitHub. We will only use this information for CLA tracking. You only have to sign the CLA once. Once you've signed the CLA, future contributions to the project will not require you to sign again.

If the bot still require you to sign the CLA although you had already signed, you can check your commit's author is equal to the Github account that you logged in.

### Why Require a CLA?

Agreeing to a CLA explicitly states that you are entitled to provide a contribution, that you cannot withdraw permission to use your contribution at a later date, and that Yorkie Team has permission to use your contribution.
Expand Down
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
YORKIE_VERSION := 0.4.5
YORKIE_VERSION := 0.4.6

GO_PROJECT = github.com/yorkie-team/yorkie

Expand Down Expand Up @@ -54,6 +54,12 @@ fmt: ## applies format and simplify codes
lint: ## runs the golang-ci lint, checks for lint violations
golangci-lint run ./...

coverage: ## runs coverage tests
go clean -testcache
go test -tags integration -race -coverprofile=coverage.txt -covermode=atomic ./...
go tool cover -html=coverage.txt
rm -f coverage.txt

test: ## runs integration tests that require local applications such as MongoDB
go clean -testcache
go test -tags integration -race ./...
Expand Down
3 changes: 1 addition & 2 deletions api/converter/converter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,7 @@ func TestConverter(t *testing.T) {
Edit(0, 1, "한").
Edit(0, 1, "하").
Edit(1, 1, "느").
Edit(1, 2, "늘").
Select(1, 2)
Edit(1, 2, "늘")

// rich text
root.SetNewText("k3").
Expand Down
15 changes: 12 additions & 3 deletions api/converter/from_bytes.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,9 @@ func fromJSONArray(pbArr *api.JSONElement_JSONArray) (*crdt.Array, error) {
if err != nil {
return nil, err
}
elements.Add(elem)
if err = elements.Add(elem); err != nil {
return nil, err
}
}

createdAt, err := fromTimeTicket(pbArr.CreatedAt)
Expand Down Expand Up @@ -265,12 +267,19 @@ func fromJSONCounter(pbCnt *api.JSONElement_Counter) (*crdt.Counter, error) {
if err != nil {
return nil, err
}
counterValue, err := crdt.CounterValueFromBytes(counterType, pbCnt.Value)
if err != nil {
return nil, err
}

counter := crdt.NewCounter(
counter, err := crdt.NewCounter(
counterType,
crdt.CounterValueFromBytes(counterType, pbCnt.Value),
counterValue,
createdAt,
)
if err != nil {
return nil, err
}
counter.SetMovedAt(movedAt)
counter.SetRemovedAt(removedAt)

Expand Down
Loading

0 comments on commit 7e40b95

Please sign in to comment.