Skip to content

Commit

Permalink
Merge branch 'master' into nikolajls/get_message_by_id_ledgerId
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikolajls committed Jan 10, 2025
2 parents 378a181 + eceaf14 commit c933c86
Show file tree
Hide file tree
Showing 44 changed files with 584 additions and 554 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci-bookie-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ jobs:
bookie-ut-tests:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.18
- name: Set up Go 1.22
uses: actions/setup-go@v1
with:
go-version: 1.18
go-version: 1.22
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Run bookKeeper service
run: |
pushd test/docker
docker-compose pull
docker-compose up -d
docker compose pull
docker compose up -d
popd
- name: Check bookKeeper service
run: |
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/ci-functions-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
steps:
- name: Login SN docker hub
run: docker login -u="${{ secrets.DOCKER_USER }}" -p="${{ secrets.DOCKER_PASSWORD}}"
- name: Set up Go 1.18
- name: Set up Go 1.22
uses: actions/setup-go@v1
with:
go-version: 1.18
go-version: 1.22
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
Expand All @@ -30,10 +30,10 @@ jobs:
steps:
- name: Login SN docker hub
run: docker login -u="${{ secrets.DOCKER_USER }}" -p="${{ secrets.DOCKER_PASSWORD}}"
- name: Set up Go 1.18
- name: Set up Go 1.22
uses: actions/setup-go@v1
with:
go-version: 1.18
go-version: 1.22
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
Expand All @@ -44,10 +44,10 @@ jobs:
steps:
- name: Login SN docker hub
run: docker login -u="${{ secrets.DOCKER_USER }}" -p="${{ secrets.DOCKER_PASSWORD}}"
- name: Set up Go 1.18
- name: Set up Go 1.22
uses: actions/setup-go@v1
with:
go-version: 1.18
go-version: 1.22
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-packages-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
steps:
- name: Login SN docker hub
run: docker login -u="${{ secrets.DOCKER_USER }}" -p="${{ secrets.DOCKER_PASSWORD}}"
- name: Set up Go 1.18
- name: Set up Go 1.22
uses: actions/setup-go@v1
with:
go-version: 1.18
go-version: 1.22
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-release-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ 1.18, 1.19, 1.20 ]
go-version: [ 1.21, 1.22 ]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v1
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci-style-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ jobs:
style-check:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.18
- name: Set up Go 1.22
uses: actions/setup-go@v1
with:
go-version: 1.18
go-version: 1.22
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: InstallTool
run: |
wget -O - -q https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s v1.45.2
wget -O - -q https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s v1.56.2
./bin/golangci-lint --version
- name: Build
run: go build .
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/ci-trivy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Pulsarctl
on:
pull_request:
branches:
- '*'
path-ignores:
- 'docs/**'
- 'README.md'
- 'CONTRIBUTING.md'

jobs:
scan-vulnerabilities:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.22
uses: actions/setup-go@v1
with:
go-version: 1.22
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Build
run: go build .

- name: Build docker image
run: docker build -f docker/amd64-linux.Dockerfile -t pulsarctl .

- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: 'pulsarctl:latest'
format: 'table'
exit-code: '1'
severity: "MEDIUM,HIGH,CRITICAL"
vuln-type: "library"
2 changes: 1 addition & 1 deletion docker/amd64-linux.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.16.2
FROM alpine:3.20

ADD pulsarctl /usr/local/bin/pulsarctl

Expand Down
89 changes: 58 additions & 31 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,67 +1,94 @@
module github.com/streamnative/pulsarctl

go 1.18
go 1.22.7

require (
github.com/apache/pulsar-client-go v0.9.1-0.20230816081803-fbee610ddcbf
github.com/docker/go-connections v0.4.0
github.com/apache/pulsar-client-go v0.13.0-candidate-1.0.20240813105849-ab042ae714d1
github.com/docker/go-connections v0.5.0
github.com/fatih/color v1.7.0
github.com/ghodss/yaml v1.0.0
github.com/golang-jwt/jwt/v4 v4.4.3
github.com/imdario/mergo v0.3.8
github.com/kris-nova/logger v0.0.0-20181127235838-fd0d87064b06
github.com/kris-nova/lolgopher v0.0.0-20180921204813-313b3abb0d9b
github.com/magiconair/properties v1.8.5
github.com/magiconair/properties v1.8.7
github.com/olekukonko/tablewriter v0.0.1
github.com/onsi/gomega v1.19.0
github.com/pkg/errors v0.9.1
github.com/spf13/cobra v1.6.1
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.8.0
github.com/testcontainers/testcontainers-go v0.0.10
github.com/stretchr/testify v1.9.0
github.com/testcontainers/testcontainers-go v0.32.0
gopkg.in/yaml.v2 v2.4.0
)

