From 13c67947609207b8d321031f775261d96b683dff Mon Sep 17 00:00:00 2001 From: Urvi <urvi.savla@stellar.org> Date: Wed, 12 Jun 2024 12:52:09 -0700 Subject: [PATCH] services/ledgerexporter: Move ledgerexporter out of experimental --- .github/workflows/horizon.yml | 6 +++--- Makefile | 2 +- {exp/services => services}/ledgerexporter/Makefile | 6 +++--- {exp/services => services}/ledgerexporter/README.md | 0 {exp/services => services}/ledgerexporter/config.toml | 0 {exp/services => services}/ledgerexporter/docker/Dockerfile | 4 ++-- {exp/services => services}/ledgerexporter/docker/start | 0 {exp/services => services}/ledgerexporter/internal/app.go | 0 .../ledgerexporter/internal/app_test.go | 0 .../services => services}/ledgerexporter/internal/config.go | 0 .../ledgerexporter/internal/config_test.go | 0 .../ledgerexporter/internal/exportmanager.go | 0 .../ledgerexporter/internal/exportmanager_test.go | 0 .../ledgerexporter/internal/ledger_meta_archive.go | 0 .../ledgerexporter/internal/ledger_meta_archive_test.go | 0 {exp/services => services}/ledgerexporter/internal/queue.go | 0 .../ledgerexporter/internal/queue_test.go | 0 .../ledgerexporter/internal/test/10perfile.toml | 0 .../ledgerexporter/internal/test/15perfile.toml | 0 .../ledgerexporter/internal/test/1perfile.toml | 0 .../ledgerexporter/internal/test/64perfile.toml | 0 .../ledgerexporter/internal/test/no_network.toml | 0 .../ledgerexporter/internal/test/test.toml | 0 .../ledgerexporter/internal/test/validate_start_end.toml | 0 .../ledgerexporter/internal/uploader.go | 0 .../ledgerexporter/internal/uploader_test.go | 0 {exp/services => services}/ledgerexporter/main.go | 2 +- 27 files changed, 10 insertions(+), 10 deletions(-) rename {exp/services => services}/ledgerexporter/Makefile (88%) rename {exp/services => services}/ledgerexporter/README.md (100%) rename {exp/services => services}/ledgerexporter/config.toml (100%) rename {exp/services => services}/ledgerexporter/docker/Dockerfile (89%) rename {exp/services => services}/ledgerexporter/docker/start (100%) rename {exp/services => services}/ledgerexporter/internal/app.go (100%) rename {exp/services => services}/ledgerexporter/internal/app_test.go (100%) rename {exp/services => services}/ledgerexporter/internal/config.go (100%) rename {exp/services => services}/ledgerexporter/internal/config_test.go (100%) rename {exp/services => services}/ledgerexporter/internal/exportmanager.go (100%) rename {exp/services => services}/ledgerexporter/internal/exportmanager_test.go (100%) rename {exp/services => services}/ledgerexporter/internal/ledger_meta_archive.go (100%) rename {exp/services => services}/ledgerexporter/internal/ledger_meta_archive_test.go (100%) rename {exp/services => services}/ledgerexporter/internal/queue.go (100%) rename {exp/services => services}/ledgerexporter/internal/queue_test.go (100%) rename {exp/services => services}/ledgerexporter/internal/test/10perfile.toml (100%) rename {exp/services => services}/ledgerexporter/internal/test/15perfile.toml (100%) rename {exp/services => services}/ledgerexporter/internal/test/1perfile.toml (100%) rename {exp/services => services}/ledgerexporter/internal/test/64perfile.toml (100%) rename {exp/services => services}/ledgerexporter/internal/test/no_network.toml (100%) rename {exp/services => services}/ledgerexporter/internal/test/test.toml (100%) rename {exp/services => services}/ledgerexporter/internal/test/validate_start_end.toml (100%) rename {exp/services => services}/ledgerexporter/internal/uploader.go (100%) rename {exp/services => services}/ledgerexporter/internal/uploader_test.go (100%) rename {exp/services => services}/ledgerexporter/main.go (90%) diff --git a/.github/workflows/horizon.yml b/.github/workflows/horizon.yml index fe7b2df7a8..89d10ac3bc 100644 --- a/.github/workflows/horizon.yml +++ b/.github/workflows/horizon.yml @@ -163,10 +163,10 @@ jobs: # For pull requests, build and test the PR head not a merge of the PR with the destination. ref: ${{ github.event.pull_request.head.sha || github.ref }} - name: Build Ledger Exporter docker - run: make -C exp/services/ledgerexporter docker-build + run: make -C services/ledgerexporter docker-build - name: Run Ledger Exporter test - run: make -C exp/services/ledgerexporter docker-test + run: make -C services/ledgerexporter docker-test # Push images - if: github.ref == 'refs/heads/master' @@ -178,4 +178,4 @@ jobs: - if: github.ref == 'refs/heads/master' name: Push to DockerHub - run: make -C exp/services/ledgerexporter docker-push + run: make -C services/ledgerexporter docker-push diff --git a/Makefile b/Makefile index 07037315e4..876512224b 100644 --- a/Makefile +++ b/Makefile @@ -36,7 +36,7 @@ horizon: $(MAKE) -C services/horizon/ binary-build ledger-exporter: - $(MAKE) -C exp/services/ledgerexporter/ docker-build + $(MAKE) -C services/ledgerexporter/ docker-build webauth: $(MAKE) -C exp/services/webauth/ docker-build diff --git a/exp/services/ledgerexporter/Makefile b/services/ledgerexporter/Makefile similarity index 88% rename from exp/services/ledgerexporter/Makefile rename to services/ledgerexporter/Makefile index 10bf16e9dd..6d8901e5e5 100644 --- a/exp/services/ledgerexporter/Makefile +++ b/services/ledgerexporter/Makefile @@ -6,11 +6,11 @@ VERSION ?= 1.0.0-$(shell git rev-parse --short HEAD) DOCKER_IMAGE := stellar/ledger-exporter docker-build: - cd ../../../ && \ + cd ../../ && \ $(SUDO) docker build --platform linux/amd64 --pull --label org.opencontainers.image.created="$(BUILD_DATE)" \ - --build-arg GOFLAGS="-ldflags=-X=github.com/stellar/go/exp/services/ledgerexporter/internal.version=$(VERSION)" \ + --build-arg GOFLAGS="-ldflags=-X=github.com/stellar/go/services/ledgerexporter/internal.version=$(VERSION)" \ $(if $(STELLAR_CORE_VERSION), --build-arg STELLAR_CORE_VERSION=$(STELLAR_CORE_VERSION)) \ - -f exp/services/ledgerexporter/docker/Dockerfile \ + -f services/ledgerexporter/docker/Dockerfile \ -t $(DOCKER_IMAGE):$(VERSION) \ -t $(DOCKER_IMAGE):latest . diff --git a/exp/services/ledgerexporter/README.md b/services/ledgerexporter/README.md similarity index 100% rename from exp/services/ledgerexporter/README.md rename to services/ledgerexporter/README.md diff --git a/exp/services/ledgerexporter/config.toml b/services/ledgerexporter/config.toml similarity index 100% rename from exp/services/ledgerexporter/config.toml rename to services/ledgerexporter/config.toml diff --git a/exp/services/ledgerexporter/docker/Dockerfile b/services/ledgerexporter/docker/Dockerfile similarity index 89% rename from exp/services/ledgerexporter/docker/Dockerfile rename to services/ledgerexporter/docker/Dockerfile index 59e57030f3..fb16525048 100644 --- a/exp/services/ledgerexporter/docker/Dockerfile +++ b/services/ledgerexporter/docker/Dockerfile @@ -10,7 +10,7 @@ RUN go mod download COPY . ./ ARG GOFLAGS -RUN go install github.com/stellar/go/exp/services/ledgerexporter +RUN go install github.com/stellar/go/services/ledgerexporter FROM ubuntu:22.04 ARG STELLAR_CORE_VERSION @@ -26,7 +26,7 @@ RUN echo "deb https://apt.stellar.org focal unstable" >/etc/apt/sources.list.d/S RUN apt-get update && apt-get install -y stellar-core=${STELLAR_CORE_VERSION} RUN apt-get clean -COPY exp/services/ledgerexporter/docker/start / +COPY services/ledgerexporter/docker/start / RUN ["chmod", "+x", "/start"] diff --git a/exp/services/ledgerexporter/docker/start b/services/ledgerexporter/docker/start similarity index 100% rename from exp/services/ledgerexporter/docker/start rename to services/ledgerexporter/docker/start diff --git a/exp/services/ledgerexporter/internal/app.go b/services/ledgerexporter/internal/app.go similarity index 100% rename from exp/services/ledgerexporter/internal/app.go rename to services/ledgerexporter/internal/app.go diff --git a/exp/services/ledgerexporter/internal/app_test.go b/services/ledgerexporter/internal/app_test.go similarity index 100% rename from exp/services/ledgerexporter/internal/app_test.go rename to services/ledgerexporter/internal/app_test.go diff --git a/exp/services/ledgerexporter/internal/config.go b/services/ledgerexporter/internal/config.go similarity index 100% rename from exp/services/ledgerexporter/internal/config.go rename to services/ledgerexporter/internal/config.go diff --git a/exp/services/ledgerexporter/internal/config_test.go b/services/ledgerexporter/internal/config_test.go similarity index 100% rename from exp/services/ledgerexporter/internal/config_test.go rename to services/ledgerexporter/internal/config_test.go diff --git a/exp/services/ledgerexporter/internal/exportmanager.go b/services/ledgerexporter/internal/exportmanager.go similarity index 100% rename from exp/services/ledgerexporter/internal/exportmanager.go rename to services/ledgerexporter/internal/exportmanager.go diff --git a/exp/services/ledgerexporter/internal/exportmanager_test.go b/services/ledgerexporter/internal/exportmanager_test.go similarity index 100% rename from exp/services/ledgerexporter/internal/exportmanager_test.go rename to services/ledgerexporter/internal/exportmanager_test.go diff --git a/exp/services/ledgerexporter/internal/ledger_meta_archive.go b/services/ledgerexporter/internal/ledger_meta_archive.go similarity index 100% rename from exp/services/ledgerexporter/internal/ledger_meta_archive.go rename to services/ledgerexporter/internal/ledger_meta_archive.go diff --git a/exp/services/ledgerexporter/internal/ledger_meta_archive_test.go b/services/ledgerexporter/internal/ledger_meta_archive_test.go similarity index 100% rename from exp/services/ledgerexporter/internal/ledger_meta_archive_test.go rename to services/ledgerexporter/internal/ledger_meta_archive_test.go diff --git a/exp/services/ledgerexporter/internal/queue.go b/services/ledgerexporter/internal/queue.go similarity index 100% rename from exp/services/ledgerexporter/internal/queue.go rename to services/ledgerexporter/internal/queue.go diff --git a/exp/services/ledgerexporter/internal/queue_test.go b/services/ledgerexporter/internal/queue_test.go similarity index 100% rename from exp/services/ledgerexporter/internal/queue_test.go rename to services/ledgerexporter/internal/queue_test.go diff --git a/exp/services/ledgerexporter/internal/test/10perfile.toml b/services/ledgerexporter/internal/test/10perfile.toml similarity index 100% rename from exp/services/ledgerexporter/internal/test/10perfile.toml rename to services/ledgerexporter/internal/test/10perfile.toml diff --git a/exp/services/ledgerexporter/internal/test/15perfile.toml b/services/ledgerexporter/internal/test/15perfile.toml similarity index 100% rename from exp/services/ledgerexporter/internal/test/15perfile.toml rename to services/ledgerexporter/internal/test/15perfile.toml diff --git a/exp/services/ledgerexporter/internal/test/1perfile.toml b/services/ledgerexporter/internal/test/1perfile.toml similarity index 100% rename from exp/services/ledgerexporter/internal/test/1perfile.toml rename to services/ledgerexporter/internal/test/1perfile.toml diff --git a/exp/services/ledgerexporter/internal/test/64perfile.toml b/services/ledgerexporter/internal/test/64perfile.toml similarity index 100% rename from exp/services/ledgerexporter/internal/test/64perfile.toml rename to services/ledgerexporter/internal/test/64perfile.toml diff --git a/exp/services/ledgerexporter/internal/test/no_network.toml b/services/ledgerexporter/internal/test/no_network.toml similarity index 100% rename from exp/services/ledgerexporter/internal/test/no_network.toml rename to services/ledgerexporter/internal/test/no_network.toml diff --git a/exp/services/ledgerexporter/internal/test/test.toml b/services/ledgerexporter/internal/test/test.toml similarity index 100% rename from exp/services/ledgerexporter/internal/test/test.toml rename to services/ledgerexporter/internal/test/test.toml diff --git a/exp/services/ledgerexporter/internal/test/validate_start_end.toml b/services/ledgerexporter/internal/test/validate_start_end.toml similarity index 100% rename from exp/services/ledgerexporter/internal/test/validate_start_end.toml rename to services/ledgerexporter/internal/test/validate_start_end.toml diff --git a/exp/services/ledgerexporter/internal/uploader.go b/services/ledgerexporter/internal/uploader.go similarity index 100% rename from exp/services/ledgerexporter/internal/uploader.go rename to services/ledgerexporter/internal/uploader.go diff --git a/exp/services/ledgerexporter/internal/uploader_test.go b/services/ledgerexporter/internal/uploader_test.go similarity index 100% rename from exp/services/ledgerexporter/internal/uploader_test.go rename to services/ledgerexporter/internal/uploader_test.go diff --git a/exp/services/ledgerexporter/main.go b/services/ledgerexporter/main.go similarity index 90% rename from exp/services/ledgerexporter/main.go rename to services/ledgerexporter/main.go index 63e094980f..85fbc0a8a4 100644 --- a/exp/services/ledgerexporter/main.go +++ b/services/ledgerexporter/main.go @@ -3,7 +3,7 @@ package main import ( "flag" - exporter "github.com/stellar/go/exp/services/ledgerexporter/internal" + exporter "github.com/stellar/go/services/ledgerexporter/internal" ) func main() {