mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
fix(core): Ensure sentry releases follow semver (no-changelog) (#13907)
This commit is contained in:
committed by
GitHub
parent
eec325127c
commit
86b791167a
6
.github/workflows/release-publish.yml
vendored
6
.github/workflows/release-publish.yml
vendored
@@ -160,7 +160,7 @@ jobs:
|
||||
continue-on-error: true
|
||||
with:
|
||||
projects: ${{ secrets.SENTRY_FRONTEND_PROJECT }}
|
||||
version: ${{ needs.publish-to-npm.outputs.release }}
|
||||
version: n8n@${{ needs.publish-to-npm.outputs.release }}
|
||||
sourcemaps: packages/frontend/editor-ui/dist
|
||||
|
||||
- name: Create a backend release
|
||||
@@ -168,7 +168,7 @@ jobs:
|
||||
continue-on-error: true
|
||||
with:
|
||||
projects: ${{ secrets.SENTRY_BACKEND_PROJECT }}
|
||||
version: ${{ needs.publish-to-npm.outputs.release }}
|
||||
version: n8n@${{ needs.publish-to-npm.outputs.release }}
|
||||
sourcemaps: packages/cli/dist packages/core/dist packages/nodes-base/dist packages/@n8n/n8n-nodes-langchain/dist
|
||||
|
||||
- name: Create a task runner release
|
||||
@@ -176,7 +176,7 @@ jobs:
|
||||
continue-on-error: true
|
||||
with:
|
||||
projects: ${{ secrets.SENTRY_TASK_RUNNER_PROJECT }}
|
||||
version: ${{ needs.publish-to-npm.outputs.release }}
|
||||
version: n8n@${{ needs.publish-to-npm.outputs.release }}
|
||||
sourcemaps: packages/core/dist packages/workflow/dist packages/@n8n/task-runner/dist
|
||||
|
||||
trigger-release-note:
|
||||
|
||||
@@ -5,6 +5,12 @@ import type { ErrorReporter } from 'n8n-core';
|
||||
import { TaskRunnerSentry } from '../task-runner-sentry';
|
||||
|
||||
describe('TaskRunnerSentry', () => {
|
||||
const commonConfig = {
|
||||
n8nVersion: '1.0.0',
|
||||
environment: 'local',
|
||||
deploymentName: 'test',
|
||||
};
|
||||
|
||||
afterEach(() => {
|
||||
jest.resetAllMocks();
|
||||
});
|
||||
@@ -12,10 +18,8 @@ describe('TaskRunnerSentry', () => {
|
||||
describe('filterOutUserCodeErrors', () => {
|
||||
const sentry = new TaskRunnerSentry(
|
||||
{
|
||||
...commonConfig,
|
||||
dsn: 'https://sentry.io/123',
|
||||
n8nVersion: '1.0.0',
|
||||
environment: 'local',
|
||||
deploymentName: 'test',
|
||||
},
|
||||
mock(),
|
||||
);
|
||||
@@ -103,10 +107,8 @@ describe('TaskRunnerSentry', () => {
|
||||
it('should not configure sentry if dsn is not set', async () => {
|
||||
const sentry = new TaskRunnerSentry(
|
||||
{
|
||||
...commonConfig,
|
||||
dsn: '',
|
||||
n8nVersion: '1.0.0',
|
||||
environment: 'local',
|
||||
deploymentName: 'test',
|
||||
},
|
||||
mockErrorReporter,
|
||||
);
|
||||
@@ -119,10 +121,8 @@ describe('TaskRunnerSentry', () => {
|
||||
it('should configure sentry if dsn is set', async () => {
|
||||
const sentry = new TaskRunnerSentry(
|
||||
{
|
||||
...commonConfig,
|
||||
dsn: 'https://sentry.io/123',
|
||||
n8nVersion: '1.0.0',
|
||||
environment: 'local',
|
||||
deploymentName: 'test',
|
||||
},
|
||||
mockErrorReporter,
|
||||
);
|
||||
@@ -132,7 +132,7 @@ describe('TaskRunnerSentry', () => {
|
||||
expect(mockErrorReporter.init).toHaveBeenCalledWith({
|
||||
dsn: 'https://sentry.io/123',
|
||||
beforeSendFilter: sentry.filterOutUserCodeErrors,
|
||||
release: '1.0.0',
|
||||
release: 'n8n@1.0.0',
|
||||
environment: 'local',
|
||||
serverName: 'test',
|
||||
serverType: 'task_runner',
|
||||
@@ -146,10 +146,8 @@ describe('TaskRunnerSentry', () => {
|
||||
it('should not shutdown sentry if dsn is not set', async () => {
|
||||
const sentry = new TaskRunnerSentry(
|
||||
{
|
||||
...commonConfig,
|
||||
dsn: '',
|
||||
n8nVersion: '1.0.0',
|
||||
environment: 'local',
|
||||
deploymentName: 'test',
|
||||
},
|
||||
mockErrorReporter,
|
||||
);
|
||||
@@ -162,10 +160,8 @@ describe('TaskRunnerSentry', () => {
|
||||
it('should shutdown sentry if dsn is set', async () => {
|
||||
const sentry = new TaskRunnerSentry(
|
||||
{
|
||||
...commonConfig,
|
||||
dsn: 'https://sentry.io/123',
|
||||
n8nVersion: '1.0.0',
|
||||
environment: 'local',
|
||||
deploymentName: 'test',
|
||||
},
|
||||
mockErrorReporter,
|
||||
);
|
||||
|
||||
@@ -22,7 +22,7 @@ export class TaskRunnerSentry {
|
||||
await this.errorReporter.init({
|
||||
serverType: 'task_runner',
|
||||
dsn,
|
||||
release: n8nVersion,
|
||||
release: `n8n@${n8nVersion}`,
|
||||
environment,
|
||||
serverName: deploymentName,
|
||||
beforeSendFilter: this.filterOutUserCodeErrors,
|
||||
|
||||
@@ -74,7 +74,7 @@ export abstract class BaseCommand extends Command {
|
||||
serverType: this.instanceSettings.instanceType,
|
||||
dsn: backendDsn,
|
||||
environment,
|
||||
release: N8N_VERSION,
|
||||
release: `n8n@${N8N_VERSION}`,
|
||||
serverName: deploymentName,
|
||||
releaseDate: N8N_RELEASE_DATE,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user