From 75d10622e70fa088693ad5abc6b74fb875eedab0 Mon Sep 17 00:00:00 2001 From: Kosuke Morimoto Date: Mon, 23 Dec 2024 17:45:02 +0900 Subject: [PATCH] To disable index check in Read Replica --- .../e2e-deploy-vald-readreplica/action.yaml | 1 + .github/workflows/_detect-ci-container.yaml | 2 +- .github/workflows/e2e.yaml | 4 ++-- Makefile.d/kind.mk | 14 +++++--------- pkg/agent/core/ngt/service/ngt.go | 3 +++ 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/actions/e2e-deploy-vald-readreplica/action.yaml b/.github/actions/e2e-deploy-vald-readreplica/action.yaml index eb8f4b1c79..31f7837198 100644 --- a/.github/actions/e2e-deploy-vald-readreplica/action.yaml +++ b/.github/actions/e2e-deploy-vald-readreplica/action.yaml @@ -85,6 +85,7 @@ runs: run: | make k8s/vald-readreplica/deploy HELM_VALUES=${VALUES} HELM_EXTRA_OPTIONS="${HELM_EXTRA_OPTIONS}" + stern vald-discoverer & stern vald-lb-gateway & stern vald-agent-readreplica & sleep 3 diff --git a/.github/workflows/_detect-ci-container.yaml b/.github/workflows/_detect-ci-container.yaml index 59befea939..fd40bc8713 100644 --- a/.github/workflows/_detect-ci-container.yaml +++ b/.github/workflows/_detect-ci-container.yaml @@ -41,7 +41,7 @@ jobs: - name: Get Docker image tag from detection result id: get_tag_name run: | - TAG=$(echo "$TAGS" | awk '{print $1}' | awk -F '=' '{print $2}') + TAG=$(echo "$TAGS" | awk '{print $1}' | awk -F '=' '{print $2}' | sed -e 's/"//g') echo "TAG=${TAG}" echo "TAG=${TAG}" >> $GITHUB_OUTPUT env: diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 9edada1419..61ce1543e7 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -335,12 +335,12 @@ jobs: E2E_UPDATE_COUNT=100 \ E2E_UPSERT_COUNT=100 \ E2E_REMOVE_COUNT=100 \ - E2E_WAIT_FOR_CREATE_INDEX_DURATION=3m \ + E2E_WAIT_FOR_CREATE_INDEX_DURATION=10m \ E2E_TARGET_POD_NAME=${POD_NAME} \ E2E_TARGET_NAMESPACE=default \ e2e/readreplica env: - POD_NAME: ${{ steps.deploy_vald.outputs.POD_NAME }} + POD_NAME: ${{ steps.deploy_vald_readreplica.outputs.POD_NAME }} e2e-stream-crud-with-mirror: name: "E2E test (Stream CRUD) with mirror" needs: [detect-ci-container] diff --git a/Makefile.d/kind.mk b/Makefile.d/kind.mk index 32fac1657f..10885113e8 100644 --- a/Makefile.d/kind.mk +++ b/Makefile.d/kind.mk @@ -20,7 +20,7 @@ SNAPSHOTTER_VERSION=v8.2.0 ## install KinD kind/install: $(BINDIR)/kind -$(BINDIR)/kind: +$(BINDIR)/kind: $(BINDIR)/docker mkdir -p $(BINDIR) $(eval DARCH := $(subst aarch64,arm64,$(ARCH))) curl -fsSL https://github.com/kubernetes-sigs/kind/releases/download/v$(KIND_VERSION)/kind-$(OS)-$(subst x86_64,amd64,$(shell echo $(DARCH) | tr '[:upper:]' '[:lower:]')) -o $(BINDIR)/kind @@ -28,8 +28,7 @@ $(BINDIR)/kind: .PHONY: kind/start ## start kind (kubernetes in docker) cluster -kind/start: \ - $(BINDIR)/docker +kind/start: kind create cluster --name $(NAME) @make kind/login @@ -40,8 +39,7 @@ kind/login: .PHONY: kind/stop ## stop kind (kubernetes in docker) cluster -kind/stop: \ - $(BINDIR)/docker +kind/stop: kind delete cluster --name $(NAME) .PHONY: kind/restart @@ -76,8 +74,7 @@ kind/cluster/restart: \ .PHONY: kind/vs/start ## start kind (kubernetes in docker) cluster with volume snapshot -kind/vs/start: \ - $(BINDIR)/docker +kind/vs/start: sed -e 's/apiServerAddress: "127.0.0.1"/apiServerAddress: "$(shell grep host.docker.internal /etc/hosts | cut -f1)"/' $(ROOTDIR)/k8s/debug/kind/e2e.yaml | kind create cluster --name $(NAME)-vs --config - @make kind/vs/login @@ -101,8 +98,7 @@ kind/vs/start: \ .PHONY: kind/vs/stop ## stop kind (kubernetes in docker) cluster with volume snapshot -kind/vs/stop: \ - $(BINDIR)/docker +kind/vs/stop: kind delete cluster --name $(NAME)-vs .PHONY: kind/vs/login diff --git a/pkg/agent/core/ngt/service/ngt.go b/pkg/agent/core/ngt/service/ngt.go index ad89d91363..eadd0d64e3 100644 --- a/pkg/agent/core/ngt/service/ngt.go +++ b/pkg/agent/core/ngt/service/ngt.go @@ -887,6 +887,9 @@ func (n *ngt) Start(ctx context.Context) <-chan error { if n.dcd { return nil } + if n.isReadReplica { + return nil + } n.removeInvalidIndex(ctx) ech := make(chan error, 2) n.eg.Go(safety.RecoverFunc(func() (err error) {