Skip to content

Commit a72ea44

Browse files
build(craft): Update target execution order (#4171)
The order of targets Craft runs in a release matters. If a target fails, Craft exits and stops the release, not running the targets that come after the failed one. For this reason, targets that are easy to undo and don't have big consequences should come first, and those that are harder to undo and have more impact should run last; i.e. targets are sorted by ascending impact/cost of reverting ratio. Based on that guideline, this is the new order: 1. `aws-lambda-layer` a. Users using new layers have to manually choose the version, so there's no risk of someone upgrading the version without manually doing it. See https://docs.sentry.io/platforms/node/guides/aws-lambda/layer/ b. It's easy to undo: logging in with a write-permission account and deleting the latest layer. c. Users aren't notified. d. The versions the AWS Lambda layer integration show are picked from the registry. e. Low impact, easy to revert. 2. `gcs` a. Only affects CDN, and users have to manually upgrade the version. See https://docs.sentry.io/platforms/javascript/install/cdn/ b. Users aren't notified. c. Can revert it by removing the files from GCS. d. Low impact, easy to revert. 3. `github` a. It may notify users. b. Creates a release, a tag, and links them on GitHub. To undo, can manually remove everything created from the GitHub UI. c. Medium impact, easy to revert. 4. `npm` a. Affects users installing the SDKs for the first time, and to those upgrading them. b. High impact, can't revert after 72h. 5. `registry` a. Sentry notifies customers based on updates to the registry. We don't want to notify them if a release doesn't go well. b. We own it and can revert the changes with ease, but the prior point is bad enough. c. Very high impact, can revert.
1 parent 2118068 commit a72ea44

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

.craft.yml

+13-13
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,26 @@ minVersion: '0.23.1'
22
changelogPolicy: simple
33
preReleaseCommand: bash scripts/craft-pre-release.sh
44
targets:
5-
- name: npm
6-
- name: github
7-
includeNames: /^sentry-.*$/
5+
- name: aws-lambda-layer
6+
includeNames: /^sentry-node-serverless-\d+(\.\d+)*\.zip$/
7+
layerName: SentryNodeServerlessSDK
8+
compatibleRuntimes:
9+
- name: node
10+
versions:
11+
- nodejs10.x
12+
- nodejs12.x
13+
- nodejs14.x
14+
license: MIT
815
- name: gcs
916
includeNames: /.*\.js.*$/
1017
bucket: sentry-js-sdk
1118
paths:
1219
- path: /{{version}}/
1320
metadata:
1421
cacheControl: 'public, max-age=31536000'
22+
- name: github
23+
includeNames: /^sentry-.*$/
24+
- name: npm
1525
- name: registry
1626
sdks:
1727
'npm:@sentry/browser':
@@ -34,13 +44,3 @@ targets:
3444
onlyIfPresent: /^sentry-wasm-.*\.tgz$/
3545
'npm:@sentry/nextjs':
3646
onlyIfPresent: /^sentry-nextjs-.*\.tgz$/
37-
- name: aws-lambda-layer
38-
includeNames: /^sentry-node-serverless-\d+(\.\d+)*\.zip$/
39-
layerName: SentryNodeServerlessSDK
40-
compatibleRuntimes:
41-
- name: node
42-
versions:
43-
- nodejs10.x
44-
- nodejs12.x
45-
- nodejs14.x
46-
license: MIT

0 commit comments

Comments
 (0)