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: v0.22.0 #10034

Merged
merged 50 commits into from
Jul 27, 2023
Merged
Show file tree
Hide file tree
Changes from 49 commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
cfe52e0
chore: update version
hacdias Jun 12, 2023
344431d
Merge pull request #9937 from ipfs/version-update-v0.21
hacdias Jun 12, 2023
18db593
fix: more stable prometheus test (#9944)
hacdias Jun 13, 2023
f039771
chore(docs): typo http→https
lidel Jun 13, 2023
c93e267
feat: [email protected] (#9940)
SgtPooki Jun 14, 2023
ced4be8
chore: Update .github/workflows/stale.yml [skip ci]
web-flow Jun 14, 2023
b8da86e
chore: label dependabot PRs
ipfs-mgmt-read-write[bot] Jun 14, 2023
f5f6b66
fix(cmd): useful errors in dag import (#9945)
lidel Jun 14, 2023
b685355
feat!: dag import - don't pin roots by default (#9926)
rvagg Jun 14, 2023
44c5ec0
chore: update dht and libp2p for identify stream block
Jorropo Jun 15, 2023
2cbee81
docs: fix 0.21 changelog
hacdias Jun 15, 2023
82fd9ec
cmds/dag/import: pin roots by default (#9966)
Jorropo Jun 15, 2023
27398ce
chore(deps): bump docker/build-push-action from 2 to 4 (#9954)
dependabot[bot] Jun 15, 2023
364686a
chore(deps): bump docker/setup-buildx-action from 1 to 2 (#9952)
dependabot[bot] Jun 15, 2023
d4eb09f
chore(deps): bump codecov/codecov-action from 3.1.0 to 3.1.4 (#9951)
dependabot[bot] Jun 15, 2023
9298e31
chore(deps): bump docker/setup-qemu-action from 1 to 2 (#9953)
dependabot[bot] Jun 15, 2023
6c47b81
chore: Update .github/dependabot.yml [skip ci]
web-flow Jun 19, 2023
8bba03d
chore: bump boxo to 0.10.1 (#9970)
hacdias Jun 19, 2023
f3ca759
chore: bump go-libp2p-kad-dht for deadlock fix
Jorropo Jun 20, 2023
5156f21
feat(ipns): records with V2-only signatures (#9932)
hacdias Jun 20, 2023
05bcae4
chore(deps): bump actions/checkout from 2 to 3 (#9975)
dependabot[bot] Jun 22, 2023
873c6e1
chore(deps): bump actions/github-script from 4 to 6 (#9977)
dependabot[bot] Jun 22, 2023
67cd516
chore(deps): bump docker/login-action from 1.10.0 to 2.2.0 (#9979)
dependabot[bot] Jun 22, 2023
1972a49
fix: docker repository initialization race condition
dennis-tra Jun 26, 2023
61f0aa0
ci: fix checking state of CI in ipfs-webui (#9969)
galargh Jun 27, 2023
3da4e5b
fix(gateway): include CORS on subdomain redirects (#9994)
lidel Jun 27, 2023
4047650
feat: update conformance to v0.2
laurentsenta Jun 27, 2023
f2a6c4f
fix: correctly handle migration of configs
Jorropo Jun 27, 2023
92f651f
chore: Update .github/workflows/stale.yml [skip ci]
web-flow Jun 28, 2023
dae4183
chore: bump to boxo master
hacdias Jun 29, 2023
394d72d
refactor: replace boxo/ipld/car by ipld/go-car
hacdias Jun 29, 2023
da44c9f
docs: Gateway.HTTPHeaders
lidel Jun 30, 2023
0d5a933
docs: update refs to kuboreleaser in RELEASE_ISSUE_TEMPLATE.md
galargh Jun 30, 2023
c00cee5
docs: update RELEASE_ISSUE_TEMPLATE.md with a warning about npm publish
galargh Jun 30, 2023
f797e9e
docs: skip check before prepare branch in RELEASE_ISSUE_TEMPLATE.md
galargh Jun 30, 2023
0c890de
Merge branch 'master' into merge-release-v0.21.0
hacdias Jul 3, 2023
895963b
Merge pull request #10008 from ipfs/merge-release-v0.21.0
hacdias Jul 3, 2023
82e0a44
feat: [email protected]
SgtPooki Jul 4, 2023
c293d62
ci: add changelog update checker workflow [skip changelog] (#10002)
galargh Jul 6, 2023
4a5e99d
docs: add Brave to RELEASE_ISSUE_TEMPLATE.md (#10012)
lidel Jul 6, 2023
1fe17a4
docs(commands): explain that swarm connect can reuse existing connect…
aschmahmann Jul 20, 2023
a8c6353
feat(gateway): support for ipip-412 parameters
hacdias Jul 24, 2023
9c02eec
fix: mark all routers DoNotWaitForSearchValue (#10020)
Jorropo Jul 25, 2023
c08313f
chore: update go-libp2p to v0.28.1
marten-seemann Jun 27, 2023
649283b
chore: update go-libp2p to v0.29.0
MarcoPolo Jul 14, 2023
6be6630
libp2p: stop reporting ProtocolVersion
Jorropo Jul 21, 2023
4c35289
fix(relay): apply user provider options
Jul 26, 2023
5a0a9ed
chore: bump boxo to v0.11.0 for release
Jorropo Jul 26, 2023
9d6012c
chore: update version
Jorropo Jul 27, 2023
149190c
chore: update changelog for v0.22
Jorropo Jul 27, 2023
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
5 changes: 3 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<!--
PR Creation Checklist
- [ ] Update Changelog
Please update docs/changelogs/ if you're modifying Go files. If your change does not require a changelog entry, please do one of the following:
- add `[skip changelog]` to the PR title
- label the PR with `skip/changelog`
-->
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
npm install ipfs-interop@^10.0.1
working-directory: interop
# Run the interop tests while ignoring the js-js interop test cases
- run: npx ipfs-interop -- -t node --grep '^(?!.*(js\d? -> js\d?|js-js-js))' --parallel
- run: npx ipfs-interop -- -t node --grep '^(?!.*(js\d? -> js\d?|js-js-js|js-rv\d?-js))' --parallel
env:
LIBP2P_TCP_REUSEPORT: false
LIBP2P_ALLOW_WEAK_RSA_KEYS: 1
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Changelog

on:
pull_request:
types:
- opened
- edited
- synchronize
- reopened
- labeled
- unlabeled
paths:
- '**.go'
- '**/go.mod'
- '**/go.sum'

jobs:
changelog:
if: contains(github.event.pull_request.title, '[skip changelog]') == false &&
contains(github.event.pull_request.labels.*.name, 'skip/changelog') == false
runs-on: ubuntu-latest
name: Changelog
steps:
- id: changelog
env:
GITHUB_TOKEN: ${{ github.token }}
ENDPOINT: repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files
SELECTOR: 'map(select(.filename | startswith("docs/changelogs/"))) | length'
run: gh api "$ENDPOINT" --jq "$SELECTOR" | xargs -I{} echo "modified={}" | tee -a $GITHUB_OUTPUT
- if: steps.changelog.outputs.modified == '0'
env:
MESSAGE: |
docs/changelogs/ was not modified in this PR. Please do one of the following:
- add a changelog entry
- add `[skip changelog]` to the PR title
- label the PR with `skip/changelog`
run: |
echo "::error::${MESSAGE//$'\n'/%0A}"
exit 1
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
LEGACY_IMAGE_NAME: ipfs/go-ipfs
steps:
- name: Check out the repo
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
Expand All @@ -48,7 +48,7 @@ jobs:
shell: bash

- name: Log in to Docker Hub
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc
with:
username: ${{ vars.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/gateway-conformance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
steps:
# 1. Download the gateway-conformance fixtures
- name: Download gateway-conformance fixtures
uses: ipfs/gateway-conformance/.github/actions/extract-fixtures@v0.1
uses: ipfs/gateway-conformance/.github/actions/extract-fixtures@v0.2
with:
output: fixtures

Expand All @@ -47,6 +47,7 @@ jobs:
{
"example.com": {
"UseSubdomains": true,
"InlineDNSLink": true,
"Paths": ["/ipfs", "/ipns"]
},
"localhost": {
Expand Down Expand Up @@ -76,7 +77,8 @@ jobs:

# Import dnslink records
# the IPFS_NS_MAP env will be used by the daemon
export IPFS_NS_MAP=$(cat ./fixtures/dnslinks.json | jq -r 'to_entries | map("\(.key).example.com:\(.value)") | join(",")')
export IPFS_NS_MAP=$(cat "./fixtures/dnslinks.json" | jq -r '.subdomains | to_entries | map("\(.key).example.com:\(.value)") | join(",")')
export IPFS_NS_MAP="$(cat "./fixtures/dnslinks.json" | jq -r '.domains | to_entries | map("\(.key):\(.value)") | join(",")'),${IPFS_NS_MAP}"
echo "IPFS_NS_MAP=${IPFS_NS_MAP}" >> $GITHUB_ENV

# 5. Start the kubo-gateway
Expand All @@ -87,7 +89,7 @@ jobs:

# 6. Run the gateway-conformance tests
- name: Run gateway-conformance tests
uses: ipfs/gateway-conformance/.github/actions/test@v0.1
uses: ipfs/gateway-conformance/.github/actions/test@v0.2
with:
gateway-url: http://127.0.0.1:8080
json: output.json
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/golang-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/setup-go@v2
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ name: Close and mark stale issue

on:
schedule:
- cron: '0 0 * * *'
- cron: '0 0 * * *'

permissions:
issues: write
pull-requests: write

jobs:
stale:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/sync-release-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ jobs:
with:
node-version: 14
- name: Sync the latest 5 github releases
uses: actions/github-script@v4
uses: actions/github-script@v6
with:
script: |
const fs = require('fs').promises
const max_synced = 5

// fetch github releases
resp = await github.repos.listReleases({
resp = await github.rest.repos.listReleases({
owner: context.repo.owner,
repo: context.repo.repo,
page: 1,
Expand Down Expand Up @@ -116,7 +116,7 @@ jobs:
}

console.log("uploading", file, "to github release", release.tag_name)
const uploadReleaseAsset = async (file) => github.repos.uploadReleaseAsset({
const uploadReleaseAsset = async (file) => github.rest.repos.uploadReleaseAsset({
owner: context.repo.owner,
repo: context.repo.repo,
release_id: release.id,
Expand Down
24 changes: 7 additions & 17 deletions client/rpc/name.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,20 @@
caopts "github.com/ipfs/boxo/coreiface/options"
nsopts "github.com/ipfs/boxo/coreiface/options/namesys"
"github.com/ipfs/boxo/coreiface/path"
"github.com/ipfs/boxo/ipns"
)

type NameAPI HttpApi

type ipnsEntry struct {
JName string `json:"Name"`
JValue string `json:"Value"`

path path.Path
}

func (e *ipnsEntry) Name() string {
return e.JName
Name string `json:"Name"`
Value string `json:"Value"`
}

func (e *ipnsEntry) Value() path.Path {
return e.path
}

func (api *NameAPI) Publish(ctx context.Context, p path.Path, opts ...caopts.NamePublishOption) (iface.IpnsEntry, error) {
func (api *NameAPI) Publish(ctx context.Context, p path.Path, opts ...caopts.NamePublishOption) (ipns.Name, error) {
options, err := caopts.NamePublishOptions(opts...)
if err != nil {
return nil, err
return ipns.Name{}, err

Check warning on line 26 in client/rpc/name.go

View check run for this annotation

Codecov / codecov/patch

client/rpc/name.go#L26

Added line #L26 was not covered by tests
}

req := api.core().Request("name/publish", p.String()).
Expand All @@ -47,10 +38,9 @@

var out ipnsEntry
if err := req.Exec(ctx, &out); err != nil {
return nil, err
return ipns.Name{}, err

Check warning on line 41 in client/rpc/name.go

View check run for this annotation

Codecov / codecov/patch

client/rpc/name.go#L41

Added line #L41 was not covered by tests
}
out.path = path.New(out.JValue)
return &out, out.path.IsValid()
return ipns.NameFromString(out.Name)
}

func (api *NameAPI) Search(ctx context.Context, name string, opts ...caopts.NameResolveOption) (<-chan iface.IpnsResult, error) {
Expand Down
11 changes: 1 addition & 10 deletions config/routing.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ type Router struct {
Type RouterType

// Parameters are extra configuration that this router might need.
// A common one for reframe router is "Endpoint".
// A common one for HTTP router is "Endpoint".
Parameters interface{}
}

Expand Down Expand Up @@ -81,8 +81,6 @@ func (r *RouterParser) UnmarshalJSON(b []byte) error {
switch out.Type {
case RouterTypeHTTP:
p = &HTTPRouterParams{}
case RouterTypeReframe:
p = &ReframeRouterParams{}
case RouterTypeDHT:
p = &DHTRouterParams{}
case RouterTypeSequential:
Expand All @@ -106,7 +104,6 @@ func (r *RouterParser) UnmarshalJSON(b []byte) error {
type RouterType string

const (
RouterTypeReframe RouterType = "reframe" // More info here: https://github.com/ipfs/specs/tree/main/reframe . Actually deprecated.
RouterTypeHTTP RouterType = "http" // HTTP JSON API for delegated routing systems (IPIP-337).
RouterTypeDHT RouterType = "dht" // DHT router.
RouterTypeSequential RouterType = "sequential" // Router helper to execute several routers sequentially.
Expand All @@ -133,12 +130,6 @@ const (

var MethodNameList = []MethodName{MethodNameProvide, MethodNameFindPeers, MethodNameFindProviders, MethodNameGetIPNS, MethodNamePutIPNS}

type ReframeRouterParams struct {
// Endpoint is the URL where the routing implementation will point to get the information.
// Usually used for reframe Routers.
Endpoint string
}

type HTTPRouterParams struct {
// Endpoint is the URL where the routing implementation will point to get the information.
Endpoint string
Expand Down
77 changes: 12 additions & 65 deletions config/routing_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,6 @@ func TestRouterParameters(t *testing.T) {
PublicIPNetwork: false,
},
}},
"router-reframe": {Router{
Type: RouterTypeReframe,
Parameters: ReframeRouterParams{
Endpoint: "reframe-endpoint",
},
}},
"router-parallel": {Router{
Type: RouterTypeParallel,
Parameters: ComposableRouterParams{
Expand All @@ -39,7 +33,7 @@ func TestRouterParameters(t *testing.T) {
IgnoreErrors: true,
},
{
RouterName: "router-reframe",
RouterName: "router-dht",
Timeout: Duration{10 * time.Second},
IgnoreErrors: false,
ExecuteAfter: &OptionalDuration{&sec},
Expand All @@ -58,7 +52,7 @@ func TestRouterParameters(t *testing.T) {
IgnoreErrors: true,
},
{
RouterName: "router-reframe",
RouterName: "router-dht",
Timeout: Duration{10 * time.Second},
IgnoreErrors: false,
},
Expand All @@ -69,7 +63,7 @@ func TestRouterParameters(t *testing.T) {
},
Methods: Methods{
MethodNameFindPeers: {
RouterName: "router-reframe",
RouterName: "router-dht",
},
MethodNameFindProviders: {
RouterName: "router-dht",
Expand Down Expand Up @@ -99,95 +93,48 @@ func TestRouterParameters(t *testing.T) {
dhtp := r2.Routers["router-dht"].Parameters
require.IsType(&DHTRouterParams{}, dhtp)

rp := r2.Routers["router-reframe"].Parameters
require.IsType(&ReframeRouterParams{}, rp)

sp := r2.Routers["router-sequential"].Parameters
require.IsType(&ComposableRouterParams{}, sp)

pp := r2.Routers["router-parallel"].Parameters
require.IsType(&ComposableRouterParams{}, pp)
}

func TestRouterMissingParameters(t *testing.T) {
require := require.New(t)

r := Routing{
Type: NewOptionalString("custom"),
Routers: map[string]RouterParser{
"router-wrong-reframe": {Router{
Type: RouterTypeReframe,
Parameters: DHTRouterParams{
Mode: "auto",
AcceleratedDHTClient: true,
PublicIPNetwork: false,
},
}},
},
Methods: Methods{
MethodNameFindPeers: {
RouterName: "router-wrong-reframe",
},
MethodNameFindProviders: {
RouterName: "router-wrong-reframe",
},
MethodNameGetIPNS: {
RouterName: "router-wrong-reframe",
},
MethodNameProvide: {
RouterName: "router-wrong-reframe",
},
MethodNamePutIPNS: {
RouterName: "router-wrong-reframe",
},
},
}

out, err := json.Marshal(r)
require.NoError(err)

r2 := &Routing{}

err = json.Unmarshal(out, r2)
require.NoError(err)
require.Empty(r2.Routers["router-wrong-reframe"].Parameters.(*ReframeRouterParams).Endpoint)
}

func TestMethods(t *testing.T) {
require := require.New(t)

methodsOK := Methods{
MethodNameFindPeers: {
RouterName: "router-wrong-reframe",
RouterName: "router-wrong",
},
MethodNameFindProviders: {
RouterName: "router-wrong-reframe",
RouterName: "router-wrong",
},
MethodNameGetIPNS: {
RouterName: "router-wrong-reframe",
RouterName: "router-wrong",
},
MethodNameProvide: {
RouterName: "router-wrong-reframe",
RouterName: "router-wrong",
},
MethodNamePutIPNS: {
RouterName: "router-wrong-reframe",
RouterName: "router-wrong",
},
}

require.NoError(methodsOK.Check())

methodsMissing := Methods{
MethodNameFindPeers: {
RouterName: "router-wrong-reframe",
RouterName: "router-wrong",
},
MethodNameGetIPNS: {
RouterName: "router-wrong-reframe",
RouterName: "router-wrong",
},
MethodNameProvide: {
RouterName: "router-wrong-reframe",
RouterName: "router-wrong",
},
MethodNamePutIPNS: {
RouterName: "router-wrong-reframe",
RouterName: "router-wrong",
},
}

Expand Down
Loading
Loading