Skip to content

Commit

Permalink
Merge pull request #311 from brianburnszd/stop-sending-locked
Browse files Browse the repository at this point in the history
Remove locked attribute
  • Loading branch information
grosser authored Mar 29, 2024
2 parents 6e6da95 + cf41e53 commit 867b386
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
8 changes: 7 additions & 1 deletion lib/kennel/models/monitor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def build_json
include_tags: true,
escalation_message: Utils.presence(escalation_message.strip),
evaluation_delay: evaluation_delay,
locked: false, # setting this to true prevents any edit and breaks updates when using replace workflow
locked: false, # deprecated: setting this to true will likely fail
renotify_interval: renotify_interval || 0,
variables: variables
}
Expand Down Expand Up @@ -153,6 +153,9 @@ def build_json
options[:notification_preset_name] = notification_preset_name
end

# locked is deprecated, will fail if used
options.delete :locked

data
end

Expand Down Expand Up @@ -231,6 +234,9 @@ def self.normalize(expected, actual)
options.delete(:escalation_message)
expected_options.delete(:escalation_message)
end
# locked is deprecated: ignored when diffing
options.delete(:locked)
expected_options.delete(:locked)
end

private
Expand Down
1 change: 0 additions & 1 deletion test/kennel/models/monitor_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ def monitor(options = {})
include_tags: true,
escalation_message: nil,
evaluation_delay: nil,
locked: false,
renotify_interval: 0,
thresholds: { critical: 123.0 },
variables: nil
Expand Down

0 comments on commit 867b386

Please sign in to comment.