Skip to content

Financial-Times/publish-failure-resolver-go

Repository files navigation

publish-failure-resolver-go

Circle CIGo Report Card Coverage Status

Introduction

Reimport and/or republish content and lists in UPP.

Parallelism and rate limiting configurable.

Installation

git clone https://github.com/Financial-Times/publish-failure-resolver-go.git
cd $GOPATH/src/github.com/Financial-Times/publish-failure-resolver-go
go build -mod=readonly .

Running locally

./publish-failure-resolver-go \
  --sourceEnvHost="upp-staging-publish-eu.ft.com" \
  --targetEnvHost="upp-staging-publish-eu.ft.com" \
  --sourceAuth="username:password" \
  --targetAuth="username:password" \
  --republishScope="both" \
  --transactionIdPrefix="test76" \
  --rateLimitMs=200 \
  --parallelism=4 \
  --uuidList="ab36d158-f6cd-11e7-b6fb-5914dec7ca98 2316e87a-f084-11e7-892b-b579d79a9dbc 781a1047-3401-3df1-abf9-97b4a9e557d4 74d2df3c-f207-11e7-213f-3be68cc3546d aaaaaaaa-3d10-11e5-bbd1-bbbbbbbbbbbb 74d2df3c-f207-11e7-bf59-ac7c56b7ff24"

The options rateLimit, parallelism and scope are optional, the remaining are mandatory.

Running the tests

go test -mod=readonly -race ./...

Build and deployment

Local docker build

docker build -t publish-failure-resolver-go:local .

Logging

  • The application uses logrus; the log file is initialised in main.go.

Notes

Rate limit applies only to notifier endpoints, so searching in native-store and in upp-store are not considered rate limited actions.

The respective jenkins job can be found here, or if searched for Republish Failed Content and Metadata k8s go