-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into lforst-xhr-function-names
- Loading branch information
Showing
28 changed files
with
511 additions
and
120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,7 +48,6 @@ env: | |
${{ github.workspace }}/packages/utils/cjs | ||
${{ github.workspace }}/packages/utils/esm | ||
BUILD_CACHE_KEY: build-cache-${{ github.event.inputs.commit || github.sha }} | ||
BUILD_CACHE_TARBALL_KEY: tarball-${{ github.event.inputs.commit || github.sha }} | ||
|
||
# GH will use the first restore-key it finds that matches | ||
|
@@ -127,7 +126,9 @@ jobs: | |
runs-on: ubuntu-20.04 | ||
timeout-minutes: 15 | ||
if: | | ||
needs.job_get_metadata.outputs.changed_any_code == 'true' && | ||
needs.job_get_metadata.outputs.changed_any_code == 'true' || | ||
needs.job_get_metadata.outputs.is_develop == 'true' || | ||
needs.job_get_metadata.outputs.is_release == 'true' || | ||
(needs.job_get_metadata.outputs.is_gitflow_sync == 'false' && needs.job_get_metadata.outputs.has_gitflow_label == 'false') | ||
steps: | ||
- name: Check out base commit (${{ github.event.pull_request.base.sha }}) | ||
|
@@ -158,13 +159,6 @@ jobs: | |
base: ${{ github.event.pull_request.base.sha }} | ||
head: ${{ env.HEAD_COMMIT }} | ||
|
||
- name: Check build cache | ||
uses: actions/cache@v4 | ||
id: cache_built_packages | ||
with: | ||
path: ${{ env.CACHED_BUILD_PATHS }} | ||
key: ${{ env.BUILD_CACHE_KEY }} | ||
|
||
- name: NX cache | ||
uses: actions/cache@v4 | ||
# Disable cache when: | ||
|
@@ -186,6 +180,15 @@ jobs: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
run: yarn build | ||
|
||
- name: Upload build artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: build-output | ||
path: ${{ env.CACHED_BUILD_PATHS }} | ||
retention-days: 7 | ||
compression-level: 6 | ||
overwrite: true | ||
|
||
outputs: | ||
dependency_cache_key: ${{ steps.install_dependencies.outputs.cache_key }} | ||
changed_node_integration: ${{ needs.job_get_metadata.outputs.changed_ci == 'true' || contains(steps.checkForAffected.outputs.affected, '@sentry-internal/node-integration-tests') }} | ||
|
@@ -344,7 +347,7 @@ jobs: | |
name: ${{ github.sha }} | ||
path: | | ||
${{ github.workspace }}/packages/browser/build/bundles/** | ||
${{ github.workspace }}/packages/replay/build/bundles/** | ||
${{ github.workspace }}/packages/replay-internal/build/bundles/** | ||
${{ github.workspace }}/packages/replay-canvas/build/bundles/** | ||
${{ github.workspace }}/packages/feedback/build/bundles/** | ||
${{ github.workspace }}/packages/**/*.tgz | ||
|
@@ -454,7 +457,8 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
node: [14, 16, 18, 20, 22] | ||
#TODO: unpin 22 once Node bug is fixed | ||
node: [14, 16, 18, 20, '22.6.0'] | ||
steps: | ||
- name: Check out base commit (${{ github.event.pull_request.base.sha }}) | ||
uses: actions/checkout@v4 | ||
|
@@ -1416,31 +1420,29 @@ jobs: | |
with: | ||
ref: ${{ env.HEAD_COMMIT }} | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
|
||
- name: Restore dependency cache | ||
uses: actions/cache/restore@v4 | ||
id: restore-dependencies | ||
with: | ||
path: ${{ env.CACHED_DEPENDENCY_PATHS }} | ||
key: ${{ needs.job_build.outputs.dependency_cache_key }} | ||
enableCrossOsArchive: true | ||
fail-on-cache-miss: true | ||
|
||
- name: Restore build cache | ||
uses: actions/cache/restore@v4 | ||
id: restore-build | ||
with: | ||
path: ${{ env.CACHED_BUILD_PATHS }} | ||
key: ${{ needs.job_build.outputs.dependency_cache_key }} | ||
enableCrossOsArchive: true | ||
fail-on-cache-miss: true | ||
- name: Install dependencies | ||
env: | ||
SKIP_PLAYWRIGHT_BROWSER_INSTALL: "1" | ||
if: steps.restore-dependencies.outputs.cache-hit != 'true' | ||
run: yarn install --ignore-engines --frozen-lockfile | ||
|
||
- name: Configure safe directory | ||
run: | | ||
git config --global --add safe.directory "*" | ||
- name: Install yarn | ||
run: npm i -g [email protected] --force | ||
|
||
- name: Increase yarn network timeout on Windows | ||
if: contains(matrix.os, 'windows') | ||
run: yarn config set network-timeout 600000 -g | ||
|
@@ -1452,15 +1454,6 @@ jobs: | |
with: | ||
python-version: '3.8.10' | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
|
||
- name: Install Dependencies | ||
if: steps.restore-dependencies.outputs.cache-hit != 'true' | ||
run: yarn install --frozen-lockfile --ignore-engines --ignore-scripts | ||
|
||
- name: Setup (arm64| ${{ contains(matrix.container, 'alpine') && 'musl' || 'glibc' }}) | ||
if: matrix.arch == 'arm64' && !contains(matrix.container, 'alpine') && matrix.target_platform != 'darwin' | ||
run: | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,43 @@ | ||
name: "Action: Clear all GHA caches" | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
clear_pending_prs: | ||
description: Delete caches of pending PR workflows | ||
type: boolean | ||
default: false | ||
clear_develop: | ||
description: Delete caches on develop branch | ||
type: boolean | ||
default: false | ||
clear_branches: | ||
description: Delete caches on non-develop branches | ||
type: boolean | ||
default: true | ||
schedule: | ||
# Run every day at midnight | ||
- cron: '0 0 * * *' | ||
|
||
jobs: | ||
clear-caches: | ||
name: Delete all caches | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Clear caches | ||
uses: easimon/wipe-cache@v2 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: 'package.json' | ||
|
||
# TODO: Use cached version if possible (but never store cache) | ||
- name: Install dependencies | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Delete GHA caches | ||
uses: ./dev-packages/clear-cache-gh-action | ||
with: | ||
clear_pending_prs: ${{ inputs.clear_pending_prs }} | ||
clear_develop: ${{ inputs.clear_develop }} | ||
clear_branches: ${{ inputs.clear_branches }} | ||
github_token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
dev-packages/browser-integration-tests/suites/feedback/captureFeedbackCsp/subject.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
window.__CSPVIOLATION__ = false; | ||
document.addEventListener('securitypolicyviolation', () => { | ||
window.__CSPVIOLATION__ = true; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
module.exports = { | ||
extends: ['../../.eslintrc.js'], | ||
parserOptions: { | ||
sourceType: 'module', | ||
ecmaVersion: 'latest', | ||
}, | ||
|
||
overrides: [ | ||
{ | ||
files: ['*.mjs'], | ||
extends: ['@sentry-internal/sdk/src/base'], | ||
}, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: 'clear-cache-gh-action' | ||
description: 'Clear caches of the GitHub repository.' | ||
inputs: | ||
github_token: | ||
required: true | ||
description: 'a github access token' | ||
clear_develop: | ||
required: false | ||
default: "" | ||
description: "If set, also clear caches from develop branch." | ||
clear_branches: | ||
required: false | ||
default: "" | ||
description: "If set, also clear caches from non-develop branches." | ||
clear_pending_prs: | ||
required: false | ||
default: "" | ||
description: "If set, also clear caches from pending PR workflow runs." | ||
workflow_name: | ||
required: false | ||
default: "CI: Build & Test" | ||
description: The workflow to clear caches for. | ||
runs: | ||
using: 'node20' | ||
main: 'index.mjs' |
Oops, something went wrong.