From ffc2aeefd891354f8239e09d07d2772824f33516 Mon Sep 17 00:00:00 2001 From: wjrjerome Date: Tue, 30 Jul 2024 20:55:49 +1000 Subject: [PATCH] chore: update to babylon lab --- .github/workflows/ci.yml | 4 ++-- .github/workflows/publish.yml | 4 ++-- LICENSE | 6 ++--- cmd/staking-expiry-checker/main.go | 16 +++++++------- contrib/images/Makefile | 4 ++-- .../images/staking-expiry-checker/Dockerfile | 12 +++++----- docker-compose.yml | 2 +- go.mod | 4 ++-- go.sum | 4 ++-- internal/btcclient/btcclient.go | 6 ++--- internal/config/btc.go | 2 +- internal/config/config.go | 2 +- internal/db/dbclient.go | 4 ++-- internal/db/interface.go | 2 +- internal/observability/metrics/metrics.go | 2 +- internal/poller/poller.go | 2 +- internal/queue/queue.go | 6 ++--- internal/services/service.go | 8 +++---- tests/expired_delegations_test.go | 6 ++--- tests/mocks/mock_db_client.go | 2 +- tests/setup.go | 22 +++++++++---------- 21 files changed, 60 insertions(+), 60 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d37ad66..40a9e3f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,14 +7,14 @@ on: jobs: lint_test: - uses: babylonchain/.github/.github/workflows/reusable_go_lint_test.yml@v0.1.0 + uses: babylonlabs-io/.github/.github/workflows/reusable_go_lint_test.yml@v0.2.0 with: run-unit-tests: true run-integration-tests: false run-lint: true docker_pipeline: - uses: babylonchain/.github/.github/workflows/reusable_docker_pipeline.yml@v0.1.0 + uses: babylonlabs-io/.github/.github/workflows/reusable_docker_pipeline.yml@v0.2.0 secrets: inherit with: publish: false diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9c4281a..cfd87b6 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -10,7 +10,7 @@ on: jobs: lint_test: - uses: babylonchain/.github/.github/workflows/reusable_go_lint_test.yml@v0.1.0 + uses: babylonlabs-io/.github/.github/workflows/reusable_go_lint_test.yml@v0.2.0 with: run-unit-tests: true run-integration-tests: false @@ -18,7 +18,7 @@ jobs: docker_pipeline: needs: ["lint_test"] - uses: babylonchain/.github/.github/workflows/reusable_docker_pipeline.yml@v0.1.0 + uses: babylonlabs-io/.github/.github/workflows/reusable_docker_pipeline.yml@v0.2.0 secrets: inherit with: publish: true diff --git a/LICENSE b/LICENSE index ed4bc22..9530ea8 100644 --- a/LICENSE +++ b/LICENSE @@ -8,14 +8,14 @@ License text copyright (c) 2017 MariaDB Corporation Ab, All Rights Reserved. Parameters -Licensor: Babylonchain, Inc. +Licensor: Babylon Labs, Ltd. Licensed Work: staking-expiry-checker - The Licensed Work is (c) 2024 Babylonchain, Inc. + The Licensed Work is (c) 2024 Babylon Labs, Ltd. Additional Use Grant: None. -Change Date: 2027-05-15 (March 15th, 2027] +Change Date: 2027-05-15 (March 15th, 2027) Change License: Apache 2.0 diff --git a/cmd/staking-expiry-checker/main.go b/cmd/staking-expiry-checker/main.go index 125b487..b103085 100644 --- a/cmd/staking-expiry-checker/main.go +++ b/cmd/staking-expiry-checker/main.go @@ -7,14 +7,14 @@ import ( "github.com/joho/godotenv" "github.com/rs/zerolog/log" - "github.com/babylonchain/staking-expiry-checker/cmd/staking-expiry-checker/cli" - "github.com/babylonchain/staking-expiry-checker/internal/btcclient" - "github.com/babylonchain/staking-expiry-checker/internal/config" - "github.com/babylonchain/staking-expiry-checker/internal/db" - "github.com/babylonchain/staking-expiry-checker/internal/observability/metrics" - "github.com/babylonchain/staking-expiry-checker/internal/poller" - "github.com/babylonchain/staking-expiry-checker/internal/queue" - "github.com/babylonchain/staking-expiry-checker/internal/services" + "github.com/babylonlabs-io/staking-expiry-checker/cmd/staking-expiry-checker/cli" + "github.com/babylonlabs-io/staking-expiry-checker/internal/btcclient" + "github.com/babylonlabs-io/staking-expiry-checker/internal/config" + "github.com/babylonlabs-io/staking-expiry-checker/internal/db" + "github.com/babylonlabs-io/staking-expiry-checker/internal/observability/metrics" + "github.com/babylonlabs-io/staking-expiry-checker/internal/poller" + "github.com/babylonlabs-io/staking-expiry-checker/internal/queue" + "github.com/babylonlabs-io/staking-expiry-checker/internal/services" ) func init() { diff --git a/contrib/images/Makefile b/contrib/images/Makefile index 8260469..d44c8ad 100644 --- a/contrib/images/Makefile +++ b/contrib/images/Makefile @@ -3,8 +3,8 @@ DOCKER = $(shell which docker) .PHONY: staking-expiry-checker staking-expiry-checker-rmi staking-expiry-checker: - $(DOCKER) build --tag babylonchain/staking-expiry-checker -f staking-expiry-checker/Dockerfile \ + $(DOCKER) build --tag babylonlabs-io/staking-expiry-checker -f staking-expiry-checker/Dockerfile \ $(shell git rev-parse --show-toplevel) staking-expiry-checker-rmi: - $(DOCKER) rmi babylonchain/staking-expiry-checker 2>/dev/null; true + $(DOCKER) rmi babylonlabs-io/staking-expiry-checker 2>/dev/null; true diff --git a/contrib/images/staking-expiry-checker/Dockerfile b/contrib/images/staking-expiry-checker/Dockerfile index 628cfe8..1d7f5e9 100644 --- a/contrib/images/staking-expiry-checker/Dockerfile +++ b/contrib/images/staking-expiry-checker/Dockerfile @@ -15,12 +15,12 @@ RUN apk add --no-cache \ openssh # Build -WORKDIR /go/src/github.com/babylonchain/staking-expiry-checker +WORKDIR /go/src/github.com/babylonlabs-io/staking-expiry-checker # Cache dependencies -COPY go.mod go.sum /go/src/github.com/babylonchain/staking-expiry-checker/ +COPY go.mod go.sum /go/src/github.com/babylonlabs-io/staking-expiry-checker/ # Copy the rest of the files -COPY ./ /go/src/github.com/babylonchain/staking-expiry-checker/ +COPY ./ /go/src/github.com/babylonlabs-io/staking-expiry-checker/ RUN LDFLAGS='-extldflags "-static" -v' \ @@ -37,12 +37,12 @@ RUN addgroup --gid 1138 -S staking-expiry-checker && adduser --uid 1138 -S staki RUN apk add bash curl jq # Label should match your github repo -LABEL org.opencontainers.image.source="https://github.com/babylonchain/staking-expiry-checker:${VERSION}" +LABEL org.opencontainers.image.source="https://github.com/babylonlabs-io/staking-expiry-checker:${VERSION}" # Copy over binaries from the build-env -COPY --from=builder /go/src/github.com/babylonchain/staking-expiry-checker/build/staking-expiry-checker /bin/staking-expiry-checker -COPY --from=builder /go/src/github.com/babylonchain/staking-expiry-checker/contrib/images/staking-expiry-checker/entrypoint.sh /bin/entrypoint.sh +COPY --from=builder /go/src/github.com/babylonlabs-io/staking-expiry-checker/build/staking-expiry-checker /bin/staking-expiry-checker +COPY --from=builder /go/src/github.com/babylonlabs-io/staking-expiry-checker/contrib/images/staking-expiry-checker/entrypoint.sh /bin/entrypoint.sh WORKDIR /home/staking-expiry-checker RUN chown -R staking-expiry-checker /home/staking-expiry-checker diff --git a/docker-compose.yml b/docker-compose.yml index 78fca1d..17d0726 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: "3.9" services: staking-expiry-checker: - image: babylonchain/staking-expiry-checker:latest + image: babylonlabs/staking-expiry-checker:latest container_name: staking-expiry-checker environment: - CONFIG=/home/staking-expiry-checker/config.yml diff --git a/go.mod b/go.mod index 3cab9d9..4a5bed3 100644 --- a/go.mod +++ b/go.mod @@ -1,9 +1,9 @@ -module github.com/babylonchain/staking-expiry-checker +module github.com/babylonlabs-io/staking-expiry-checker go 1.21.6 require ( - github.com/babylonchain/staking-queue-client v0.2.0 + github.com/babylonlabs-io/staking-queue-client v0.4.1 github.com/btcsuite/btcd v0.24.0 github.com/rabbitmq/amqp091-go v1.9.0 github.com/spf13/viper v1.18.2 diff --git a/go.sum b/go.sum index ac38a24..8c3100a 100644 --- a/go.sum +++ b/go.sum @@ -1,6 +1,6 @@ github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= -github.com/babylonchain/staking-queue-client v0.2.0 h1:kktKgXJXDAheBv82s7LV5L2CPAfzhtHllNrIopXGjIo= -github.com/babylonchain/staking-queue-client v0.2.0/go.mod h1:mEgA6N3SnwFwGEOsUYr/HdjpKa13Wck08MS7VY/Icvo= +github.com/babylonlabs-io/staking-queue-client v0.4.1 h1:AW+jtrNxZYN/isRx+njqjHbUU9CzhF42Ke6roK+0N3I= +github.com/babylonlabs-io/staking-queue-client v0.4.1/go.mod h1:n3fr3c+9LNiJlyETmcrVk94Zn76rAADhGZKxX+rVf+Q= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= diff --git a/internal/btcclient/btcclient.go b/internal/btcclient/btcclient.go index 9749235..9dce989 100644 --- a/internal/btcclient/btcclient.go +++ b/internal/btcclient/btcclient.go @@ -4,9 +4,9 @@ import ( "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcd/rpcclient" - "github.com/babylonchain/staking-expiry-checker/internal/config" - "github.com/babylonchain/staking-expiry-checker/internal/observability/metrics" - "github.com/babylonchain/staking-expiry-checker/internal/utils" + "github.com/babylonlabs-io/staking-expiry-checker/internal/config" + "github.com/babylonlabs-io/staking-expiry-checker/internal/observability/metrics" + "github.com/babylonlabs-io/staking-expiry-checker/internal/utils" ) type BtcClient struct { diff --git a/internal/config/btc.go b/internal/config/btc.go index e29af71..b474f29 100644 --- a/internal/config/btc.go +++ b/internal/config/btc.go @@ -3,7 +3,7 @@ package config import ( "fmt" - "github.com/babylonchain/staking-expiry-checker/internal/utils" + "github.com/babylonlabs-io/staking-expiry-checker/internal/utils" ) type BtcConfig struct { diff --git a/internal/config/config.go b/internal/config/config.go index b62c766..3800dad 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -5,7 +5,7 @@ import ( "os" "strings" - queue "github.com/babylonchain/staking-queue-client/config" + queue "github.com/babylonlabs-io/staking-queue-client/config" "github.com/spf13/viper" ) diff --git a/internal/db/dbclient.go b/internal/db/dbclient.go index 7963402..083d401 100644 --- a/internal/db/dbclient.go +++ b/internal/db/dbclient.go @@ -9,8 +9,8 @@ import ( "go.mongodb.org/mongo-driver/mongo" "go.mongodb.org/mongo-driver/mongo/options" - "github.com/babylonchain/staking-expiry-checker/internal/config" - "github.com/babylonchain/staking-expiry-checker/internal/db/model" + "github.com/babylonlabs-io/staking-expiry-checker/internal/config" + "github.com/babylonlabs-io/staking-expiry-checker/internal/db/model" ) type Database struct { diff --git a/internal/db/interface.go b/internal/db/interface.go index 6a7f3b3..76de8ad 100644 --- a/internal/db/interface.go +++ b/internal/db/interface.go @@ -3,7 +3,7 @@ package db import ( "context" - "github.com/babylonchain/staking-expiry-checker/internal/db/model" + "github.com/babylonlabs-io/staking-expiry-checker/internal/db/model" "go.mongodb.org/mongo-driver/bson/primitive" ) diff --git a/internal/observability/metrics/metrics.go b/internal/observability/metrics/metrics.go index 3a77ae5..e6b07df 100644 --- a/internal/observability/metrics/metrics.go +++ b/internal/observability/metrics/metrics.go @@ -11,7 +11,7 @@ import ( "github.com/prometheus/client_golang/prometheus/promhttp" "github.com/rs/zerolog/log" - "github.com/babylonchain/staking-expiry-checker/internal/utils" + "github.com/babylonlabs-io/staking-expiry-checker/internal/utils" ) type Outcome string diff --git a/internal/poller/poller.go b/internal/poller/poller.go index 22d1307..f31e5c3 100644 --- a/internal/poller/poller.go +++ b/internal/poller/poller.go @@ -6,7 +6,7 @@ import ( "github.com/rs/zerolog/log" - "github.com/babylonchain/staking-expiry-checker/internal/services" + "github.com/babylonlabs-io/staking-expiry-checker/internal/services" ) type Poller struct { diff --git a/internal/queue/queue.go b/internal/queue/queue.go index f792c52..4592b16 100644 --- a/internal/queue/queue.go +++ b/internal/queue/queue.go @@ -7,9 +7,9 @@ import ( "github.com/rs/zerolog/log" - "github.com/babylonchain/staking-expiry-checker/internal/observability/metrics" - "github.com/babylonchain/staking-queue-client/client" - queueConfig "github.com/babylonchain/staking-queue-client/config" + "github.com/babylonlabs-io/staking-expiry-checker/internal/observability/metrics" + "github.com/babylonlabs-io/staking-queue-client/client" + queueConfig "github.com/babylonlabs-io/staking-queue-client/config" ) type QueueManager struct { diff --git a/internal/services/service.go b/internal/services/service.go index be76ce2..627b4f3 100644 --- a/internal/services/service.go +++ b/internal/services/service.go @@ -3,10 +3,10 @@ package services import ( "context" - "github.com/babylonchain/staking-expiry-checker/internal/btcclient" - "github.com/babylonchain/staking-expiry-checker/internal/db" - "github.com/babylonchain/staking-expiry-checker/internal/queue" - queueclient "github.com/babylonchain/staking-queue-client/client" + "github.com/babylonlabs-io/staking-expiry-checker/internal/btcclient" + "github.com/babylonlabs-io/staking-expiry-checker/internal/db" + "github.com/babylonlabs-io/staking-expiry-checker/internal/queue" + queueclient "github.com/babylonlabs-io/staking-queue-client/client" ) type Service struct { diff --git a/tests/expired_delegations_test.go b/tests/expired_delegations_test.go index ee7286e..19eb347 100644 --- a/tests/expired_delegations_test.go +++ b/tests/expired_delegations_test.go @@ -5,9 +5,9 @@ import ( "testing" "time" - "github.com/babylonchain/staking-expiry-checker/internal/db/model" - "github.com/babylonchain/staking-expiry-checker/tests/mocks" - "github.com/babylonchain/staking-queue-client/client" + "github.com/babylonlabs-io/staking-expiry-checker/internal/db/model" + "github.com/babylonlabs-io/staking-expiry-checker/tests/mocks" + "github.com/babylonlabs-io/staking-queue-client/client" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" "go.mongodb.org/mongo-driver/bson/primitive" diff --git a/tests/mocks/mock_db_client.go b/tests/mocks/mock_db_client.go index b241de9..33d3bfa 100644 --- a/tests/mocks/mock_db_client.go +++ b/tests/mocks/mock_db_client.go @@ -7,7 +7,7 @@ import ( mock "github.com/stretchr/testify/mock" - model "github.com/babylonchain/staking-expiry-checker/internal/db/model" + model "github.com/babylonlabs-io/staking-expiry-checker/internal/db/model" primitive "go.mongodb.org/mongo-driver/bson/primitive" ) diff --git a/tests/setup.go b/tests/setup.go index 4ee5de1..9bde6f0 100644 --- a/tests/setup.go +++ b/tests/setup.go @@ -14,17 +14,17 @@ import ( "go.mongodb.org/mongo-driver/mongo" "go.mongodb.org/mongo-driver/mongo/options" - "github.com/babylonchain/staking-expiry-checker/internal/btcclient" - "github.com/babylonchain/staking-expiry-checker/internal/config" - "github.com/babylonchain/staking-expiry-checker/internal/db" - "github.com/babylonchain/staking-expiry-checker/internal/db/model" - "github.com/babylonchain/staking-expiry-checker/internal/observability/metrics" - "github.com/babylonchain/staking-expiry-checker/internal/poller" - "github.com/babylonchain/staking-expiry-checker/internal/queue" - "github.com/babylonchain/staking-expiry-checker/internal/services" - "github.com/babylonchain/staking-queue-client/client" - - queueconfig "github.com/babylonchain/staking-queue-client/config" + "github.com/babylonlabs-io/staking-expiry-checker/internal/btcclient" + "github.com/babylonlabs-io/staking-expiry-checker/internal/config" + "github.com/babylonlabs-io/staking-expiry-checker/internal/db" + "github.com/babylonlabs-io/staking-expiry-checker/internal/db/model" + "github.com/babylonlabs-io/staking-expiry-checker/internal/observability/metrics" + "github.com/babylonlabs-io/staking-expiry-checker/internal/poller" + "github.com/babylonlabs-io/staking-expiry-checker/internal/queue" + "github.com/babylonlabs-io/staking-expiry-checker/internal/services" + "github.com/babylonlabs-io/staking-queue-client/client" + + queueconfig "github.com/babylonlabs-io/staking-queue-client/config" ) type TestServerDependency struct {