Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release infrastructure #81

Merged
merged 2 commits into from
Aug 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 94 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# go-graphsync changelog

# go-graphysnc 0.0.1-filecoin

Initial tagged release for early version of filecoin

### Changelog

Initial feature set including parallel requests, selectors, basic architecture,
etc. -- changelog not tracked due to lack of go.mod

# go-graphsync 0.0.2

Bug fix release. Fix message sizes to not overflow limits.

### Changelog

- github.com/ipfs/go-graphsync:
- Limit Response Size ([ipfs/go-graphsync#37](https://github.com/ipfs/go-graphsync/pull/37))

### Contributors

| Contributor | Commits | Lines ± | Files Changed |
|-------------|---------|---------|---------------|
| hannahhoward | 2 | +295/-52 | 5 |

# go-graphsync 0.0.3

Bug fix release. Fix issues issues with message queue.

### Changelog

- github.com/ipfs/go-graphsync:
- fix(messagequeue): no retry after queue shutdown ([ipfs/go-graphsync#38](https://github.com/ipfs/go-graphsync/pull/38))

### Contributors

| Contributor | Commits | Lines ± | Files Changed |
|-------------|---------|---------|---------------|
| hannahhoward | 1 | +70/-1 | 2 |

# go-graphsync 0.0.4

Initial release to incorporate into go-data-transfer module.

Implements request authorization, request hooks, default valdiation policy, etc

### Changelog

- github.com/ipfs/go-graphsync:
- Add DAG Protobuf Support ([ipfs/go-graphsync#51](https://github.com/ipfs/go-graphsync/pull/51))
- Add response hooks ([ipfs/go-graphsync#50](https://github.com/ipfs/go-graphsync/pull/50))
- Request hooks ([ipfs/go-graphsync#49](https://github.com/ipfs/go-graphsync/pull/49))
- Add a default validation policy ([ipfs/go-graphsync#48](https://github.com/ipfs/go-graphsync/pull/48))
- Send user extensions in request ([ipfs/go-graphsync#47](https://github.com/ipfs/go-graphsync/pull/47))
- Revert "Merge pull request #44 from ipfs/chore/update-peertaskqueue"
- Update peertaskqueue ([ipfs/go-graphsync#44](https://github.com/ipfs/go-graphsync/pull/44))
- Refactor file organization ([ipfs/go-graphsync#43](https://github.com/ipfs/go-graphsync/pull/43))
- feat(graphsync): support extension protocol ([ipfs/go-graphsync#42](https://github.com/ipfs/go-graphsync/pull/42))
- Bump go-ipld-prime to 092ea9a7696d ([ipfs/go-graphsync#41](https://github.com/ipfs/go-graphsync/pull/41))
- Fix some typo ([ipfs/go-graphsync#40](https://github.com/ipfs/go-graphsync/pull/40))

### Contributors

| Contributor | Commits | Lines ± | Files Changed |
|-------------|---------|---------|---------------|
| hannahhoward | 12 | +3040/-1516 | 103 |
| Hannah Howard | 2 | +253/-321 | 3 |
| Dirk McCormick | 1 | +47/-33 | 4 |
| Edgar Lee | 1 | +36/-20 | 8 |
| Alexey | 1 | +15/-15 | 1 |

# go-graphsync v0.0.5

Minor release -- update task queue and add some documentation

### Changelog

- github.com/ipfs/go-graphsync:
- feat: update the peer task queue ([ipfs/go-graphsync#54](https://github.com/ipfs/go-graphsync/pull/54))
- docs(readme): document the storeutil package in the readme ([ipfs/go-graphsync#52](https://github.com/ipfs/go-graphsync/pull/52))

### Contributors

| Contributor | Commits | Lines ± | Files Changed |
|-------------|---------|---------|---------------|
| Steven Allen | 2 | +68/-49 | 5 |

### 🙌🏽 Want to contribute?

Would you like to contribute to this repo and don’t know how? Here are a few places you can get started:

- Check out the [Contributing Guidelines](https://github.com/ipfs/go-graphsync/blob/master/CONTRIBUTING.md)
- Look for issues with the `good-first-issue` label in [go-graphsync](https://github.com/ipfs/go-graphsync/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3A%22e-good-first-issue%22+)
94 changes: 94 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# Contributing to this repo

First, thank you for your interest in contributing to this project! Before you pick up your first issue and start
changing code, please:

1. Review all documentation for the module you're interested in.
1. Look through the [issues for this repo](https://github.com/ipfs/go-graphsync/issues) for relevant discussions.
1. If you have questions about an issue, post a comment in the issue.
1. If you want to submit changes that aren't covered by an issue, file a new one with your proposal, outlining what problem you found/feature you want to implement, and how you intend to implement a solution.

For best results, before submitting a PR, make sure:
1. It has met all acceptance criteria for the issue.
1. It addresses only the one issue and does not make other, irrelevant changes.
1. Your code conforms to our coding style guide.
1. You have adequate test coverage (this should be indicated by CI results anyway).
1. If you like, check out [current PRs](https://github.com/ipfs/go-graphsync/pulls) to see how others do it.

Special Note:
If editing README.md, please conform to the [standard readme specification](https://github.com/RichardLitt/standard-readme/blob/master/spec.md).

### PR Process

Active development of `go-graphsync` occurs on the `master` branch. All PRs should be made to the `master` branch, which is the default branch on Github.

Before a PR can be merged to `master`, it must:
1. Pass continuous integration.
1. Be rebased and up to date with the `master` branch
1. Be approved by at least one maintainer

When merging normal PRs to `master`, always use squash and merge to maintain a linear commit history.

### Release Process

When creating a new full release, branch off master with a branch named release/*version-number*, where *version-number* is the ultimate tag you intend to create.

Continue to develop on master and merge commits to your release branch as neccesary till the release is ready.

When the release is ready, tag it, then merge the branch back into master so that it is part of the version history of master. Delete the release branch.

### Hotfix Process

Hot-fixes operate just like release branches, except they are branched off an existing tag and should be named hotfix/*version-number*. When ready, they receive their own tag and then are merged back to master, then deleted.

For external reference, his git flow and release process is essentially the [OneFlow git workflow](https://www.endoflineblog.com/oneflow-a-git-branching-model-and-workflow)

Following the release of Filecoin Mainnet, this library will following a semantic versioning scheme for tagged releases.

### Testing

- All new code should be accompanied by unit tests. Prefer focused unit tests to integration tests for thorough validation of behaviour. Existing code is not necessarily a good model, here.

### Conventions and Style

#### Imports
We use the following import ordering.
```
import (
[stdlib packages, alpha-sorted]
<single, empty line>
[external packages]
<single, empty line>
[go-graphsync packages]
)
```

Where a package name does not match its directory name, an explicit alias is expected (`goimports` will add this for you).

Example:

```go
import (
"context"
"testing"

cmds "github.com/ipfs/go-ipfs-cmds"
cid "github.com/ipfs/go-cid"
ipld "github.com/ipfs/go-ipld-format"
"github.com/stretchr/testify/assert"

datatransfer "github.com/filecoin-project/go-data-transfer"

"github.com/filecoin-project/go-fil-markets/filestore/file"
)
```

You can run `script/fiximports` to put all your code in the desired format

#### Comments

Comments are a communication to other developers (including your future self) to help them understand and maintain code. Good comments describe the _intent_ of the code, without repeating the procedures directly.

- A `TODO:` comment describes a change that is desired but could not be immediately implemented. It must include a reference to a GitHub issue outlining whatever prevents the thing being done now (which could just be a matter of priority).
- A `NOTE:` comment indicates an aside, some background info, or ideas for future improvement, rather than the intent of the current code. It's often fine to document such ideas alongside the code rather than an issue (at the loss of a space for discussion).
- `FIXME`, `HACK`, `XXX` and similar tags indicating that some code is to be avoided in favour of `TODO`, `NOTE` or some straight prose.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ PRs are welcome!

Before doing anything heavy, checkout the [Graphsync Architecture](docs/architecture.md)

Small note: If editing the Readme, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification.
See our [Contributing Guidelines](https://github.com/ipfs/go-graphsync/blob/master/CONTRIBUTING.md) for more info.

## License

Expand Down
3 changes: 2 additions & 1 deletion cidset/cidset.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ import (
"errors"

"github.com/ipfs/go-cid"
"github.com/ipfs/go-graphsync/ipldutil"
"github.com/ipld/go-ipld-prime/fluent"
cidlink "github.com/ipld/go-ipld-prime/linking/cid"
basicnode "github.com/ipld/go-ipld-prime/node/basic"

"github.com/ipfs/go-graphsync/ipldutil"
)

// EncodeCidSet encodes a cid set into bytes for the do-no-send-cids extension
Expand Down
3 changes: 2 additions & 1 deletion cidset/cidset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ import (
"testing"

"github.com/ipfs/go-cid"
"github.com/ipfs/go-graphsync/testutil"
"github.com/stretchr/testify/require"

"github.com/ipfs/go-graphsync/testutil"
)

func TestDecodeEncodeCidSet(t *testing.T) {
Expand Down
9 changes: 5 additions & 4 deletions impl/graphsync.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ package graphsync
import (
"context"

logging "github.com/ipfs/go-log"
"github.com/ipfs/go-peertaskqueue"
ipld "github.com/ipld/go-ipld-prime"
"github.com/libp2p/go-libp2p-core/peer"

"github.com/ipfs/go-graphsync"
gsmsg "github.com/ipfs/go-graphsync/message"
"github.com/ipfs/go-graphsync/messagequeue"
Expand All @@ -16,10 +21,6 @@ import (
"github.com/ipfs/go-graphsync/responsemanager/peerresponsemanager"
"github.com/ipfs/go-graphsync/responsemanager/persistenceoptions"
"github.com/ipfs/go-graphsync/selectorvalidator"
logging "github.com/ipfs/go-log"
"github.com/ipfs/go-peertaskqueue"
ipld "github.com/ipld/go-ipld-prime"
"github.com/libp2p/go-libp2p-core/peer"
)

var log = logging.Logger("graphsync")
Expand Down
23 changes: 10 additions & 13 deletions impl/graphsync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ import (
"testing"
"time"

basicnode "github.com/ipld/go-ipld-prime/node/basic"
"github.com/stretchr/testify/require"

cidlink "github.com/ipld/go-ipld-prime/linking/cid"

blocks "github.com/ipfs/go-block-format"
"github.com/ipfs/go-blockservice"
"github.com/ipfs/go-cid"
Expand All @@ -33,21 +28,23 @@ import (
unixfile "github.com/ipfs/go-unixfs/file"
"github.com/ipfs/go-unixfs/importer/balanced"
ihelper "github.com/ipfs/go-unixfs/importer/helpers"

"github.com/ipfs/go-graphsync"

"github.com/ipfs/go-graphsync/cidset"
"github.com/ipfs/go-graphsync/ipldutil"
gsmsg "github.com/ipfs/go-graphsync/message"
gsnet "github.com/ipfs/go-graphsync/network"
"github.com/ipfs/go-graphsync/testutil"
ipld "github.com/ipld/go-ipld-prime"
cidlink "github.com/ipld/go-ipld-prime/linking/cid"
basicnode "github.com/ipld/go-ipld-prime/node/basic"
"github.com/ipld/go-ipld-prime/traversal/selector"
ipldselector "github.com/ipld/go-ipld-prime/traversal/selector"
"github.com/ipld/go-ipld-prime/traversal/selector/builder"
"github.com/libp2p/go-libp2p-core/host"
"github.com/libp2p/go-libp2p-core/peer"
mocknet "github.com/libp2p/go-libp2p/p2p/net/mock"
"github.com/stretchr/testify/require"

"github.com/ipfs/go-graphsync"
"github.com/ipfs/go-graphsync/cidset"
"github.com/ipfs/go-graphsync/ipldutil"
gsmsg "github.com/ipfs/go-graphsync/message"
gsnet "github.com/ipfs/go-graphsync/network"
"github.com/ipfs/go-graphsync/testutil"
)

func TestMakeRequestToNetwork(t *testing.T) {
Expand Down
5 changes: 3 additions & 2 deletions ipldutil/traverser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,16 @@ import (
"testing"

blocks "github.com/ipfs/go-block-format"
"github.com/ipfs/go-graphsync"
"github.com/ipfs/go-graphsync/testutil"
ipld "github.com/ipld/go-ipld-prime"
cidlink "github.com/ipld/go-ipld-prime/linking/cid"
basicnode "github.com/ipld/go-ipld-prime/node/basic"
"github.com/ipld/go-ipld-prime/traversal"
"github.com/ipld/go-ipld-prime/traversal/selector"
"github.com/ipld/go-ipld-prime/traversal/selector/builder"
"github.com/stretchr/testify/require"

"github.com/ipfs/go-graphsync"
"github.com/ipfs/go-graphsync/testutil"
)

func TestTraverser(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion linktracker/linktracker.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package linktracker

import (
"github.com/ipfs/go-graphsync"
"github.com/ipld/go-ipld-prime"

"github.com/ipfs/go-graphsync"
)

// LinkTracker records links being traversed to determine useful information
Expand Down
5 changes: 3 additions & 2 deletions linktracker/linktracker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ import (
"math/rand"
"testing"

"github.com/ipfs/go-graphsync"
"github.com/ipfs/go-graphsync/testutil"
"github.com/ipld/go-ipld-prime"
"github.com/stretchr/testify/require"

"github.com/ipfs/go-graphsync"
"github.com/ipfs/go-graphsync/testutil"
)

type request struct {
Expand Down
8 changes: 4 additions & 4 deletions message/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ import (
"fmt"
"io"

ggio "github.com/gogo/protobuf/io"
blocks "github.com/ipfs/go-block-format"
"github.com/ipfs/go-graphsync"
cid "github.com/ipfs/go-cid"
"github.com/ipld/go-ipld-prime"
"github.com/libp2p/go-libp2p-core/network"

ggio "github.com/gogo/protobuf/io"
cid "github.com/ipfs/go-cid"
"github.com/ipfs/go-graphsync"
"github.com/ipfs/go-graphsync/ipldutil"
pb "github.com/ipfs/go-graphsync/message/pb"
"github.com/libp2p/go-libp2p-core/network"
)

// IsTerminalSuccessCode returns true if the response code indicates the
Expand Down
4 changes: 2 additions & 2 deletions message/message_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import (
"testing"

blocks "github.com/ipfs/go-block-format"
"github.com/ipfs/go-graphsync"
cid "github.com/ipfs/go-cid"
basicnode "github.com/ipld/go-ipld-prime/node/basic"
"github.com/ipld/go-ipld-prime/traversal/selector/builder"
"github.com/stretchr/testify/require"

cid "github.com/ipfs/go-cid"
"github.com/ipfs/go-graphsync"
"github.com/ipfs/go-graphsync/ipldutil"
"github.com/ipfs/go-graphsync/testutil"
)
Expand Down
5 changes: 3 additions & 2 deletions message/pb/message.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions messagequeue/messagequeue.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import (
"time"

blocks "github.com/ipfs/go-block-format"
logging "github.com/ipfs/go-log"
"github.com/libp2p/go-libp2p-core/peer"

gsmsg "github.com/ipfs/go-graphsync/message"
gsnet "github.com/ipfs/go-graphsync/network"
logging "github.com/ipfs/go-log"
"github.com/libp2p/go-libp2p-core/peer"
)

var log = logging.Logger("graphsync")
Expand Down
Loading