From 1ffb68162aaed3f617c0e1171f97624bb286d5d5 Mon Sep 17 00:00:00 2001 From: Benjamin Goering <171782+gobengo@users.noreply.github.com> Date: Mon, 10 Apr 2023 16:18:48 -0700 Subject: [PATCH 01/25] change access-api wrangler.toml to be no_bundle=false. use wrangler built-in bundling --- packages/access-api/src/config.js | 13 +++++-------- packages/access-api/wrangler.toml | 8 +++----- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/packages/access-api/src/config.js b/packages/access-api/src/config.js index a623f712d..1b133191b 100644 --- a/packages/access-api/src/config.js +++ b/packages/access-api/src/config.js @@ -19,9 +19,6 @@ export function loadConfig(env) { 'ENV', 'DEBUG', 'PRIVATE_KEY', - 'SENTRY_DSN', - 'POSTMARK_TOKEN', - 'LOGTAIL_TOKEN', ] for (const name of required) { @@ -47,21 +44,21 @@ export function loadConfig(env) { POSTMARK_TOKEN: vars.POSTMARK_TOKEN, POSTMARK_SENDER: env.POSTMARK_SENDER, - SENTRY_DSN: vars.SENTRY_DSN, - LOGTAIL_TOKEN: vars.LOGTAIL_TOKEN, + SENTRY_DSN: env.SENTRY_DSN, + LOGTAIL_TOKEN: env.LOGTAIL_TOKEN, UCAN_LOG_BASIC_AUTH: env.UCAN_LOG_BASIC_AUTH, UCAN_LOG_URL: env.UCAN_LOG_URL, // These are injected in esbuild // @ts-ignore // eslint-disable-next-line no-undef - BRANCH: ACCOUNT_BRANCH, + BRANCH: env.ACCOUNT_BRANCH ?? '', // @ts-ignore // eslint-disable-next-line no-undef - VERSION: ACCOUNT_VERSION, + VERSION: env.ACCOUNT_VERSION ?? '', // @ts-ignore // eslint-disable-next-line no-undef - COMMITHASH: ACCOUNT_COMMITHASH, + COMMITHASH: env.ACCOUNT_COMMITHASH ?? '', PRIVATE_KEY: vars.PRIVATE_KEY, DID: /** @type {UCAN.DID<"web">} */ (DID.parse(vars.DID).did()), diff --git a/packages/access-api/wrangler.toml b/packages/access-api/wrangler.toml index 1187a67f8..8f2f1fa93 100644 --- a/packages/access-api/wrangler.toml +++ b/packages/access-api/wrangler.toml @@ -1,15 +1,12 @@ # Development name = "w3access-local" account_id = "fffa4b4363a7e5250af8357087263b3a" -main = "./dist/worker.js" +main = "./src/index.js" # Compatibility flags https://github.com/cloudflare/wrangler/pull/2009 compatibility_date = "2022-09-28" compatibility_flags = ["url_standard"] -# We need to let wrangler bundle while D1 is in Beta -no_bundle = false - [[kv_namespaces]] binding = "SPACES" id = "e9fad7e04b254bf49206e08e50074387" @@ -28,15 +25,16 @@ database_id = "7c676e0c-b9e7-4711-97c8-7b1c8eb229ae" [[r2_buckets]] binding = "DELEGATIONS_BUCKET" bucket_name = "w3up-delegations-dev-0" +preview_bucket_name = "w3up-delegations-dev-0" [vars] ENV = "dev" DEBUG = "true" DID = "did:web:local.web3.storage" +PRIVATE_KEY="MgCYWjE6vp0cn3amPan2xPO+f6EZ3I+KwuN1w2vx57vpJ9O0Bn4ci4jn8itwc121ujm7lDHkCW24LuKfZwIdmsifVysY=" UPLOAD_API_URL = "https://up.web3.storage" [build] -command = "scripts/cli.js build" watch_dir = "src" [miniflare] From 7cf6278062370fae1b13b4eb01d6567fd9155642 Mon Sep 17 00:00:00 2001 From: Benjamin Goering <171782+gobengo@users.noreply.github.com> Date: Mon, 10 Apr 2023 18:31:59 -0700 Subject: [PATCH 02/25] prettier --- packages/access-api/src/config.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/packages/access-api/src/config.js b/packages/access-api/src/config.js index 1b133191b..f4ba05166 100644 --- a/packages/access-api/src/config.js +++ b/packages/access-api/src/config.js @@ -14,12 +14,7 @@ export function loadConfig(env) { const vars = {} /** @type {Array} */ - const required = [ - 'DID', - 'ENV', - 'DEBUG', - 'PRIVATE_KEY', - ] + const required = ['DID', 'ENV', 'DEBUG', 'PRIVATE_KEY'] for (const name of required) { const val = env[name] From 4ec1075240a694a41ed8003cf64a0ed67421d673 Mon Sep 17 00:00:00 2001 From: Benjamin Goering <171782+gobengo@users.noreply.github.com> Date: Thu, 13 Apr 2023 09:33:27 -0700 Subject: [PATCH 03/25] rm build step from access-api envs dev,staging,production (use built-in bundling) --- packages/access-api/wrangler.toml | 3 --- 1 file changed, 3 deletions(-) diff --git a/packages/access-api/wrangler.toml b/packages/access-api/wrangler.toml index 8f2f1fa93..91090650e 100644 --- a/packages/access-api/wrangler.toml +++ b/packages/access-api/wrangler.toml @@ -45,7 +45,6 @@ d1_persist = ".wrangler/miniflare" name = "w3access-dev" workers_dev = true vars = { ENV = "dev", DEBUG = "false", DID = "did:web:dev.web3.storage", UPLOAD_API_URL = "https://staging.up.web3.storage" } -build = { command = "scripts/cli.js build --env dev", watch_dir = "src" } kv_namespaces = [ { binding = "SPACES", id = "5697e95e1aaa436788e6d697fd3350be" }, { binding = "VALIDATIONS", id = "ea17f472b37a43d29c1faf7af9512e03" }, @@ -62,7 +61,6 @@ unsafe = { bindings = [ [env.staging] name = "w3access-staging" workers_dev = true -build = { command = "scripts/cli.js build --env staging", watch_dir = "src" } kv_namespaces = [ { binding = "SPACES", id = "b0e5ca990dda4e3784a1741dfa28a52e" }, { binding = "VALIDATIONS", id = "b13f07c88fe848db9ccf651a0fea3fb6" }, @@ -88,7 +86,6 @@ bucket_name = "w3up-delegations-staging-0" [env.production] name = "w3access" routes = [{ pattern = "access.web3.storage", custom_domain = true }] -build = { command = "scripts/cli.js build --env production", watch_dir = "src" } kv_namespaces = [ { binding = "SPACES", id = "5437954e8cfd4f7d98557132b0a2e93f" }, { binding = "VALIDATIONS", id = "fb7cf10c725f45948321e88b8cb168ad" }, From 53ff41fb46d92cb09b66aaa02622e503654e2940 Mon Sep 17 00:00:00 2001 From: Benjamin Goering <171782+gobengo@users.noreply.github.com> Date: Thu, 13 Apr 2023 09:41:46 -0700 Subject: [PATCH 04/25] create new dev d1 db database_id for name access-dev (cloudflare deploy requries it) --- packages/access-api/wrangler.toml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/access-api/wrangler.toml b/packages/access-api/wrangler.toml index 91090650e..accc5ef2d 100644 --- a/packages/access-api/wrangler.toml +++ b/packages/access-api/wrangler.toml @@ -49,13 +49,13 @@ kv_namespaces = [ { binding = "SPACES", id = "5697e95e1aaa436788e6d697fd3350be" }, { binding = "VALIDATIONS", id = "ea17f472b37a43d29c1faf7af9512e03" }, ] -d1_databases = [ - { binding = "__D1_BETA__", database_name = "access-dev", database_id = "4145a261-e54c-411d-a001-050fc30e4678" }, -] unsafe = { bindings = [ { type = "analytics_engine", dataset = "W3ACCESS_METRICS", name = "W3ACCESS_METRICS" }, ] } - +[[env.dev.d1_databases]] +binding = "__D1_BETA__" +database_name = "access-dev" +database_id = "7f5c4ec7-610b-4885-b9f7-0886ce0639f6" # Staging [env.staging] From 92a89d31905b88c522e790662c75a2b8c970b77d Mon Sep 17 00:00:00 2001 From: Benjamin Goering <171782+gobengo@users.noreply.github.com> Date: Thu, 13 Apr 2023 10:38:52 -0700 Subject: [PATCH 05/25] make sentry-release-version code a reusable function/script --- packages/access-api/scripts/sentry-release.js | 44 +++++++++++++++++++ packages/access-api/src/utils/sentry.js | 24 ++++++++++ 2 files changed, 68 insertions(+) create mode 100644 packages/access-api/scripts/sentry-release.js create mode 100644 packages/access-api/src/utils/sentry.js diff --git a/packages/access-api/scripts/sentry-release.js b/packages/access-api/scripts/sentry-release.js new file mode 100644 index 000000000..1653a5f44 --- /dev/null +++ b/packages/access-api/scripts/sentry-release.js @@ -0,0 +1,44 @@ +/* eslint-disable no-console */ +/* eslint-disable unicorn/prefer-module */ +/** + * write to stdout the value to use for the sentry release + */ + +// @ts-ignore +import git from 'git-rev-sync' +import * as fs from 'fs'; +import path from 'path'; +import { fileURLToPath } from 'url' +import sade from 'sade' +import * as url from 'node:url'; +import { createSentryRelease } from '../src/utils/sentry.js' +const __dirname = path.dirname(fileURLToPath(import.meta.url)) + +if (import.meta.url.startsWith('file:')) { + const modulePath = url.fileURLToPath(import.meta.url); + if (process.argv[1] === modulePath) { + main().catch(error => { throw error }) + } +} + +async function main(argv=process.argv) { + sade('sentry-release') + .command('print-release-name', '', { default: true }) + .option('--env', 'Environment') + .action((opts) => { + if ( ! opts.env) { + throw new Error('provide --env option') + } + const packageJson = JSON.parse( + // eslint-disable-next-line unicorn/prefer-json-parse-buffer + fs.readFileSync(path.join(__dirname, '..', 'package.json'), 'utf8') + ) + const releaseString = createSentryRelease( + packageJson, + opts.env, + git.short(__dirname), + ) + console.log(releaseString) + }) + .parse(argv) +} diff --git a/packages/access-api/src/utils/sentry.js b/packages/access-api/src/utils/sentry.js new file mode 100644 index 000000000..f046ad41b --- /dev/null +++ b/packages/access-api/src/utils/sentry.js @@ -0,0 +1,24 @@ +/** + * write to stdout the value to use for the sentry release + */ +/* eslint-disable no-console */ +/* eslint-disable unicorn/prefer-module */ + +/** + * Create a string to be used for the sentry release value + * + * @param {object} pkg + * @param {string} pkg.name + * @param {string} pkg.version + * @param {string} env + * @param {string} gitShort - git.short(__dirname) + * @returns {string} + */ +export function createSentryRelease( + pkg, + env, + gitShort, +) { + const version = `${pkg.name}@${pkg.version}-${env}+${gitShort}`.replace('/', '__') + return version +} From 95701796ccf94af46e36682e526ef2817c31b142 Mon Sep 17 00:00:00 2001 From: Benjamin Goering <171782+gobengo@users.noreply.github.com> Date: Thu, 13 Apr 2023 14:25:53 -0700 Subject: [PATCH 06/25] wip release scripts --- packages/access-api/scripts/release.js | 52 +++++++++++++++++++ packages/access-api/scripts/sentry-release.js | 44 ---------------- packages/access-api/src/utils/context.js | 3 +- .../access-api/src/utils/release.build.js | 14 +++++ packages/access-api/src/utils/release.node.js | 39 ++++++++++++++ packages/access-api/src/utils/sentry.js | 24 --------- packages/access-api/wrangler.toml | 10 ++++ 7 files changed, 117 insertions(+), 69 deletions(-) create mode 100644 packages/access-api/scripts/release.js delete mode 100644 packages/access-api/scripts/sentry-release.js create mode 100644 packages/access-api/src/utils/release.build.js create mode 100644 packages/access-api/src/utils/release.node.js delete mode 100644 packages/access-api/src/utils/sentry.js diff --git a/packages/access-api/scripts/release.js b/packages/access-api/scripts/release.js new file mode 100644 index 000000000..1453a8a7b --- /dev/null +++ b/packages/access-api/scripts/release.js @@ -0,0 +1,52 @@ +/* eslint-disable unicorn/prefer-top-level-await */ +/* eslint-disable no-console */ +/* eslint-disable unicorn/prefer-module */ +/** + * @file + * use this at build time (node.js) to create files that can be + * imported at runtime (maybe workerd). + */ +import sade from 'sade' +import * as url from 'node:url' +import { getReleaseName } from '../src/utils/release.node.js' +import path from 'path' +import { fileURLToPath } from 'url' +// @ts-ignore +import git from 'git-rev-sync' + +function __dirname() { + return path.dirname(fileURLToPath(import.meta.url)) +} + +if (import.meta.url.startsWith('file:')) { + const modulePath = url.fileURLToPath(import.meta.url) + if (process.argv[1] === modulePath) { + main().catch((error) => { + throw error + }) + } +} + +async function main(argv = process.argv) { + const cli = sade('access-api-release') + cli + .command('name', '', { default: true }) + .option('--env', 'Environment', process.env.ENV) + .action((opts) => { + const releaseName = getReleaseName(opts.env) + console.log(releaseName) + }) + cli + .command('esm', 'print release info as ES Module string') + .option('--env', 'Environment', process.env.ENV) + .action((opts) => { + const lines = [ + `/** @type {string|undefined} */`, + `export const gitRevShort = "${git.short(__dirname())}";`, + `/** @type {string|undefined} */`, + `export const name = "${getReleaseName(opts.env)}";`, + ] + console.log(lines.join('\n')) + }) + cli.parse(argv) +} diff --git a/packages/access-api/scripts/sentry-release.js b/packages/access-api/scripts/sentry-release.js deleted file mode 100644 index 1653a5f44..000000000 --- a/packages/access-api/scripts/sentry-release.js +++ /dev/null @@ -1,44 +0,0 @@ -/* eslint-disable no-console */ -/* eslint-disable unicorn/prefer-module */ -/** - * write to stdout the value to use for the sentry release - */ - -// @ts-ignore -import git from 'git-rev-sync' -import * as fs from 'fs'; -import path from 'path'; -import { fileURLToPath } from 'url' -import sade from 'sade' -import * as url from 'node:url'; -import { createSentryRelease } from '../src/utils/sentry.js' -const __dirname = path.dirname(fileURLToPath(import.meta.url)) - -if (import.meta.url.startsWith('file:')) { - const modulePath = url.fileURLToPath(import.meta.url); - if (process.argv[1] === modulePath) { - main().catch(error => { throw error }) - } -} - -async function main(argv=process.argv) { - sade('sentry-release') - .command('print-release-name', '', { default: true }) - .option('--env', 'Environment') - .action((opts) => { - if ( ! opts.env) { - throw new Error('provide --env option') - } - const packageJson = JSON.parse( - // eslint-disable-next-line unicorn/prefer-json-parse-buffer - fs.readFileSync(path.join(__dirname, '..', 'package.json'), 'utf8') - ) - const releaseString = createSentryRelease( - packageJson, - opts.env, - git.short(__dirname), - ) - console.log(releaseString) - }) - .parse(argv) -} diff --git a/packages/access-api/src/utils/context.js b/packages/access-api/src/utils/context.js index 0e38926ea..8cf788ec4 100644 --- a/packages/access-api/src/utils/context.js +++ b/packages/access-api/src/utils/context.js @@ -15,6 +15,7 @@ import { } from '../models/delegations.js' import { createD1Database } from './d1.js' import { DbProvisions } from '../models/provisions.js' +import * as sentryRelease from './sentry-release.js' /** * Obtains a route context object. @@ -56,7 +57,7 @@ export function getContext(request, env, ctx) { dsn: config.SENTRY_DSN, debug: false, environment: config.ENV, - release: config.VERSION, + release: sentryRelease.name, }) // Logging diff --git a/packages/access-api/src/utils/release.build.js b/packages/access-api/src/utils/release.build.js new file mode 100644 index 000000000..f595e5138 --- /dev/null +++ b/packages/access-api/src/utils/release.build.js @@ -0,0 +1,14 @@ +/** + * @file + * This file MAY be rewritten during build + * to make some build-time variables available at run-time. + */ + +/** @type {string|undefined} */ +export const gitRevShort = undefined; +/** + * release name + * + * @type {string|undefined} + */ +export const name = undefined; diff --git a/packages/access-api/src/utils/release.node.js b/packages/access-api/src/utils/release.node.js new file mode 100644 index 000000000..07b875534 --- /dev/null +++ b/packages/access-api/src/utils/release.node.js @@ -0,0 +1,39 @@ +/** + * @file + * utils related to sentry that rely on node. + * These might be used at build time, + * but won't work at run-time in cloudflare workers + */ +/* eslint-disable no-console */ +/* eslint-disable unicorn/prefer-module */ + +// @ts-ignore +import git from 'git-rev-sync' +import path from 'path' +import { fileURLToPath } from 'url' +import { createRequire } from 'node:module' + +const packageJson = createRequire(import.meta.url)('../../package.json') +const __dirname = () => path.dirname(fileURLToPath(import.meta.url)) + +/** + * Create a string to be used for the sentry release value + * + * @param {string} [env] - environment name e.g. 'dev' + * @param {object} pkg - package.json info + * @param {string} pkg.name + * @param {string} pkg.version + * @param {string} gitShort - git-rev-parse short value + * @returns {string} release name e.g. `@web3-storage__access-api@6.0.0-staging+92a89d3` + */ +export function getReleaseName( + env, + pkg = packageJson, + gitShort = git.short(__dirname()) +) { + const version = `${pkg.name}@${pkg.version}-${env}+${gitShort}`.replace( + '/', + '__' + ) + return version +} diff --git a/packages/access-api/src/utils/sentry.js b/packages/access-api/src/utils/sentry.js deleted file mode 100644 index f046ad41b..000000000 --- a/packages/access-api/src/utils/sentry.js +++ /dev/null @@ -1,24 +0,0 @@ -/** - * write to stdout the value to use for the sentry release - */ -/* eslint-disable no-console */ -/* eslint-disable unicorn/prefer-module */ - -/** - * Create a string to be used for the sentry release value - * - * @param {object} pkg - * @param {string} pkg.name - * @param {string} pkg.version - * @param {string} env - * @param {string} gitShort - git.short(__dirname) - * @returns {string} - */ -export function createSentryRelease( - pkg, - env, - gitShort, -) { - const version = `${pkg.name}@${pkg.version}-${env}+${gitShort}`.replace('/', '__') - return version -} diff --git a/packages/access-api/wrangler.toml b/packages/access-api/wrangler.toml index accc5ef2d..f53222328 100644 --- a/packages/access-api/wrangler.toml +++ b/packages/access-api/wrangler.toml @@ -40,6 +40,10 @@ watch_dir = "src" [miniflare] d1_persist = ".wrangler/miniflare" +rules = [ + { type = "Text", globs = ["package.json"], fallthrough = true } +] + # Dev [env.dev] name = "w3access-dev" @@ -52,11 +56,17 @@ kv_namespaces = [ unsafe = { bindings = [ { type = "analytics_engine", dataset = "W3ACCESS_METRICS", name = "W3ACCESS_METRICS" }, ] } + [[env.dev.d1_databases]] binding = "__D1_BETA__" database_name = "access-dev" database_id = "7f5c4ec7-610b-4885-b9f7-0886ce0639f6" +[[env.dev.r2_buckets]] +binding = "DELEGATIONS_BUCKET" +bucket_name = "w3up-delegations-dev-0" +preview_bucket_name = "w3up-delegations-dev-0" + # Staging [env.staging] name = "w3access-staging" From 69271488afd5367a1c4553f5226675f81f1ed041 Mon Sep 17 00:00:00 2001 From: Benjamin Goering <171782+gobengo@users.noreply.github.com> Date: Thu, 13 Apr 2023 14:28:55 -0700 Subject: [PATCH 07/25] wip --- packages/access-api/scripts/release.js | 4 ++-- packages/access-api/src/utils/context.js | 4 ++-- packages/access-api/src/utils/release.build.js | 13 ++++--------- 3 files changed, 8 insertions(+), 13 deletions(-) diff --git a/packages/access-api/scripts/release.js b/packages/access-api/scripts/release.js index 1453a8a7b..5880f0cdf 100644 --- a/packages/access-api/scripts/release.js +++ b/packages/access-api/scripts/release.js @@ -42,9 +42,9 @@ async function main(argv = process.argv) { .action((opts) => { const lines = [ `/** @type {string|undefined} */`, - `export const gitRevShort = "${git.short(__dirname())}";`, + `export const gitRevShort = '${git.short(__dirname())}'`, `/** @type {string|undefined} */`, - `export const name = "${getReleaseName(opts.env)}";`, + `export const name = '${getReleaseName(opts.env)}'`, ] console.log(lines.join('\n')) }) diff --git a/packages/access-api/src/utils/context.js b/packages/access-api/src/utils/context.js index 8cf788ec4..2df7cdcb3 100644 --- a/packages/access-api/src/utils/context.js +++ b/packages/access-api/src/utils/context.js @@ -15,7 +15,7 @@ import { } from '../models/delegations.js' import { createD1Database } from './d1.js' import { DbProvisions } from '../models/provisions.js' -import * as sentryRelease from './sentry-release.js' +import * as release from './release.build.js' /** * Obtains a route context object. @@ -57,7 +57,7 @@ export function getContext(request, env, ctx) { dsn: config.SENTRY_DSN, debug: false, environment: config.ENV, - release: sentryRelease.name, + release: release.name, }) // Logging diff --git a/packages/access-api/src/utils/release.build.js b/packages/access-api/src/utils/release.build.js index f595e5138..ad64e7814 100644 --- a/packages/access-api/src/utils/release.build.js +++ b/packages/access-api/src/utils/release.build.js @@ -1,14 +1,9 @@ /** * @file * This file MAY be rewritten during build - * to make some build-time variables available at run-time. + * to make some buildtime variables available at runtime. */ - /** @type {string|undefined} */ -export const gitRevShort = undefined; -/** - * release name - * - * @type {string|undefined} - */ -export const name = undefined; +export const gitRevShort = undefined +/** @type {string|undefined} */ +export const name = undefined From 27eff7b1a5afb5eb17bde123719f66b44541deb9 Mon Sep 17 00:00:00 2001 From: Benjamin Goering <171782+gobengo@users.noreply.github.com> Date: Thu, 13 Apr 2023 14:48:57 -0700 Subject: [PATCH 08/25] wip --- packages/access-api/.gitignore | 1 + packages/access-api/src/config.js | 5 +++-- packages/access-api/src/utils/context.js | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 packages/access-api/.gitignore diff --git a/packages/access-api/.gitignore b/packages/access-api/.gitignore new file mode 100644 index 000000000..babca1bb1 --- /dev/null +++ b/packages/access-api/.gitignore @@ -0,0 +1 @@ +.dev.vars diff --git a/packages/access-api/src/config.js b/packages/access-api/src/config.js index f4ba05166..34a1c68b9 100644 --- a/packages/access-api/src/config.js +++ b/packages/access-api/src/config.js @@ -2,6 +2,7 @@ // eslint-disable-next-line no-unused-vars import * as UCAN from '@ucanto/interface' import { DID } from '@ucanto/core' +import * as release from './utils/release.build.js'; /** * Loads configuration variables from the global environment and returns a JS object @@ -50,10 +51,10 @@ export function loadConfig(env) { BRANCH: env.ACCOUNT_BRANCH ?? '', // @ts-ignore // eslint-disable-next-line no-undef - VERSION: env.ACCOUNT_VERSION ?? '', + VERSION: env.ACCOUNT_VERSION ?? release.name ?? '', // @ts-ignore // eslint-disable-next-line no-undef - COMMITHASH: env.ACCOUNT_COMMITHASH ?? '', + COMMITHASH: env.ACCOUNT_COMMITHASH ?? release.gitRevShort ?? '', PRIVATE_KEY: vars.PRIVATE_KEY, DID: /** @type {UCAN.DID<"web">} */ (DID.parse(vars.DID).did()), diff --git a/packages/access-api/src/utils/context.js b/packages/access-api/src/utils/context.js index 2df7cdcb3..33562a5f4 100644 --- a/packages/access-api/src/utils/context.js +++ b/packages/access-api/src/utils/context.js @@ -64,7 +64,7 @@ export function getContext(request, env, ctx) { const log = new Logging(request, ctx, { token: config.LOGTAIL_TOKEN, debug: config.DEBUG, - sentry: ['test', 'dev'].includes(config.ENV) ? undefined : sentry, + sentry: ['test'].includes(config.ENV) ? undefined : sentry, branch: config.BRANCH, version: config.VERSION, commit: config.COMMITHASH, From 8465228fb61f82de2ebbebedd8813a6363a3158d Mon Sep 17 00:00:00 2001 From: Benjamin Goering <171782+gobengo@users.noreply.github.com> Date: Thu, 13 Apr 2023 15:07:02 -0700 Subject: [PATCH 09/25] add release name prep to reusable-deploy-api --- .github/workflows/reusable-deploy-api.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/reusable-deploy-api.yml b/.github/workflows/reusable-deploy-api.yml index bfb52779f..6c70c755e 100644 --- a/.github/workflows/reusable-deploy-api.yml +++ b/.github/workflows/reusable-deploy-api.yml @@ -43,6 +43,13 @@ jobs: node-version: 18 cache: 'pnpm' - run: pnpm install + # release prep + - id: set-release-name + env: + ENV: ${{ inputs.environment }} + run: | + echo "release_name=$(node scripts/release.js)" >> "$GITHUB_OUTPUT" + - run: echo "release name is ${{ steps.set-release-name.outputs.release_name }}" # Migration database - run: pnpm -r --filter @web3-storage/access-api exec wrangler d1 migrations apply __D1_BETA__ --env ${{ inputs.environment }} env: @@ -69,3 +76,4 @@ jobs: SENTRY_TOKEN: ${{ secrets.SENTRY_TOKEN }} LOGTAIL_TOKEN: ${{ secrets.LOGTAIL_TOKEN }} UCAN_LOG_BASIC_AUTH: ${{ secrets.UCAN_LOG_BASIC_AUTH }} + - run: ls packages/access-api/dist/ From df8d799394b51b825bb2d84d4692e0c52c12fcc4 Mon Sep 17 00:00:00 2001 From: Benjamin Goering <171782+gobengo@users.noreply.github.com> Date: Thu, 13 Apr 2023 15:24:40 -0700 Subject: [PATCH 10/25] prettier --- packages/access-api/src/config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/access-api/src/config.js b/packages/access-api/src/config.js index 34a1c68b9..bef538025 100644 --- a/packages/access-api/src/config.js +++ b/packages/access-api/src/config.js @@ -2,7 +2,7 @@ // eslint-disable-next-line no-unused-vars import * as UCAN from '@ucanto/interface' import { DID } from '@ucanto/core' -import * as release from './utils/release.build.js'; +import * as release from './utils/release.build.js' /** * Loads configuration variables from the global environment and returns a JS object From 87bd2144e01710263633b6a83d1bb73eda9f2fba Mon Sep 17 00:00:00 2001 From: Benjamin Goering <171782+gobengo@users.noreply.github.com> Date: Thu, 13 Apr 2023 15:47:44 -0700 Subject: [PATCH 11/25] fix how reusable-deploy-api gets release name --- .github/workflows/reusable-deploy-api.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-deploy-api.yml b/.github/workflows/reusable-deploy-api.yml index 6c70c755e..710a6b1ab 100644 --- a/.github/workflows/reusable-deploy-api.yml +++ b/.github/workflows/reusable-deploy-api.yml @@ -48,7 +48,7 @@ jobs: env: ENV: ${{ inputs.environment }} run: | - echo "release_name=$(node scripts/release.js)" >> "$GITHUB_OUTPUT" + echo "release_name=$(node packages/access-api/scripts/release.js)" >> "$GITHUB_OUTPUT" - run: echo "release name is ${{ steps.set-release-name.outputs.release_name }}" # Migration database - run: pnpm -r --filter @web3-storage/access-api exec wrangler d1 migrations apply __D1_BETA__ --env ${{ inputs.environment }} From 9cb44c3d9276e12e6ec868e508eb20f5be75583d Mon Sep 17 00:00:00 2001 From: Benjamin Goering <171782+gobengo@users.noreply.github.com> Date: Thu, 13 Apr 2023 15:47:56 -0700 Subject: [PATCH 12/25] reusable-deploy-api only installs packages on dep tree of access-api --- .github/workflows/reusable-deploy-api.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-deploy-api.yml b/.github/workflows/reusable-deploy-api.yml index 710a6b1ab..c33f83ad0 100644 --- a/.github/workflows/reusable-deploy-api.yml +++ b/.github/workflows/reusable-deploy-api.yml @@ -42,7 +42,7 @@ jobs: with: node-version: 18 cache: 'pnpm' - - run: pnpm install + - run: pnpm --filter '@web3-storage/access-api...' install # release prep - id: set-release-name env: From ba143bd4f06e95857670a09599f462d60af06f7d Mon Sep 17 00:00:00 2001 From: Benjamin Goering <171782+gobengo@users.noreply.github.com> Date: Thu, 13 Apr 2023 15:57:10 -0700 Subject: [PATCH 13/25] reusable-deploy-api publishes sentry release and source maps --- .github/workflows/reusable-deploy-api.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reusable-deploy-api.yml b/.github/workflows/reusable-deploy-api.yml index c33f83ad0..936f39693 100644 --- a/.github/workflows/reusable-deploy-api.yml +++ b/.github/workflows/reusable-deploy-api.yml @@ -76,4 +76,13 @@ jobs: SENTRY_TOKEN: ${{ secrets.SENTRY_TOKEN }} LOGTAIL_TOKEN: ${{ secrets.LOGTAIL_TOKEN }} UCAN_LOG_BASIC_AUTH: ${{ secrets.UCAN_LOG_BASIC_AUTH }} - - run: ls packages/access-api/dist/ + - working-directory: packages/access-api + run: | + pnpm exec wrangler publish --dry-run --outdir=dist + ls -alh dist + echo "release_name is ${{ steps.set-release-name.outputs.release_name }}" + echo "RELEASE_NAME=$RELEASE_NAME" + pnpm exec sentry-cli releases new "$RELEASE_NAME" --finalize + pnpm exec sentry-cli releases files "$RELEASE_NAME" upload-sourcemaps ./dist + env: + RELEASE_NAME: ${{ steps.set-release-name.outputs.release_name }}" From f3446a0508cf2977708e251d7f3d0a5967f535fa Mon Sep 17 00:00:00 2001 From: Benjamin Goering <171782+gobengo@users.noreply.github.com> Date: Thu, 13 Apr 2023 16:47:39 -0700 Subject: [PATCH 14/25] wip --- .github/workflows/reusable-deploy-api.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/reusable-deploy-api.yml b/.github/workflows/reusable-deploy-api.yml index 936f39693..aa290ce87 100644 --- a/.github/workflows/reusable-deploy-api.yml +++ b/.github/workflows/reusable-deploy-api.yml @@ -80,9 +80,14 @@ jobs: run: | pnpm exec wrangler publish --dry-run --outdir=dist ls -alh dist - echo "release_name is ${{ steps.set-release-name.outputs.release_name }}" echo "RELEASE_NAME=$RELEASE_NAME" - pnpm exec sentry-cli releases new "$RELEASE_NAME" --finalize - pnpm exec sentry-cli releases files "$RELEASE_NAME" upload-sourcemaps ./dist + echo "SENTRY_ORG=$SENTRY_ORG" + echo "SENTRY_PROJECT=$SENTRY_PROJECT" + pnpm exec -c sentry-cli releases new "$RELEASE_NAME" --finalize + pnpm exec -c sentry-cli releases files "$RELEASE_NAME" upload-sourcemaps ./dist env: + ENV: ${{ vars.ENV }} RELEASE_NAME: ${{ steps.set-release-name.outputs.release_name }}" + SENTRY_ORG: ${{ vars.SENTRY_ORG }} + SENTRY_PROJECT: ${{ vars.SENTRY_PROJECT }} + SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_TOKEN }} From 50ded92d1f2f944ebd81ce3296bb179acde12e12 Mon Sep 17 00:00:00 2001 From: Benjamin Goering <171782+gobengo@users.noreply.github.com> Date: Thu, 13 Apr 2023 16:55:22 -0700 Subject: [PATCH 15/25] wip --- .github/workflows/reusable-deploy-api.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/reusable-deploy-api.yml b/.github/workflows/reusable-deploy-api.yml index aa290ce87..179428b40 100644 --- a/.github/workflows/reusable-deploy-api.yml +++ b/.github/workflows/reusable-deploy-api.yml @@ -78,13 +78,14 @@ jobs: UCAN_LOG_BASIC_AUTH: ${{ secrets.UCAN_LOG_BASIC_AUTH }} - working-directory: packages/access-api run: | - pnpm exec wrangler publish --dry-run --outdir=dist + pnpm exec wrangler --env="$ENV" publish --dry-run --outdir=dist ls -alh dist + echo "ENV=$ENV" echo "RELEASE_NAME=$RELEASE_NAME" echo "SENTRY_ORG=$SENTRY_ORG" echo "SENTRY_PROJECT=$SENTRY_PROJECT" - pnpm exec -c sentry-cli releases new "$RELEASE_NAME" --finalize - pnpm exec -c sentry-cli releases files "$RELEASE_NAME" upload-sourcemaps ./dist + SENTRY_ORG="$SENTRY_ORG" SENTRY_PROJECT="$SENTRY_PROJECT" ENV="$ENV" pnpm exec -c sentry-cli releases new "$RELEASE_NAME" --finalize + SENTRY_ORG="$SENTRY_ORG" SENTRY_PROJECT="$SENTRY_PROJECT" ENV="$ENV" pnpm exec -c sentry-cli releases files "$RELEASE_NAME" upload-sourcemaps ./dist env: ENV: ${{ vars.ENV }} RELEASE_NAME: ${{ steps.set-release-name.outputs.release_name }}" From 25aecb005e85f1224a806d251095c2ce698e2547 Mon Sep 17 00:00:00 2001 From: Benjamin Goering <171782+gobengo@users.noreply.github.com> Date: Thu, 13 Apr 2023 17:01:10 -0700 Subject: [PATCH 16/25] wip --- .github/workflows/reusable-deploy-api.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reusable-deploy-api.yml b/.github/workflows/reusable-deploy-api.yml index 179428b40..769bc9332 100644 --- a/.github/workflows/reusable-deploy-api.yml +++ b/.github/workflows/reusable-deploy-api.yml @@ -84,8 +84,8 @@ jobs: echo "RELEASE_NAME=$RELEASE_NAME" echo "SENTRY_ORG=$SENTRY_ORG" echo "SENTRY_PROJECT=$SENTRY_PROJECT" - SENTRY_ORG="$SENTRY_ORG" SENTRY_PROJECT="$SENTRY_PROJECT" ENV="$ENV" pnpm exec -c sentry-cli releases new "$RELEASE_NAME" --finalize - SENTRY_ORG="$SENTRY_ORG" SENTRY_PROJECT="$SENTRY_PROJECT" ENV="$ENV" pnpm exec -c sentry-cli releases files "$RELEASE_NAME" upload-sourcemaps ./dist + SENTRY_ORG="$SENTRY_ORG" SENTRY_PROJECT="$SENTRY_PROJECT" ENV="$ENV" pnpm exec sentry-cli releases new "$RELEASE_NAME" --finalize + SENTRY_ORG="$SENTRY_ORG" SENTRY_PROJECT="$SENTRY_PROJECT" ENV="$ENV" pnpm exec sentry-cli releases files "$RELEASE_NAME" upload-sourcemaps ./dist env: ENV: ${{ vars.ENV }} RELEASE_NAME: ${{ steps.set-release-name.outputs.release_name }}" From 6f16f09918689582c4f277e7e6addc344cd701d2 Mon Sep 17 00:00:00 2001 From: Benjamin Goering <171782+gobengo@users.noreply.github.com> Date: Thu, 13 Apr 2023 17:10:29 -0700 Subject: [PATCH 17/25] wip --- .github/workflows/reusable-deploy-api.yml | 8 +++++++- packages/access-api/src/utils/context.js | 3 +++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reusable-deploy-api.yml b/.github/workflows/reusable-deploy-api.yml index 769bc9332..7ddea3504 100644 --- a/.github/workflows/reusable-deploy-api.yml +++ b/.github/workflows/reusable-deploy-api.yml @@ -50,6 +50,11 @@ jobs: run: | echo "release_name=$(node packages/access-api/scripts/release.js)" >> "$GITHUB_OUTPUT" - run: echo "release name is ${{ steps.set-release-name.outputs.release_name }}" + - name: write release info to src + env: + ENV: ${{ vars.ENV }} + run: | + node scripts/release.js esm > src/utils/release.build.js # Migration database - run: pnpm -r --filter @web3-storage/access-api exec wrangler d1 migrations apply __D1_BETA__ --env ${{ inputs.environment }} env: @@ -76,7 +81,8 @@ jobs: SENTRY_TOKEN: ${{ secrets.SENTRY_TOKEN }} LOGTAIL_TOKEN: ${{ secrets.LOGTAIL_TOKEN }} UCAN_LOG_BASIC_AUTH: ${{ secrets.UCAN_LOG_BASIC_AUTH }} - - working-directory: packages/access-api + - name: create sentry release + working-directory: packages/access-api run: | pnpm exec wrangler --env="$ENV" publish --dry-run --outdir=dist ls -alh dist diff --git a/packages/access-api/src/utils/context.js b/packages/access-api/src/utils/context.js index 33562a5f4..f15008761 100644 --- a/packages/access-api/src/utils/context.js +++ b/packages/access-api/src/utils/context.js @@ -45,6 +45,9 @@ export function getContext(request, env, ctx) { : UCANLog.debug() // Sentry + console.warn('constructing toucan-js', { + release: String(release.name), + }) const sentry = new Toucan({ context: ctx, integrations: [ From fb13a8452338acd797da6f20e6150a8b5876ed75 Mon Sep 17 00:00:00 2001 From: Benjamin Goering <171782+gobengo@users.noreply.github.com> Date: Thu, 13 Apr 2023 17:16:20 -0700 Subject: [PATCH 18/25] wip --- .github/workflows/reusable-deploy-api.yml | 1 + packages/access-api/src/utils/context.js | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/reusable-deploy-api.yml b/.github/workflows/reusable-deploy-api.yml index 7ddea3504..6549165ca 100644 --- a/.github/workflows/reusable-deploy-api.yml +++ b/.github/workflows/reusable-deploy-api.yml @@ -51,6 +51,7 @@ jobs: echo "release_name=$(node packages/access-api/scripts/release.js)" >> "$GITHUB_OUTPUT" - run: echo "release name is ${{ steps.set-release-name.outputs.release_name }}" - name: write release info to src + working-directory: packages/access-api/ env: ENV: ${{ vars.ENV }} run: | diff --git a/packages/access-api/src/utils/context.js b/packages/access-api/src/utils/context.js index f15008761..de559096f 100644 --- a/packages/access-api/src/utils/context.js +++ b/packages/access-api/src/utils/context.js @@ -45,6 +45,7 @@ export function getContext(request, env, ctx) { : UCANLog.debug() // Sentry + // eslint-disable-next-line no-console console.warn('constructing toucan-js', { release: String(release.name), }) From 0be62572a452d5dfdf6ce543d57a97ca309cf290 Mon Sep 17 00:00:00 2001 From: Benjamin Goering <171782+gobengo@users.noreply.github.com> Date: Thu, 13 Apr 2023 17:49:45 -0700 Subject: [PATCH 19/25] remove extra quotes --- .github/workflows/reusable-deploy-api.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-deploy-api.yml b/.github/workflows/reusable-deploy-api.yml index 6549165ca..a799b11ed 100644 --- a/.github/workflows/reusable-deploy-api.yml +++ b/.github/workflows/reusable-deploy-api.yml @@ -95,7 +95,7 @@ jobs: SENTRY_ORG="$SENTRY_ORG" SENTRY_PROJECT="$SENTRY_PROJECT" ENV="$ENV" pnpm exec sentry-cli releases files "$RELEASE_NAME" upload-sourcemaps ./dist env: ENV: ${{ vars.ENV }} - RELEASE_NAME: ${{ steps.set-release-name.outputs.release_name }}" + RELEASE_NAME: ${{ steps.set-release-name.outputs.release_name }} SENTRY_ORG: ${{ vars.SENTRY_ORG }} SENTRY_PROJECT: ${{ vars.SENTRY_PROJECT }} SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_TOKEN }} From 19b7cd395b2334a9f18ed89a28e6ae634a857c52 Mon Sep 17 00:00:00 2001 From: Benjamin Goering <171782+gobengo@users.noreply.github.com> Date: Thu, 13 Apr 2023 17:58:08 -0700 Subject: [PATCH 20/25] clean up reusable-deploy-api.yml --- .github/workflows/reusable-deploy-api.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/reusable-deploy-api.yml b/.github/workflows/reusable-deploy-api.yml index a799b11ed..0c3ab8769 100644 --- a/.github/workflows/reusable-deploy-api.yml +++ b/.github/workflows/reusable-deploy-api.yml @@ -43,20 +43,22 @@ jobs: node-version: 18 cache: 'pnpm' - run: pnpm --filter '@web3-storage/access-api...' install - # release prep + # get release name that will be used for sentry - id: set-release-name env: ENV: ${{ inputs.environment }} run: | echo "release_name=$(node packages/access-api/scripts/release.js)" >> "$GITHUB_OUTPUT" - run: echo "release name is ${{ steps.set-release-name.outputs.release_name }}" + # write release info to ./src so it can be imported at runtime (e.g. used by toucan-js for `opts.release`) + # be sure to keep this before wrangler-action bundles+deploys - name: write release info to src working-directory: packages/access-api/ env: ENV: ${{ vars.ENV }} run: | node scripts/release.js esm > src/utils/release.build.js - # Migration database + # Apply D1 Migrations - run: pnpm -r --filter @web3-storage/access-api exec wrangler d1 migrations apply __D1_BETA__ --env ${{ inputs.environment }} env: CLOUDFLARE_API_TOKEN: ${{ secrets.CF_TOKEN }} @@ -85,14 +87,12 @@ jobs: - name: create sentry release working-directory: packages/access-api run: | + # write ./index.{js,js.map} pnpm exec wrangler --env="$ENV" publish --dry-run --outdir=dist - ls -alh dist - echo "ENV=$ENV" - echo "RELEASE_NAME=$RELEASE_NAME" - echo "SENTRY_ORG=$SENTRY_ORG" - echo "SENTRY_PROJECT=$SENTRY_PROJECT" - SENTRY_ORG="$SENTRY_ORG" SENTRY_PROJECT="$SENTRY_PROJECT" ENV="$ENV" pnpm exec sentry-cli releases new "$RELEASE_NAME" --finalize - SENTRY_ORG="$SENTRY_ORG" SENTRY_PROJECT="$SENTRY_PROJECT" ENV="$ENV" pnpm exec sentry-cli releases files "$RELEASE_NAME" upload-sourcemaps ./dist + # create sentry release + pnpm exec sentry-cli releases new "$RELEASE_NAME" --finalize + # associate wrangler-built src+map to sentry release + pnpm exec sentry-cli releases files "$RELEASE_NAME" upload-sourcemaps ./dist env: ENV: ${{ vars.ENV }} RELEASE_NAME: ${{ steps.set-release-name.outputs.release_name }} From 3cecdf68754fe039bfe514970a18c396d2a83c4c Mon Sep 17 00:00:00 2001 From: Benjamin Goering <171782+gobengo@users.noreply.github.com> Date: Thu, 13 Apr 2023 17:58:33 -0700 Subject: [PATCH 21/25] typo --- .github/workflows/reusable-deploy-api.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-deploy-api.yml b/.github/workflows/reusable-deploy-api.yml index 0c3ab8769..aa9b4a651 100644 --- a/.github/workflows/reusable-deploy-api.yml +++ b/.github/workflows/reusable-deploy-api.yml @@ -87,7 +87,7 @@ jobs: - name: create sentry release working-directory: packages/access-api run: | - # write ./index.{js,js.map} + # write ./dist/index.{js,js.map} pnpm exec wrangler --env="$ENV" publish --dry-run --outdir=dist # create sentry release pnpm exec sentry-cli releases new "$RELEASE_NAME" --finalize From 7aabcc09633d6c5a3ed8cf56aac55cdac7e0dae1 Mon Sep 17 00:00:00 2001 From: Benjamin Goering <171782+gobengo@users.noreply.github.com> Date: Fri, 14 Apr 2023 10:38:39 -0700 Subject: [PATCH 22/25] remove console --- packages/access-api/src/utils/context.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/packages/access-api/src/utils/context.js b/packages/access-api/src/utils/context.js index de559096f..33562a5f4 100644 --- a/packages/access-api/src/utils/context.js +++ b/packages/access-api/src/utils/context.js @@ -45,10 +45,6 @@ export function getContext(request, env, ctx) { : UCANLog.debug() // Sentry - // eslint-disable-next-line no-console - console.warn('constructing toucan-js', { - release: String(release.name), - }) const sentry = new Toucan({ context: ctx, integrations: [ From 1d7f23e11654a71ab28102f8aa731409c90d6e04 Mon Sep 17 00:00:00 2001 From: Benjamin Goering <171782+gobengo@users.noreply.github.com> Date: Fri, 14 Apr 2023 10:38:52 -0700 Subject: [PATCH 23/25] access-api wranger.toml doesn't specify rules unnecessarily --- packages/access-api/wrangler.toml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/packages/access-api/wrangler.toml b/packages/access-api/wrangler.toml index f53222328..f443edfda 100644 --- a/packages/access-api/wrangler.toml +++ b/packages/access-api/wrangler.toml @@ -40,10 +40,6 @@ watch_dir = "src" [miniflare] d1_persist = ".wrangler/miniflare" -rules = [ - { type = "Text", globs = ["package.json"], fallthrough = true } -] - # Dev [env.dev] name = "w3access-dev" From 3af1c35b4b5158a4c45c346293f7b6b10e97dff2 Mon Sep 17 00:00:00 2001 From: Benjamin Goering <171782+gobengo@users.noreply.github.com> Date: Fri, 14 Apr 2023 10:44:47 -0700 Subject: [PATCH 24/25] try only running wrangler publish once --- .github/workflows/reusable-deploy-api.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reusable-deploy-api.yml b/.github/workflows/reusable-deploy-api.yml index aa9b4a651..2bfab97e7 100644 --- a/.github/workflows/reusable-deploy-api.yml +++ b/.github/workflows/reusable-deploy-api.yml @@ -68,6 +68,7 @@ jobs: with: # preCommands: git config --global --add safe.directory "*" apiToken: ${{ secrets.CF_TOKEN }} + command: publish --env "${{ vars.ENV }}" --outdir=dist workingDirectory: 'packages/access-api' environment: ${{ inputs.environment }} secrets: | @@ -87,8 +88,7 @@ jobs: - name: create sentry release working-directory: packages/access-api run: | - # write ./dist/index.{js,js.map} - pnpm exec wrangler --env="$ENV" publish --dry-run --outdir=dist + ls -alh ./dist # create sentry release pnpm exec sentry-cli releases new "$RELEASE_NAME" --finalize # associate wrangler-built src+map to sentry release From d58f3b6226e1d50554d66119b2a8031edca00a0f Mon Sep 17 00:00:00 2001 From: Benjamin Goering <171782+gobengo@users.noreply.github.com> Date: Fri, 14 Apr 2023 10:55:08 -0700 Subject: [PATCH 25/25] dont pass unnecessary env vars to wrangler publish --- .github/workflows/reusable-deploy-api.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/reusable-deploy-api.yml b/.github/workflows/reusable-deploy-api.yml index 2bfab97e7..dce2116ac 100644 --- a/.github/workflows/reusable-deploy-api.yml +++ b/.github/workflows/reusable-deploy-api.yml @@ -81,8 +81,6 @@ jobs: POSTMARK_TOKEN: ${{ secrets.POSTMARK_TOKEN }} PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} SENTRY_DSN: ${{ secrets.SENTRY_DSN }} - SENTRY_UPLOAD: ${{ secrets.SENTRY_UPLOAD }} - SENTRY_TOKEN: ${{ secrets.SENTRY_TOKEN }} LOGTAIL_TOKEN: ${{ secrets.LOGTAIL_TOKEN }} UCAN_LOG_BASIC_AUTH: ${{ secrets.UCAN_LOG_BASIC_AUTH }} - name: create sentry release