Skip to content

Commit

Permalink
fix: update server_version
Browse files Browse the repository at this point in the history
The `/v2/info` endpoint is updated to report "subnet-node" instead of
"stacks-node".
  • Loading branch information
obycode committed Mar 15, 2023
1 parent de33ff3 commit 347fc31
Show file tree
Hide file tree
Showing 13 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ jobs:
tags: ${{ env.STRETCH_TAG }}
tag_with_ref: false
add_git_labels: true
build_args: STACKS_NODE_VERSION=${{ github.event.inputs.tag || env.GITHUB_SHA_SHORT }},GIT_BRANCH=${{ env.GITHUB_REF_SHORT }},GIT_COMMIT=${{ env.GITHUB_SHA_SHORT }}
build_args: SUBNET_NODE_VERSION=${{ github.event.inputs.tag || env.GITHUB_SHA_SHORT }},GIT_BRANCH=${{ env.GITHUB_REF_SHORT }},GIT_COMMIT=${{ env.GITHUB_SHA_SHORT }}
# Only push if a tag was passed in
push: ${{ github.event.inputs.tag != '' }}

Expand Down Expand Up @@ -282,6 +282,6 @@ jobs:
tags: ${{ env.STRETCH_TAG }}
tag_with_ref: false
add_git_labels: true
build_args: STACKS_NODE_VERSION=${{ github.event.inputs.tag || env.GITHUB_SHA_SHORT }},GIT_BRANCH=${{ env.GITHUB_REF_SHORT }},GIT_COMMIT=${{ env.GITHUB_SHA_SHORT }}
build_args: SUBNET_NODE_VERSION=${{ github.event.inputs.tag || env.GITHUB_SHA_SHORT }},GIT_BRANCH=${{ env.GITHUB_REF_SHORT }},GIT_COMMIT=${{ env.GITHUB_SHA_SHORT }}
# Only push if a tag was passed in
push: ${{ github.event.inputs.tag != '' }}
4 changes: 2 additions & 2 deletions .github/workflows/docker-platforms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
STACKS_NODE_VERSION=${{ inputs.tag || env.GITHUB_SHA_SHORT }}
SUBNET_NODE_VERSION=${{ inputs.tag || env.GITHUB_SHA_SHORT }}
GIT_BRANCH=${{ env.GITHUB_REF_SHORT }}
GIT_COMMIT=${{ env.GITHUB_SHA_SHORT }}
push: true
Expand Down Expand Up @@ -119,7 +119,7 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
STACKS_NODE_VERSION=${{ inputs.tag || env.GITHUB_SHA_SHORT }}
SUBNET_NODE_VERSION=${{ inputs.tag || env.GITHUB_SHA_SHORT }}
GIT_BRANCH=${{ env.GITHUB_REF_SHORT }}
GIT_COMMIT=${{ env.GITHUB_SHA_SHORT }}
push: true
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM rust:bullseye as build

ARG STACKS_NODE_VERSION="No Version Info"
ARG SUBNET_NODE_VERSION="No Version Info"
ARG GIT_BRANCH='No Branch Info'
ARG GIT_COMMIT='No Commit Info'

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.stretch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM rust:stretch as build

ARG STACKS_NODE_VERSION="No Version Info"
ARG SUBNET_NODE_VERSION="No Version Info"
ARG GIT_BRANCH='No Branch Info'
ARG GIT_COMMIT='No Commit Info'

Expand Down
2 changes: 1 addition & 1 deletion build-scripts/Dockerfile.linux-arm64
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM rust:stretch as build

ARG STACKS_NODE_VERSION="No Version Info"
ARG SUBNET_NODE_VERSION="No Version Info"
ARG GIT_BRANCH='No Branch Info'
ARG GIT_COMMIT='No Commit Info'

Expand Down
2 changes: 1 addition & 1 deletion build-scripts/Dockerfile.linux-armv7
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM rust:stretch as build

ARG STACKS_NODE_VERSION="No Version Info"
ARG SUBNET_NODE_VERSION="No Version Info"
ARG GIT_BRANCH='No Branch Info'
ARG GIT_COMMIT='No Commit Info'

Expand Down
2 changes: 1 addition & 1 deletion build-scripts/Dockerfile.linux-musl-x64
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM rust:stretch as build

ARG STACKS_NODE_VERSION="No Version Info"
ARG SUBNET_NODE_VERSION="No Version Info"
ARG GIT_BRANCH='No Branch Info'
ARG GIT_COMMIT='No Commit Info'

Expand Down
2 changes: 1 addition & 1 deletion build-scripts/Dockerfile.linux-x64
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM rust:stretch as build

ARG STACKS_NODE_VERSION="No Version Info"
ARG SUBNET_NODE_VERSION="No Version Info"
ARG GIT_BRANCH='No Branch Info'
ARG GIT_COMMIT='No Commit Info'

Expand Down
2 changes: 1 addition & 1 deletion build-scripts/Dockerfile.macos-arm64
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM rust:bullseye as build

ARG STACKS_NODE_VERSION="No Version Info"
ARG SUBNET_NODE_VERSION="No Version Info"
ARG GIT_BRANCH='No Branch Info'
ARG GIT_COMMIT='No Commit Info'

Expand Down
2 changes: 1 addition & 1 deletion build-scripts/Dockerfile.macos-x64
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM rust:bullseye as build

ARG STACKS_NODE_VERSION="No Version Info"
ARG SUBNET_NODE_VERSION="No Version Info"
ARG GIT_BRANCH='No Branch Info'
ARG GIT_COMMIT='No Commit Info'

Expand Down
2 changes: 1 addition & 1 deletion build-scripts/Dockerfile.windows-x64
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM rust:stretch as build

ARG STACKS_NODE_VERSION="No Version Info"
ARG SUBNET_NODE_VERSION="No Version Info"
ARG GIT_BRANCH='No Branch Info'
ARG GIT_COMMIT='No Commit Info'

Expand Down
4 changes: 2 additions & 2 deletions src/net/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,8 @@ impl RPCPeerInfoData {
genesis_chainstate_hash: &Sha256Sum,
) -> RPCPeerInfoData {
let server_version = version_string(
"stacks-node",
option_env!("STACKS_NODE_VERSION")
"subnet-node",
option_env!("SUBNET_NODE_VERSION")
.or(option_env!("CARGO_PKG_VERSION"))
.unwrap_or("0.0.0.0"),
);
Expand Down
4 changes: 2 additions & 2 deletions testnet/stacks-node/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ fn main() {

fn version() -> String {
stacks::version_string(
"stacks-node",
option_env!("STACKS_NODE_VERSION")
"subnet-node",
option_env!("SUBNET_NODE_VERSION")
.or(option_env!("CARGO_PKG_VERSION"))
.unwrap_or("0.0.0.0"),
)
Expand Down

0 comments on commit 347fc31

Please sign in to comment.