Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

slack-19.0: use slackhq/vitess-addons@v0.19.6 #575

Open
wants to merge 10 commits into
base: slack-19.0
Choose a base branch
from
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ require (
github.com/kr/text v0.2.0
github.com/mitchellh/mapstructure v1.5.0
github.com/nsf/jsondiff v0.0.0-20210926074059-1e845ec5d249
github.com/slackhq/vitess-addons v0.19.4
github.com/slackhq/vitess-addons v0.19.6-0.20241218193729-2cb0c6fc208a
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: cut a real tag before this is merged. This is a pinned commit

github.com/slok/noglog v0.2.0
github.com/spf13/afero v1.11.0
github.com/spf13/jwalterweatherman v1.1.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -448,8 +448,8 @@ github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6Mwd
github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
github.com/sjmudd/stopwatch v0.1.1 h1:x45OvxFB5OtCkjvYtzRF5fWB857Jzjjk84Oyd5C5ebw=
github.com/sjmudd/stopwatch v0.1.1/go.mod h1:BLw0oIQJ1YLXBO/q9ufK/SgnKBVIkC2qrm6uy78Zw6U=
github.com/slackhq/vitess-addons v0.19.4 h1:9BicIa9BK6ynqrJYCdE2fdFjN0LsfPS8DiYyYTO6vVQ=
github.com/slackhq/vitess-addons v0.19.4/go.mod h1:2icrtf8lZyzdEH1r7PoXy8g66D4LG/bIhA9rQUqR+BQ=
github.com/slackhq/vitess-addons v0.19.6-0.20241218193729-2cb0c6fc208a h1:tx9dizzufmXHceYP2IWSE8suoB6twcEe3f/+TMawUUE=
github.com/slackhq/vitess-addons v0.19.6-0.20241218193729-2cb0c6fc208a/go.mod h1:slG5BxqN541wVV5Y5tuHE3z1CwCXj9GVRmLX5wkI/zw=
github.com/slok/noglog v0.2.0 h1:1czu4l2EoJ8L92UwdSXXa1Y+c5TIjFAFm2P+mjej95E=
github.com/slok/noglog v0.2.0/go.mod h1:TfKxwpEZPT+UA83bQ6RME146k0MM4e8mwHLf6bhcGDI=
github.com/smartystreets/assertions v0.0.0-20190116191733-b6c0e53d7304/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
Expand Down
14 changes: 11 additions & 3 deletions go/vt/vtorc/logic/topology_recovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"fmt"
"math/rand"
"os"
"strings"
"time"

"github.com/patrickmn/go-cache"
Expand Down Expand Up @@ -85,8 +86,9 @@ var (
recoveriesFailureCounter = stats.NewCountersWithSingleLabel("FailedRecoveries", "Count of the different failed recoveries performed", "RecoveryType", actionableRecoveriesNames...)

// vtops
vtopsService = fmt.Sprintf("%s-%s-%s", os.Getenv("BEDROCK_CONTAINER_NAME"), os.Getenv("POOL"), os.Getenv("VITESS_ENVIRONMENT"))
vtopsExec = external.NewExecVTOps(os.Getenv("VTOPS_PATH"), vtopsService, os.Getenv("HOSTNAME"))
vtopsPath = os.Getenv("VTOPS_PATH")
vtopsService = fmt.Sprintf("vtorc-%s-%s", os.Getenv("POOL"), os.Getenv("VITESS_ENVIRONMENT"))
vtopsExec = external.NewExecVTOps(vtopsPath, vtopsService)
vtopsSlackChannel = os.Getenv("SLACK_CHANNEL")
)

Expand Down Expand Up @@ -304,7 +306,13 @@ func postErsCompletion(topologyRecovery *TopologyRecovery, analysisEntry *inst.R
_ = AuditTopologyRecovery(topologyRecovery, message)
_ = inst.AuditOperation(recoveryName, analysisEntry.AnalyzedInstanceAlias, message)
_ = AuditTopologyRecovery(topologyRecovery, fmt.Sprintf("%v: successfully promoted %+v", recoveryName, promotedReplica.InstanceAlias))
vtopsExec.RaiseProblem(analysisEntry.AnalyzedInstanceHostname, "orc-dead-tablet")

// TODO: remove this conditional and 'else' side after vtops-vtorc is used 100%.
if strings.HasSuffix(vtopsPath, "vtops-vtorc") {
vtopsExec.RaiseProblem(analysisEntry, topologyRecovery.SuccessorAlias, "orc-dead-tablet")
} else {
vtopsExec.RaiseProblem(analysisEntry, topologyRecovery.SuccessorAlias, "orc-dead-tablet")
}
}
}

Expand Down
Loading