Skip to content
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
3 changes: 1 addition & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "linkerd2-proxy-api",
"image": "ghcr.io/linkerd/dev:v7",
"image": "ghcr.io/linkerd/dev:v10",
"extensions": [
"DavidAnson.vscode-markdownlint",
"golang.go",
Expand All @@ -16,5 +16,4 @@
],
"overrideCommand": false,
"remoteUser": "code",
"mounts": []
}
12 changes: 4 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
name: CI
on:
pull_request: {}
push:
branches:
- master

jobs:
rust_build:
name: Rust build
timeout-minutes: 5
runs-on: ubuntu-latest
container:
image: docker://rust:1.56.0-buster
image: docker://rust:1.59.0-buster
steps:
# actions/checkout@v3
- uses: actions/checkout@v3
- run: rustup component add rustfmt # Needed for the rustfmt feature.
- run: make rs
Expand All @@ -39,8 +35,6 @@ jobs:
name: Rust lint
timeout-minutes: 5
runs-on: ubuntu-latest
container:
image: docker://rust:1.56.0-buster
steps:
- uses: actions/checkout@v3
- run: rustup component add clippy rustfmt
Expand All @@ -51,7 +45,9 @@ jobs:
timeout-minutes: 5
runs-on: ubuntu-18.04
steps:
# actions/checkout@v3
- uses: actions/setup-go@f6164bd8c8acb4a71fb2791a8b6c4024ff038dab
with:
go-version: '1.17'
- uses: actions/checkout@v3
- name: Check go
run: |
Expand Down
11 changes: 4 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ default = []
# Generate code that is compatible with Tonic's `transport` module.
transport = ["tonic-build/transport", "tonic/transport"]

# Generate code that is formatted.
rustfmt = ["tonic-build/rustfmt"]

# Enable generation of arbitrary protos with quickcheck.
arbitrary = ["quickcheck"]

Expand All @@ -38,11 +35,11 @@ tap = ["h2", "http_types", "net", "prost-types"]
h2 = { version = "0.3", optional = true }
http = { version = "0.2", optional = true }
ipnet = { version = "2", optional = true }
prost = "0.9"
prost-types = { version = "0.9", optional = true }
prost = "0.10"
prost-types = { version = "0.10", optional = true }
quickcheck = { version = "1", default-features = false, optional = true }
thiserror = { version = "1", optional = true }
tonic = { version = "0.6", default-features = false, features = ["prost", "codegen"] }
tonic = { version = "0.7", default-features = false, features = ["prost", "codegen"] }

[build-dependencies]
tonic-build = { version = "0.6", default-features = false, features = ["prost"] }
tonic-build = { version = "0.7", default-features = false, features = ["prost"] }
24 changes: 13 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ GIT = git
GO = go
UNZIP = unzip

PROTOC_VERSION = 3.17.3
PROTOC_VERSION := 3.20.0
PROTOC_BASE_URL = https://github.com/google/protobuf/releases/download/v$(PROTOC_VERSION)
PROTOC ?= target/protoc-$(PROTOC_VERSION)
export PROTOC ?= target/protoc-$(PROTOC_VERSION)
export PROTOC_NO_VENDOR := 1

MODULE_NAME = github.com/linkerd/linkerd2-proxy-api

Expand All @@ -36,33 +37,34 @@ endif

$(PROTOC):
mkdir -p $(TARGET)
$(CURL) -Lo $(PROTOC).zip $(PROTOC_URL)
$(CURL) -fsSLo $(PROTOC).zip $(PROTOC_URL)
$(UNZIP) -p $(PROTOC).zip bin/protoc >$(PROTOC)
rm $(PROTOC).zip
chmod 755 $(PROTOC)

Cargo.lock: Cargo.toml
.PHONY: fetch
fetch: Cargo.toml
$(CARGO) fetch

.PHONY: rs
rs: Cargo.lock
cargo check --all-features --locked $(RELASE)
rs: fetch $(PROTOC)
cargo check --all-features --frozen $(RELEASE)

.PHONY: clippy
clippy: Cargo.lock
clippy: fetch $(PROTOC)
for api in destination http_types identity inbound net tap ; do \
for kind in arbitrary client server ; do \
$(CARGO) clippy --locked $(RELEASE) --features=$$api,$$kind --all-targets ; \
$(CARGO) clippy --frozen $(RELEASE) --features=$$api,$$kind --all-targets ; \
done ; \
done


.PHONY: go
go: $(PROTOC)
@rm -rf go/*
mkdir -p ./go/destination ./go/http_types ./go/identity ./go/inbound ./go/net ./go/tap
$(GO) get google.golang.org/protobuf/cmd/protoc-gen-go@v1.27.1
$(GO) get google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.1
$(GO) mod download
$(GO) install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28
$(GO) install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.2
$(PROTOC) -I proto --go_out=paths=source_relative:./go/destination proto/destination.proto
$(PROTOC) -I proto --go_out=paths=source_relative:./go/http_types proto/http_types.proto
$(PROTOC) -I proto --go_out=paths=source_relative:./go/identity proto/identity.proto
Expand Down
2 changes: 1 addition & 1 deletion deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ multiple-versions = "deny"
wildcards = "allow"
highlight = "all"
deny = []
skip = [{ name = "itoa", version = "0.4" }]
skip = []
skip-tree = []

[sources]
Expand Down
4 changes: 2 additions & 2 deletions go/destination/destination.pb.go

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

4 changes: 4 additions & 0 deletions go/destination/destination_grpc.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 go/http_types/http_types.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 go/identity/identity.pb.go

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

4 changes: 4 additions & 0 deletions go/identity/identity_grpc.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 go/inbound/inbound.pb.go

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

4 changes: 4 additions & 0 deletions go/inbound/inbound_grpc.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 go/net/net.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 go/tap/tap.pb.go

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

4 changes: 4 additions & 0 deletions go/tap/tap_grpc.pb.go

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