@certik/skynet 0.8.13 → 0.8.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.8.14
4
+
5
+ - Switched monitor to send to opsgenie only
6
+
3
7
  ## 0.8.13
4
8
 
5
9
  - Added `inline.error` function to `log` library
package/monitor.js CHANGED
@@ -178,65 +178,7 @@ ${
178
178
  if (result.length > 0) {
179
179
  console.log("Found Errors", result);
180
180
 
181
- if (slackChannel && production) {
182
- // TODO: deduplicate
183
- await postMessage(
184
- slackChannel,
185
- {
186
- text: `${jobName} Monitor Errors: ${result.map((m) => m.message || m).join("\n")}`,
187
- blocks: [
188
- {
189
- type: "header",
190
- text: {
191
- type: "plain_text",
192
- text: `${jobName} Monitor Errors`,
193
- emoji: true,
194
- },
195
- },
196
- {
197
- type: "divider",
198
- },
199
- ...sortErrors(result)
200
- .map((m) => {
201
- return [
202
- {
203
- type: "context",
204
- elements: [
205
- {
206
- type: "plain_text",
207
- text: `${LEVEL_EMOJI[m.type || ERROR_LEVEL.CRITICAL]} ${m.type || ERROR_LEVEL.CRITICAL}`,
208
- },
209
- ],
210
- },
211
- {
212
- type: "section",
213
- text: {
214
- type: "mrkdwn",
215
- text: m.message || m,
216
- },
217
- },
218
- ];
219
- })
220
- .flat(),
221
- {
222
- type: "actions",
223
- elements: [
224
- {
225
- type: "button",
226
- text: {
227
- type: "plain_text",
228
- text: "View Details",
229
- },
230
- value: "view_details",
231
- url: `${await getNomadAddr(production)}/ui/jobs/${jobName}`,
232
- },
233
- ],
234
- },
235
- ],
236
- },
237
- verbose
238
- );
239
-
181
+ if (production) {
240
182
  // Also alert on opsgenie (func prevents duplicate alerts)
241
183
  await postGenieMessage(
242
184
  `${jobName} Monitor Errors: ${result.map((m) => m.message || m).join("\n")}`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@certik/skynet",
3
- "version": "0.8.13",
3
+ "version": "0.8.14",
4
4
  "description": "Skynet Shared JS library",
5
5
  "main": "index.js",
6
6
  "author": "CertiK Engineering",