diff --git a/CHANGELOG.md b/CHANGELOG.md index ad1b556..e28ad13 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +## [v0.12.2] - 2023-10-24 +### Changed +- [#34] Reduce the wait time on failures while watching the etcd from 5 minutes to 10 seconds. + ## [v0.12.1] - 2023-08-23 ### Changed - [#32] Change the log to error, if a dogu `GET` returns a `401` and the cache handles the request error. diff --git a/Jenkinsfile b/Jenkinsfile index a3de576..dab3c2b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -173,7 +173,7 @@ void potentiallyCreateDoguDocPR() { stage('Compare dogu docs') { // ignore stderr output here, diffing non-existing files always leads to a line count of zero def diffResult = sh(returnStdout: true, script: "diff ${newCoreDoguChapter} ${oldCoreDoguChapter} | wc -l").toString().trim() - if (diffResult > 0) { + if ((diffResult as Integer) > 0) { shouldCreateDoguDocsPR = true } } diff --git a/Makefile b/Makefile index bf56914..d3c44e4 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ # Set these to the desired values ARTIFACT_ID=cesapp-lib -VERSION=0.12.1 +VERSION=0.12.2 GOTAG?=1.18.6 MAKEFILES_VERSION=7.4.0 diff --git a/registry/resilentetcdclient.go b/registry/resilentetcdclient.go index 74191db..7f372a4 100644 --- a/registry/resilentetcdclient.go +++ b/registry/resilentetcdclient.go @@ -282,11 +282,11 @@ func (etcd *resilentEtcdClient) doWatch(ctx context.Context, watcher client.Watc resp, err := watcher.Next(ctx) if err != nil { if strings.Contains(err.Error(), "etcd cluster is unavailable or misconfigured") { - core.GetLogger().Infof("Cannot reach etcd cluster. Try again in 300 seconds. Error: %v", err) + core.GetLogger().Infof("Cannot reach etcd cluster. Try again in 10 seconds. Error: %v", err) etcd.indexMutex.Lock() defer etcd.indexMutex.Unlock() etcd.recentIndex = 0 - time.Sleep(time.Minute * 5) + time.Sleep(time.Second * 10) return } else { core.GetLogger().Infof("Could not get event. Try again in 30 seconds. Error: %v", err)