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

chore: bump akash-api to v0.0.23 #1841

Merged
merged 6 commits into from
Jun 16, 2023
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
4 changes: 3 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ jobs:
echo "TEST_REQUIRED=$test_required" >> $GITHUB_ENV
- name: run test
if: env.TEST_REQUIRED == 'true'
env: UPGRADE_BINARY_VERSION=${{ env.RELEASE_TAG }}
env:
UPGRADE_BINARY_VERSION: ${{ env.RELEASE_TAG }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd tests/upgrade
make test
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ jobs:
with:
go-version: "${{ env.GOLANG_VERSION }}"
- run: make deps-tidy
- run: make deps-vendor
- run: make build
- run: make test-vet
- name: lint all
Expand Down
4 changes: 0 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ include make/init.mk
.DEFAULT_GOAL := bins

DOCKER_RUN := docker run --rm -v $(shell pwd):/workspace -w /workspace
DOCKER_BUF := $(DOCKER_RUN) bufbuild/buf:$(BUF_VERSION)
DOCKER_CLANG := $(DOCKER_RUN) tendermintdev/docker-build-proto
GOLANGCI_LINT_RUN := $(GOLANGCI_LINT) run
LINT = $(GOLANGCI_LINT_RUN) ./... --disable-all --deadline=5m --enable

Expand Down Expand Up @@ -69,12 +67,10 @@ all: build bins
clean: cache-clean
rm -f $(BINS)

include make/proto.mk
include make/releasing.mk
include make/mod.mk
include make/lint.mk
include make/test-integration.mk
include make/test-simulation.mk
include make/tools.mk
include make/environment.mk
include make/codegen.mk
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ module github.com/akash-network/node
go 1.20

require (
github.com/akash-network/akash-api v0.0.20
github.com/akash-network/akash-api v0.0.23
github.com/blang/semver/v4 v4.0.0
github.com/boz/go-lifecycle v0.1.0
github.com/boz/go-lifecycle v0.1.1
github.com/cosmos/cosmos-sdk v0.45.16
github.com/cosmos/ibc-go/v4 v4.4.1
github.com/gogo/protobuf v1.3.3
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBA
github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c=
github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY=
github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw=
github.com/akash-network/akash-api v0.0.20 h1:rLj7DfAUNkL/HfArHZk9gnX7UjPNVz5ad9/kiBGmLSY=
github.com/akash-network/akash-api v0.0.20/go.mod h1:9/uYusyBcZecBQCgZWUbXRu0i1tyxj4/ze45XB2oLIU=
github.com/akash-network/akash-api v0.0.23 h1:zsu5ARReF7h8pD5jlBci3RpyJaahcvwI56IvNpR9+gE=
github.com/akash-network/akash-api v0.0.23/go.mod h1:9/uYusyBcZecBQCgZWUbXRu0i1tyxj4/ze45XB2oLIU=
github.com/akash-network/cometbft v0.34.27-akash h1:V1dApDOr8Ee7BJzYyQ7Z9VBtrAul4+baMeA6C49dje0=
github.com/akash-network/cometbft v0.34.27-akash/go.mod h1:BcCbhKv7ieM0KEddnYXvQZR+pZykTKReJJYf7YC7qhw=
github.com/akash-network/ledger-go v0.14.3 h1:LCEFkTfgGA2xFMN2CtiKvXKE7dh0QSM77PJHCpSkaAo=
Expand Down Expand Up @@ -151,8 +151,8 @@ github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM
github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ=
github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c=
github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps=
github.com/boz/go-lifecycle v0.1.0 h1:ytF+zvxcIhu5DHxkENEh9eeaw4NnTZbKbDoiUunDEpw=
github.com/boz/go-lifecycle v0.1.0/go.mod h1:zdagAUMcC2C0OmQkBlJZFV77uF4GCVaGphAexGi7oho=
github.com/boz/go-lifecycle v0.1.1 h1:tG/wff7Zxbkf19g4D4I0G8Y4sq83iT5QjD4rzEf/zrI=
github.com/boz/go-lifecycle v0.1.1/go.mod h1:zdagAUMcC2C0OmQkBlJZFV77uF4GCVaGphAexGi7oho=
github.com/btcsuite/btcd v0.0.0-20190315201642-aa6e0f35703c/go.mod h1:DrZx5ec/dmnfpw9KyYoQyYo7d0KEvTkk/5M/vbZjAr8=
github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ=
github.com/btcsuite/btcd v0.21.0-beta.0.20201114000516-e9c7a5ac6401/go.mod h1:Sv4JPQ3/M+teHz9Bo5jBpkNcP0x6r7rdihlNL/7tTAs=
Expand Down
5 changes: 0 additions & 5 deletions make/environment.mk

This file was deleted.

4 changes: 0 additions & 4 deletions make/init.mk
Original file line number Diff line number Diff line change
Expand Up @@ -57,27 +57,23 @@ GO_MOD_NAME := $(shell go list -m 2>/dev/null)

# ==== Build tools versions ====
# Format <TOOL>_VERSION
BUF_VERSION ?= 0.35.1
GOLANGCI_LINT_VERSION ?= v1.51.2
GOLANG_VERSION ?= 1.16.1
STATIK_VERSION ?= v0.1.7
GIT_CHGLOG_VERSION ?= v0.15.1
MODVENDOR_VERSION ?= v0.3.0
MOCKERY_VERSION ?= 2.24.0
COSMOVISOR_VERSION ?= v1.4.0

# ==== Build tools version tracking ====
# <TOOL>_VERSION_FILE points to the marker file for the installed version.
# If <TOOL>_VERSION_FILE is changed, the binary will be re-downloaded.
MODVENDOR_VERSION_FILE := $(AKASH_DEVCACHE_VERSIONS)/modvendor/$(MODVENDOR_VERSION)
GIT_CHGLOG_VERSION_FILE := $(AKASH_DEVCACHE_VERSIONS)/git-chglog/$(GIT_CHGLOG_VERSION)
MOCKERY_VERSION_FILE := $(AKASH_DEVCACHE_VERSIONS)/mockery/v$(MOCKERY_VERSION)
GOLANGCI_LINT_VERSION_FILE := $(AKASH_DEVCACHE_VERSIONS)/golangci-lint/$(GOLANGCI_LINT_VERSION)
STATIK_VERSION_FILE := $(AKASH_DEVCACHE_VERSIONS)/statik/$(STATIK_VERSION)
COSMOVISOR_VERSION_FILE := $(AKASH_DEVCACHE_VERSIONS)/cosmovisor/$(COSMOVISOR_VERSION)

# ==== Build tools executables ====
MODVENDOR := $(AKASH_DEVCACHE_BIN)/modvendor
GIT_CHGLOG := $(AKASH_DEVCACHE_BIN)/git-chglog
MOCKERY := $(AKASH_DEVCACHE_BIN)/mockery
NPM := npm
Expand Down
15 changes: 0 additions & 15 deletions make/mod.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,3 @@ deps-install:
.PHONY: deps-tidy
deps-tidy:
go mod tidy

.PHONY: deps-vendor
deps-vendor:
go mod vendor

.PHONY: modsensure
modsensure: deps-tidy deps-vendor

.PHONY: modvendor
modvendor: $(MODVENDOR) modsensure
ifeq ($(GO_MOD), vendor)
modvendor:
@echo "vendoring non-go files..."
$(MODVENDOR) -copy="**/*.h **/*.c" -include=github.com/zondax/hid
endif
31 changes: 0 additions & 31 deletions make/proto.mk

This file was deleted.

24 changes: 13 additions & 11 deletions make/releasing.mk
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ endif

# if go.mod contains replace for any modules on local filesystem
# mount them into docker during goreleaser build to exactly same path
REPLACED_MODULES := $(shell go list -mod=readonly -m -f '{{ .Replace }}' all 2>/dev/null | grep -v -x -F "<nil>" | grep "^/")
ifneq ($(REPLACED_MODULES), )
GORELEASER_MOUNT_REPLACED := $(foreach mod, $(REPLACED_MODULES), -v $(mod):$(mod)\\)
endif
GORELEASER_MOUNT_REPLACED := $(GORELEASER_MOUNT_REPLACED:\\=)
#REPLACED_MODULES := $(shell go list -mod=readonly -m -f '{{ .Replace }}' all 2>/dev/null | grep -v -x -F "<nil>" | grep "^/")
#ifneq ($(REPLACED_MODULES), )
# GORELEASER_MOUNT_REPLACED := $(foreach mod, $(REPLACED_MODULES), -v $(mod):$(mod)\\)
#endif
#GORELEASER_MOUNT_REPLACED := $(GORELEASER_MOUNT_REPLACED:\\=)

.PHONY: bins
bins: $(BINS)
Expand All @@ -47,7 +47,7 @@ bins: $(BINS)
build:
$(GO_BUILD) -a ./...

$(AKASH): modvendor
$(AKASH):
$(GO_BUILD) -o $@ $(BUILD_FLAGS) ./cmd/akash

.PHONY: akash
Expand Down Expand Up @@ -77,10 +77,11 @@ docker-image:
-e STRIP_FLAGS="$(GORELEASER_STRIP_FLAGS)" \
-e LINKMODE="$(GO_LINKMODE)" \
-e DOCKER_IMAGE=$(RELEASE_DOCKER_IMAGE) \
-e GOPATH=/go \
-v $(GOPATH):/go:ro \
-v /var/run/docker.sock:/var/run/docker.sock \
$(GORELEASER_MOUNT_REPLACED) \
-v `pwd`:/go/src/github.com/akash-network/node \
-w /go/src/github.com/akash-network/node \
-v `pwd`:/go/src/$(GO_MOD_NAME) \
-w /go/src/$(GO_MOD_NAME) \
$(GORELEASER_IMAGE) \
-f .goreleaser-docker.yaml \
--debug=$(GORELEASER_DEBUG) \
Expand All @@ -94,7 +95,7 @@ gen-changelog: $(GIT_CHGLOG)
@echo "generating changelog to .cache/changelog"
./script/genchangelog.sh "$(RELEASE_TAG)" .cache/changelog.md
.PHONY: release
release: modvendor gen-changelog
release: gen-changelog
docker run \
--rm \
-e STABLE=$(IS_STABLE) \
Expand All @@ -106,8 +107,9 @@ release: modvendor gen-changelog
-e GITHUB_TOKEN="$(GITHUB_TOKEN)" \
-e GORELEASER_CURRENT_TAG="$(RELEASE_TAG)" \
-e DOCKER_IMAGE=$(RELEASE_DOCKER_IMAGE) \
-e GOPATH=/go \
-v $(GOPATH):/go:ro \
-v /var/run/docker.sock:/var/run/docker.sock \
$(GORELEASER_MOUNT_REPLACED) \
-v `pwd`:/go/src/$(GO_MOD_NAME) \
-w /go/src/$(GO_MOD_NAME) \
$(GORELEASER_IMAGE) \
Expand Down
9 changes: 0 additions & 9 deletions make/setup-cache.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,6 @@ $(AKASH_DEVCACHE):
mkdir -p $(AKASH_DEVCACHE)/run
cache: $(AKASH_DEVCACHE)

$(MODVENDOR_VERSION_FILE): $(AKASH_DEVCACHE)
@echo "installing modvendor $(MODVENDOR_VERSION) ..."
rm -f $(MODVENDOR)
GOBIN=$(AKASH_DEVCACHE_BIN) $(GO) install github.com/goware/modvendor@$(MODVENDOR_VERSION)
rm -rf "$(dir $@)"
mkdir -p "$(dir $@)"
touch $@
$(MODVENDOR): $(MODVENDOR_VERSION_FILE)

$(GIT_CHGLOG_VERSION_FILE): $(AKASH_DEVCACHE)
@echo "installing git-chglog $(GIT_CHGLOG_VERSION) ..."
rm -f $(GIT_CHGLOG)
Expand Down
4 changes: 3 additions & 1 deletion sdl/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,10 @@ func toManifestResources(res *v2ComputeResources) types.ResourceUnits {

if res.GPU != nil {
units.GPU = &types.GPU{
Units: types.NewResourceValue(uint64(res.GPU.Units)),
Units: types.NewResourceValue(uint64(res.GPU.Units)),
Attributes: make(types.Attributes, len(res.GPU.Attributes)),
}
copy(units.GPU.Attributes, res.GPU.Attributes)
} else {
units.GPU = &types.GPU{
Units: types.NewResourceValue(0),
Expand Down
2 changes: 1 addition & 1 deletion sdl/v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ func (sdl *v2) Manifest() (manifest.Manifest, error) {
groups[group.Name] = group
}

// at this moment compute and svc have been check for existence
// at this moment compute and svc have been checked for existence
compute := sdl.Profiles.Compute[svcdepl.Profile]
svc := sdl.Services[svcName]

Expand Down
6 changes: 6 additions & 0 deletions sdl/v2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,12 @@ func TestV2ParseSimpleGPU(t *testing.T) {
},
GPU: &atypes.GPU{
Units: atypes.NewResourceValue(1),
Attributes: atypes.Attributes{
{
Key: "vendor/nvidia/model/a100",
Value: "true",
},
},
},
Memory: &atypes.Memory{
Quantity: atypes.NewResourceValue(128 * unit.Mi),
Expand Down
Loading