From 0127147658ab49567d3fd9c940aabd11e4a74d79 Mon Sep 17 00:00:00 2001 From: Jonathan Sick Date: Mon, 27 Jan 2025 17:20:39 -0500 Subject: [PATCH 1/2] Deploy unfurlbot 0.5.0 This version improves logging to trace why messages are unfurled. See https://github.com/lsst-sqre/unfurlbot/releases/tag/0.5.0 --- applications/unfurlbot/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/applications/unfurlbot/Chart.yaml b/applications/unfurlbot/Chart.yaml index b195c77878..05043dfa35 100644 --- a/applications/unfurlbot/Chart.yaml +++ b/applications/unfurlbot/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v2 -appVersion: "0.4.0" +appVersion: "0.5.0" description: Squarebot backend that unfurls Jira issues. name: unfurlbot sources: From 536a57c7fe770c6208772a838b31d9e9d77bde45 Mon Sep 17 00:00:00 2001 From: Jonathan Sick Date: Tue, 28 Jan 2025 17:28:45 -0500 Subject: [PATCH 2/2] Add values for slack debouncing and trigger TTL The slackTriggerMessageTtl is a new feature for Unfurlbot 0.5.0, and slackDebounceTime is a previously hidden configuration. --- applications/unfurlbot/README.md | 2 ++ applications/unfurlbot/templates/configmap.yaml | 2 ++ applications/unfurlbot/values.yaml | 6 ++++++ 3 files changed, 10 insertions(+) diff --git a/applications/unfurlbot/README.md b/applications/unfurlbot/README.md index 6df0f60818..c411fdbc85 100644 --- a/applications/unfurlbot/README.md +++ b/applications/unfurlbot/README.md @@ -16,6 +16,8 @@ Squarebot backend that unfurls Jira issues. | config.jiraUrl | string | `"https://rubinobs.atlassian.net/"` | Jira base URL | | config.logLevel | string | `"INFO"` | Logging level: "DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL" | | config.redisUrl | string | `"redis://unfurlbot-redis:6379/0"` | URL to the local redis instance | +| config.slackDebounceTime | string | `"600"` | Time (second) before an unfurl can be made to the same channel/thread for a given token | +| config.slackTriggerMessageTtl | string | `"60"` | Time (seconds) after which a triggering Slack message is considered stale and ignored. | | config.topics.slackAppMention | string | `"lsst.square-events.squarebot.slack.app.mention"` | Kafka topic name for the Slack `app_mention` events | | config.topics.slackMessageChannels | string | `"lsst.square-events.squarebot.slack.message.channels"` | Kafka topic name for the Slack `message.channels` events (public channels) | | config.topics.slackMessageGroups | string | `"lsst.square-events.squarebot.slack.message.groups"` | Kafka topic name for the Slack `message.groups` events (private channels) | diff --git a/applications/unfurlbot/templates/configmap.yaml b/applications/unfurlbot/templates/configmap.yaml index 7571f648c4..c2bb706586 100644 --- a/applications/unfurlbot/templates/configmap.yaml +++ b/applications/unfurlbot/templates/configmap.yaml @@ -17,3 +17,5 @@ data: UNFURLBOT_REDIS_URL: {{ .Values.config.redisUrl | quote }} UNFURLBOT_JIRA_ROOT_URL: {{ .Values.config.jiraUrl | quote }} UNFURLBOT_JIRA_TIMEOUT: {{ .Values.config.jiraTimeout | quote }} + UNFURLBOT_SLACK_TRIGGER_MESSAGE_TTL: {{ .Values.config.slackTriggerMessageTtl | quote }} + UNFURLBOT_SLACK_DEBOUNCE_TIME: {{ .Values.config.slackDebounceTime | quote }} diff --git a/applications/unfurlbot/values.yaml b/applications/unfurlbot/values.yaml index ab444093dd..da7e8f21e3 100644 --- a/applications/unfurlbot/values.yaml +++ b/applications/unfurlbot/values.yaml @@ -43,6 +43,12 @@ config: # direct messages) slackMessageMpim: "lsst.square-events.squarebot.slack.message.mpim" + # -- Time (seconds) after which a triggering Slack message is considered stale and ignored. + slackTriggerMessageTtl: "60" + + # -- Time (second) before an unfurl can be made to the same channel/thread for a given token + slackDebounceTime: "600" + # -- Jira base URL jiraUrl: "https://rubinobs.atlassian.net/"