Skip to content

Commit

Permalink
Bugfixing in failure triggering
Browse files Browse the repository at this point in the history
Signed-off-by: Lazar Cvetković <[email protected]>
  • Loading branch information
cvetkovic committed Oct 28, 2024
1 parent ed6f482 commit 5381a8d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion .github/configs/wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -767,4 +767,8 @@ RpsImage
BusyLoopOnSandboxStartup
DirigentControlPlaneIP
InvokeProtocol
autoscaler
autoscaler
FailAt
FailComponent
FailNode
FailureEnabled
2 changes: 1 addition & 1 deletion pkg/config/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func ReadConfigurationFile(path string) LoaderConfiguration {
func ReadFailureConfiguration(path string) *FailureConfiguration {
byteValue, err := os.ReadFile(path)
if err != nil {
log.Errorf("Failure configuration not found at '%s'...", path)
log.Warnf("Failure configuration not found at '%s'...", path)
return &FailureConfiguration{}
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/driver/failure/triggers.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
const NodeSeparator = " "

func ScheduleFailure(platform string, config *config.FailureConfiguration) {
if config.FailAt != 0 && config.FailComponent != "" {
if config != nil && config.FailAt != 0 && config.FailComponent != "" {
switch platform {
case "Knative", "Knative-RPS":
triggerKnativeFailure(config.FailNode, config.FailComponent, config.FailAt)
Expand Down

0 comments on commit 5381a8d

Please sign in to comment.