-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
ci(v7): Bump to ubuntu-24.04 #17083
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: v7
Are you sure you want to change the base?
ci(v7): Bump to ubuntu-24.04 #17083
Conversation
ubuntu-20.04 is no longer working
size-limit report 📦
|
This reverts commit 6f6cd22.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Stale Job References Break Workflow
The workflow still refers to the jobs
job_compile_bindings_profiling_node
,
job_profiling_node_unit_tests
, and
job_profiling_e2e_tests
in multiple places (for example in job_e2e_prepare.needs
, the condition inside job_e2e_prepare.if
, and the needs
list of job_required_jobs_passed
).
These three jobs were deleted in this commit, so the remaining references point to non-existent job IDs.
GitHub Actions fails during workflow-loading when a job lists a missing dependency, which will make the entire CI workflow invalid and stop all jobs from starting.
.github/workflows/build.yml#L899-L1130
sentry-javascript/.github/workflows/build.yml
Lines 899 to 1130 in a9b40fd
uses: ./.github/actions/restore-cache | |
env: | |
DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }} | |
- name: Run integration tests | |
env: | |
NODE_VERSION: ${{ matrix.node }} | |
REMIX_VERSION: ${{ matrix.remix }} | |
TRACING_INTEGRATION: ${{ matrix.tracingIntegration }} | |
run: | | |
cd packages/remix | |
yarn test:integration:ci | |
job_e2e_prepare: | |
name: Prepare E2E tests | |
# We want to run this if: | |
# - The build job was successful, not skipped | |
# - AND if the profiling node bindings were either successful or skipped | |
# AND if this is not a PR from a fork or dependabot | |
if: | | |
always() && needs.job_build.result == 'success' && | |
(needs.job_compile_bindings_profiling_node.result == 'success' || needs.job_compile_bindings_profiling_node.result == 'skipped') && | |
(github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && | |
github.actor != 'dependabot[bot]' | |
needs: [job_get_metadata, job_build, job_compile_bindings_profiling_node] | |
runs-on: ubuntu-24.04-large-js | |
timeout-minutes: 15 | |
steps: | |
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }}) | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ env.HEAD_COMMIT }} | |
- name: Set up Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: 'package.json' | |
- name: Restore caches | |
uses: ./.github/actions/restore-cache | |
env: | |
DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }} | |
- name: NX cache | |
uses: actions/cache/restore@v4 | |
with: | |
path: .nxcache | |
key: nx-Linux-${{ github.ref }}-${{ env.HEAD_COMMIT }} | |
# On develop branch, we want to _store_ the cache (so it can be used by other branches), but never _restore_ from it | |
restore-keys: ${{ env.NX_CACHE_RESTORE_KEYS }} | |
- name: Build tarballs | |
run: yarn build:tarball | |
- name: Stores tarballs in cache | |
uses: actions/cache/save@v4 | |
with: | |
path: ${{ github.workspace }}/packages/*/*.tgz | |
key: ${{ env.BUILD_PROFILING_NODE_CACHE_TARBALL_KEY }} | |
job_e2e_tests: | |
name: E2E ${{ matrix.label || matrix.test-application }} Test | |
# We only run E2E tests for non-fork PRs because the E2E tests require secrets to work and they can't be accessed from forks | |
# Dependabot PRs sadly also don't have access to secrets, so we skip them as well | |
# We need to add the `always()` check here because the previous step has this as well :( | |
# See: https://github.com/actions/runner/issues/2205 | |
if: | |
always() && needs.job_e2e_prepare.result == 'success' && | |
(github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && | |
github.actor != 'dependabot[bot]' | |
needs: [job_get_metadata, job_build, job_e2e_prepare] | |
runs-on: ubuntu-24.04 | |
timeout-minutes: 10 | |
env: | |
E2E_TEST_AUTH_TOKEN: ${{ secrets.E2E_TEST_AUTH_TOKEN }} | |
E2E_TEST_DSN: ${{ secrets.E2E_TEST_DSN }} | |
# Needed because some apps expect a certain prefix | |
NEXT_PUBLIC_E2E_TEST_DSN: ${{ secrets.E2E_TEST_DSN }} | |
PUBLIC_E2E_TEST_DSN: ${{ secrets.E2E_TEST_DSN }} | |
REACT_APP_E2E_TEST_DSN: ${{ secrets.E2E_TEST_DSN }} | |
E2E_TEST_SENTRY_ORG_SLUG: 'sentry-javascript-sdks' | |
E2E_TEST_SENTRY_TEST_PROJECT: 'sentry-javascript-e2e-tests' | |
strategy: | |
fail-fast: false | |
matrix: | |
test-application: | |
[ | |
'angular-17', | |
'cloudflare-astro', | |
'node-express-app', | |
'create-react-app', | |
'create-next-app', | |
'create-remix-app', | |
'create-remix-app-v2', | |
'create-remix-app-express-vite-dev', | |
'debug-id-sourcemaps', | |
'nextjs-app-dir', | |
'nextjs-14', | |
'react-create-hash-router', | |
'react-router-6-use-routes', | |
'standard-frontend-react', | |
'standard-frontend-react-tracing-import', | |
'sveltekit', | |
'sveltekit-2', | |
'generic-ts3.8', | |
'node-experimental-fastify-app', | |
'node-hapi-app', | |
'node-exports-test-app', | |
'vue-3', | |
'node-profiling' | |
] | |
build-command: | |
- false | |
label: | |
- false | |
# Add any variations of a test app here | |
# You should provide an alternate build-command as well as a matching label | |
include: | |
- test-application: 'create-react-app' | |
build-command: 'test:build-ts3.8' | |
label: 'create-react-app (TS 3.8)' | |
- test-application: 'standard-frontend-react' | |
build-command: 'test:build-ts3.8' | |
label: 'standard-frontend-react (TS 3.8)' | |
- test-application: 'create-next-app' | |
build-command: 'test:build-13' | |
label: 'create-next-app (next@13)' | |
- test-application: 'nextjs-app-dir' | |
build-command: 'test:build-13' | |
label: 'nextjs-app-dir (next@13)' | |
steps: | |
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }}) | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ env.HEAD_COMMIT }} | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 8.3.1 | |
- name: Set up Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: 'dev-packages/e2e-tests/package.json' | |
- name: Set up Bun | |
if: matrix.test-application == 'node-exports-test-app' | |
uses: oven-sh/setup-bun@v1 | |
- name: Restore caches | |
uses: ./.github/actions/restore-cache | |
env: | |
DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }} | |
- name: Restore tarball cache | |
uses: actions/cache/restore@v4 | |
with: | |
path: ${{ github.workspace }}/packages/*/*.tgz | |
key: ${{ env.BUILD_PROFILING_NODE_CACHE_TARBALL_KEY }} | |
- name: Get node version | |
id: versions | |
run: | | |
echo "echo node=$(jq -r '.volta.node' dev-packages/e2e-tests/package.json)" >> $GITHUB_OUTPUT | |
- name: Validate Verdaccio | |
run: yarn test:validate | |
working-directory: dev-packages/e2e-tests | |
- name: Prepare Verdaccio | |
run: yarn test:prepare | |
working-directory: dev-packages/e2e-tests | |
env: | |
E2E_TEST_PUBLISH_SCRIPT_NODE_VERSION: ${{ steps.versions.outputs.node }} | |
- name: Build E2E app | |
working-directory: dev-packages/e2e-tests/test-applications/${{ matrix.test-application }} | |
timeout-minutes: 5 | |
run: yarn ${{ matrix.build-command || 'test:build' }} | |
- name: Run E2E test | |
working-directory: dev-packages/e2e-tests/test-applications/${{ matrix.test-application }} | |
timeout-minutes: 5 | |
run: yarn test:assert | |
- name: Deploy Astro to Cloudflare | |
uses: cloudflare/pages-action@v1 | |
if: matrix.test-application == 'cloudflare-astro' | |
with: | |
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
projectName: ${{ secrets.CLOUDFLARE_PROJECT_NAME }} | |
directory: dist | |
workingDirectory: dev-packages/e2e-tests/test-applications/${{ matrix.test-application }} | |
job_required_jobs_passed: | |
name: All required jobs passed or were skipped | |
needs: | |
[ | |
job_build, | |
job_compile_bindings_profiling_node, | |
job_browser_build_tests, | |
job_browser_unit_tests, | |
job_bun_unit_tests, | |
job_deno_unit_tests, | |
job_node_unit_tests, | |
job_profiling_node_unit_tests, | |
job_nextjs_integration_test, | |
job_node_integration_tests, | |
job_browser_playwright_tests, | |
job_browser_integration_tests, | |
job_browser_loader_tests, | |
job_remix_integration_tests, | |
job_e2e_tests, | |
job_profiling_e2e_tests, | |
job_artifacts, | |
job_lint, | |
job_check_format, | |
job_circular_dep_check, | |
] | |
# Always run this, even if a dependent job failed | |
if: always() | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Check for failures | |
if: contains(needs.*.result, 'failure') | |
run: | | |
echo "One of the dependent jobs have failed. You may need to re-run it." && exit 1 | |
overhead_metrics: | |
name: Overhead metrics | |
needs: [job_get_metadata, job_build] | |
runs-on: ubuntu-24.04 | |
timeout-minutes: 30 | |
if: | | |
contains(github.event.pull_request.labels.*.name, 'ci-overhead-measurements') | |
steps: | |
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }}) | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ env.HEAD_COMMIT }} | |
- name: Set up Node | |
uses: actions/setup-node@v4 |
Bug: Node Compatibility Issue with Sentry Profiling
Removing @sentry/profiling-node
from DEFAULT_SKIP_TESTS_PACKAGES
causes the node-unit-tests
script to attempt running its test-suite on Node 8, 10, and 12. This fails because native bindings for these versions are no longer built or available, leading to test failures in CI and locally.
scripts/node-unit-tests.ts#L11-L27
sentry-javascript/scripts/node-unit-tests.ts
Lines 11 to 27 in a9b40fd
const CURRENT_NODE_VERSION = process.version.replace('v', '').split('.')[0] as NodeVersion; | |
const DEFAULT_SKIP_TESTS_PACKAGES = [ | |
'@sentry-internal/eslint-plugin-sdk', | |
'@sentry/ember', | |
'@sentry/browser', | |
'@sentry/vue', | |
'@sentry/react', | |
'@sentry/angular', | |
'@sentry/svelte', | |
'@sentry/replay', | |
'@sentry-internal/replay-canvas', | |
'@sentry-internal/feedback', | |
'@sentry/wasm', | |
'@sentry/bun', | |
'@sentry/deno', |
Was this report helpful? Give feedback by reacting with 👍 or 👎
ubuntu-20.04 is no longer working, so CI is no longer working and nothing can be merged in v7 :O