Skip to content
Closed
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
37 changes: 31 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
.PHONY: build build-release build-sncli build-sn-manager
.PHONY: build build-sncli build-sn-manager
.PHONY: install-lumera setup-supernodes system-test-setup install-deps
.PHONY: gen-cascade gen-supernode
.PHONY: test-e2e test-unit test-integration test-system
.PHONY: release

# Build variables
VERSION ?= $(shell git describe --tags --always --dirty 2>/dev/null || echo "dev")
Expand All @@ -22,11 +23,8 @@ SN_MANAGER_LDFLAGS = -X main.Version=$(VERSION) \

build:
@mkdir -p release
CGO_ENABLED=1 \
GOOS=linux \
GOARCH=amd64 \
echo "Building supernode..."
go build \
@echo "Building supernode..."
CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build \
-trimpath \
-ldflags="-s -w $(LDFLAGS)" \
-o release/supernode-linux-amd64 \
Expand Down Expand Up @@ -148,3 +146,30 @@ test-cascade:
test-sn-manager:
@echo "Running sn-manager e2e tests..."
@cd tests/system && go test -tags=system_test -v -run '^TestSNManager' .



# Release command: push branch, tag, and push tag with auto-increment - this is for testing only (including releases) setup a new remote upstream or rename the script
release:
@echo "Getting current branch..."
$(eval CURRENT_BRANCH := $(shell git branch --show-current))
@echo "Current branch: $(CURRENT_BRANCH)"

@echo "Getting latest tag..."
$(eval LATEST_TAG := $(shell git tag -l "v*" | sort -V | tail -n1))
$(eval NEXT_TAG := $(shell \
if [ -z "$(LATEST_TAG)" ]; then \
echo "v2.5.0"; \
else \
echo "$(LATEST_TAG)" | sed 's/^v//' | awk -F. '{print "v" $$1 "." $$2 "." $$3+1}'; \
fi))
@echo "Next tag: $(NEXT_TAG)"

@echo "Pushing branch to upstream..."
git push upstream $(CURRENT_BRANCH) -f

@echo "Creating and pushing tag $(NEXT_TAG)..."
git tag $(NEXT_TAG)
git push upstream $(NEXT_TAG)

@echo "Release complete: $(NEXT_TAG) pushed to upstream"
424 changes: 389 additions & 35 deletions gen/supernode/service.pb.go

Large diffs are not rendered by default.

658 changes: 652 additions & 6 deletions gen/supernode/service.pb.gw.go

Large diffs are not rendered by default.

282 changes: 282 additions & 0 deletions gen/supernode/service.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,253 @@
"application/json"
],
"paths": {
"/api/v1/debug/pprof": {
"get": {
"summary": "Profiling endpoints",
"operationId": "SupernodeService_GetPprofIndex",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/supernodeGetPprofIndexResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"tags": [
"SupernodeService"
]
}
},
"/api/v1/debug/pprof/allocs": {
"get": {
"operationId": "SupernodeService_GetPprofAllocs",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/supernodeGetPprofProfileResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "debug",
"description": "Debug level (optional, default 1)",
"in": "query",
"required": false,
"type": "integer",
"format": "int32"
}
],
"tags": [
"SupernodeService"
]
}
},
"/api/v1/debug/pprof/block": {
"get": {
"operationId": "SupernodeService_GetPprofBlock",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/supernodeGetPprofProfileResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "debug",
"description": "Debug level (optional, default 1)",
"in": "query",
"required": false,
"type": "integer",
"format": "int32"
}
],
"tags": [
"SupernodeService"
]
}
},
"/api/v1/debug/pprof/goroutine": {
"get": {
"operationId": "SupernodeService_GetPprofGoroutine",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/supernodeGetPprofProfileResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "debug",
"description": "Debug level (optional, default 1)",
"in": "query",
"required": false,
"type": "integer",
"format": "int32"
}
],
"tags": [
"SupernodeService"
]
}
},
"/api/v1/debug/pprof/heap": {
"get": {
"operationId": "SupernodeService_GetPprofHeap",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/supernodeGetPprofProfileResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "debug",
"description": "Debug level (optional, default 1)",
"in": "query",
"required": false,
"type": "integer",
"format": "int32"
}
],
"tags": [
"SupernodeService"
]
}
},
"/api/v1/debug/pprof/mutex": {
"get": {
"operationId": "SupernodeService_GetPprofMutex",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/supernodeGetPprofProfileResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "debug",
"description": "Debug level (optional, default 1)",
"in": "query",
"required": false,
"type": "integer",
"format": "int32"
}
],
"tags": [
"SupernodeService"
]
}
},
"/api/v1/debug/pprof/profile": {
"get": {
"operationId": "SupernodeService_GetPprofProfile",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/supernodeGetPprofProfileResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "seconds",
"description": "Duration in seconds (optional, default 30)",
"in": "query",
"required": false,
"type": "integer",
"format": "int32"
}
],
"tags": [
"SupernodeService"
]
}
},
"/api/v1/debug/pprof/threadcreate": {
"get": {
"operationId": "SupernodeService_GetPprofThreadcreate",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/supernodeGetPprofProfileResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "debug",
"description": "Debug level (optional, default 1)",
"in": "query",
"required": false,
"type": "integer",
"format": "int32"
}
],
"tags": [
"SupernodeService"
]
}
},
"/api/v1/services": {
"get": {
"operationId": "SupernodeService_ListServices",
Expand Down Expand Up @@ -419,6 +666,41 @@
}
}
},
"supernodeGetPprofIndexResponse": {
"type": "object",
"properties": {
"html": {
"type": "string",
"title": "HTML content for the pprof index page"
},
"enabled": {
"type": "boolean",
"title": "Whether profiling is enabled"
}
}
},
"supernodeGetPprofProfileResponse": {
"type": "object",
"properties": {
"data": {
"type": "string",
"format": "byte",
"title": "Profile data (binary pprof format)"
},
"contentType": {
"type": "string",
"title": "Content type of the response"
},
"enabled": {
"type": "boolean",
"title": "Whether profiling is enabled"
},
"error": {
"type": "string",
"title": "Error message if profiling is disabled"
}
}
},
"supernodeListServicesResponse": {
"type": "object",
"properties": {
Expand Down
Loading