require (
dario.cat/mergo v1.0.0 // indirect
github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect
github.com/99designs/keyring v1.2.1 // indirect
github.com/Microsoft/go-winio v0.4.11 // indirect
github.com/Microsoft/hcsshim v0.8.6 // indirect
github.com/cenkalti/backoff v2.2.1+incompatible // indirect
github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc // indirect
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
github.com/Microsoft/go-winio v0.6.2 // indirect
github.com/Microsoft/hcsshim v0.11.5 // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/containerd/containerd v1.7.18 // indirect
github.com/containerd/errdefs v0.1.0 // indirect
github.com/containerd/log v0.1.0 // indirect
github.com/cpuguy83/dockercfg v0.3.1 // indirect
github.com/danieljoos/wincred v1.1.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible // indirect
github.com/docker/docker v0.7.3-0.20190506211059-b20a14b54661 // indirect
github.com/docker/go-units v0.3.3 // indirect
github.com/distribution/reference v0.6.0 // indirect
github.com/docker/docker v27.1.1+incompatible // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/dvsekhvalnov/jose2go v1.6.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-jwt/jwt v3.2.1+incompatible // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang-jwt/jwt/v5 v5.2.1 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect
github.com/inconshreveable/mousetrap v1.0.1 // indirect
github.com/konsorten/go-windows-terminal-sequences v1.0.3 // indirect
github.com/klauspost/compress v1.17.9 // indirect
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
github.com/mattn/go-colorable v0.1.2 // indirect
github.com/mattn/go-isatty v0.0.8 // indirect
github.com/mattn/go-runewidth v0.0.4 // indirect
github.com/moby/docker-image-spec v1.3.1 // indirect
github.com/moby/patternmatcher v0.6.0 // indirect
github.com/moby/sys/sequential v0.5.0 // indirect
github.com/moby/sys/user v0.1.0 // indirect
github.com/moby/term v0.5.0 // indirect
github.com/morikuni/aec v1.0.0 // indirect
github.com/mtibben/percent v0.2.1 // indirect
github.com/opencontainers/go-digest v1.0.0-rc1 // indirect
github.com/opencontainers/image-spec v1.0.1 // indirect
github.com/opencontainers/runc v0.1.1 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/satori/go.uuid v1.2.0 // indirect
github.com/sirupsen/logrus v1.6.0 // indirect
golang.org/x/net v0.19.0 // indirect
golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602 // indirect
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/term v0.15.0 // indirect
golang.org/x/text v0.14.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c // indirect
google.golang.org/grpc v1.38.0 // indirect
google.golang.org/protobuf v1.30.0 // indirect
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
github.com/shirou/gopsutil/v3 v3.23.12 // indirect
github.com/shoenig/go-m1cpu v0.1.6 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/tklauser/go-sysconf v0.3.12 // indirect
github.com/tklauser/numcpus v0.6.1 // indirect
github.com/yusufpapurcu/wmi v1.2.3 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0 // indirect
go.opentelemetry.io/otel v1.27.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0 // indirect
go.opentelemetry.io/otel/metric v1.27.0 // indirect
go.opentelemetry.io/otel/sdk v1.27.0 // indirect
go.opentelemetry.io/otel/trace v1.27.0 // indirect
golang.org/x/crypto v0.24.0 // indirect
golang.org/x/net v0.26.0 // indirect
golang.org/x/oauth2 v0.18.0 // indirect
golang.org/x/sys v0.21.0 // indirect
golang.org/x/term v0.21.0 // indirect
golang.org/x/text v0.16.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291 // indirect
google.golang.org/grpc v1.64.1 // indirect
google.golang.org/protobuf v1.34.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

Expand Down
Loading

0 comments on commit c933c86

Please sign in to comment.