Skip to content

Commit

Permalink
Merge pull request #10 from eyaljoyous/dev
Browse files Browse the repository at this point in the history
Master <- Dev
  • Loading branch information
omrijoyous authored Jun 12, 2023
2 parents 23495a6 + 84d07b1 commit 8113ddd
Show file tree
Hide file tree
Showing 105 changed files with 14,150 additions and 5,783 deletions.
3 changes: 3 additions & 0 deletions .env.local
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ N8N_LOG_LEVEL=debug
REDIS_URL='redis://localhost:6379'
DB_POSTGRESDB_SCHEMA=local
PORT=5678
FOUNDELASTICSEARCH_URL='http://localhost:9200'
FOUNDELASTICSEARCH_APIKEY=''
FOUNDELASTICSEARCH_INDEX='local'
10 changes: 7 additions & 3 deletions .github/workflows/test-workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:

- uses: pnpm/[email protected]
with:
version: 8.1.0
version: 8.6.1

- uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -69,8 +69,9 @@ jobs:
shell: bash

- name: Run tests
run: n8n/packages/cli/bin/n8n executeBatch --shallow --skipList=test-workflows/skipList.txt --shortOutput --concurrency=16 --compare=test-workflows/snapshots
run: n8n/packages/cli/bin/n8n executeBatch --shallow --skipList=test-workflows/skipList.txt --githubWorkflow --shortOutput --concurrency=16 --compare=test-workflows/snapshots
shell: bash
id: tests
env:
N8N_ENCRYPTION_KEY: ${{secrets.ENCRYPTION_KEY}}
SKIP_STATISTICS_EVENTS: true
Expand Down Expand Up @@ -98,4 +99,7 @@ jobs:
status: ${{ job.status }}
channel: '#updates-build-alerts'
webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}
message: Test workflows failed (${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})
message: |
🛑 Workflow test failed 🛑:
${{ steps.tests.outputs.slackMessage}}
Sent by *Github Action*: <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}| Test workflow>
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ cypress/videos/*
cypress/screenshots/*
*.swp
.env
.env.local.with.aws
dump.rdb
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
# [0.231.0](https://github.com/n8n-io/n8n/compare/[email protected]@0.231.0) (2023-05-31)


### Bug Fixes

* **Code Node:** Fix `item` and `items` alias regression ([#6331](https://github.com/n8n-io/n8n/issues/6331)) ([54e3838](https://github.com/n8n-io/n8n/commit/54e3838daed1f0931a04ba76cfd1ea7519c0e382))
* **Code Node:** Update vm2 to address CVE-2023-32313 ([#6318](https://github.com/n8n-io/n8n/issues/6318)) ([bcbec52](https://github.com/n8n-io/n8n/commit/bcbec52552d52b0509659cab13112e1377a256b3))
* **core:** Optimize getSharedWorkflowIds query ([#6314](https://github.com/n8n-io/n8n/issues/6314)) ([0631f69](https://github.com/n8n-io/n8n/commit/0631f69d98e5420faebba1a54d9ad47a2664d110))
* **core:** Prevent prototype pollution on injectable services ([#6309](https://github.com/n8n-io/n8n/issues/6309)) ([d94c20a](https://github.com/n8n-io/n8n/commit/d94c20ada543767f700475b40ef7174c433c26c5))
* **editor:** Fix locale plularisation if count is 0 ([#6312](https://github.com/n8n-io/n8n/issues/6312)) ([0d88bd7](https://github.com/n8n-io/n8n/commit/0d88bd7c1ae95cf077c2fa231d942204ff3b8f68))
* **editor:** Fix Luxon date parsing of ExecutionsUsage component ([#6333](https://github.com/n8n-io/n8n/issues/6333)) ([8f0ff46](https://github.com/n8n-io/n8n/commit/8f0ff460b11999f4d78f8313910358aa87311713))
* **editor:** Update SSO settings styles ([#6342](https://github.com/n8n-io/n8n/issues/6342)) ([5ae1124](https://github.com/n8n-io/n8n/commit/5ae1124106e7597d0943c371eae6aba6c105fd6b))
* **Execute Command Node:** Block executions when `command` is empty ([#6308](https://github.com/n8n-io/n8n/issues/6308)) ([011d577](https://github.com/n8n-io/n8n/commit/011d5778b15232cff94a321dfee18c3d7489f93d))
* Show `Ask AI` only on Code Node ([#6336](https://github.com/n8n-io/n8n/issues/6336)) ([da856d1](https://github.com/n8n-io/n8n/commit/da856d1c6593b43e1ce8d1becb1464c19c908e78))


### Features

* Add manual login option and password reset link for SSO ([#6328](https://github.com/n8n-io/n8n/issues/6328)) ([77e3f15](https://github.com/n8n-io/n8n/commit/77e3f1551dd7473a69f8833be5678d98964142e1))
* **core:** Add metadata (customdata) to event log ([#6334](https://github.com/n8n-io/n8n/issues/6334)) ([792b1c1](https://github.com/n8n-io/n8n/commit/792b1c1ffb0eb279bc3451787891ca3835f59d9f))
* **editor:** Implement Resource Mapper component ([#6207](https://github.com/n8n-io/n8n/issues/6207)) ([04cfa54](https://github.com/n8n-io/n8n/commit/04cfa548af3c7a25f1f0a36ddfb1de6a9e3f2169)), closes [#5752](https://github.com/n8n-io/n8n/issues/5752) [#5814](https://github.com/n8n-io/n8n/issues/5814)



# [0.230.0](https://github.com/n8n-io/n8n/compare/[email protected]@0.230.0) (2023-05-24)


Expand Down
66 changes: 0 additions & 66 deletions cypress/e2e/22-user-activation-modal.cy.ts

This file was deleted.

90 changes: 0 additions & 90 deletions cypress/fixtures/Settings_user_activation_modal_enabled.json

This file was deleted.

2 changes: 0 additions & 2 deletions cypress/pages/modals/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
export * from './credentials-modal';
export * from './message-box';
export * from './workflow-sharing-modal';
export * from './user-activation-survey-modal';

10 changes: 0 additions & 10 deletions cypress/pages/modals/user-activation-survey-modal.ts

This file was deleted.

10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "n8n",
"version": "0.230.0",
"version": "0.231.0",
"private": true,
"homepage": "https://n8n.io",
"engines": {
"node": ">=16.9",
"pnpm": ">=8.1"
"pnpm": ">=8.6"
},
"packageManager": "pnpm@8.1.0",
"packageManager": "pnpm@8.6.1",
"scripts": {
"preinstall": "node scripts/block-npm-install.js",
"build": "turbo run build",
Expand All @@ -34,6 +34,8 @@
"test:e2e:all": "cross-env E2E_TESTS=true NODE_OPTIONS=--dns-result-order=ipv4first start-server-and-test start http://localhost:5678/favicon.ico 'cypress run --headless'"
},
"dependencies": {
"@elastic/elasticsearch": "^8.8.0",
"aws-sdk": "^2.1394.0",
"n8n": "workspace:*"
},
"devDependencies": {
Expand Down Expand Up @@ -86,7 +88,7 @@
"prettier": "^2.8.3",
"tslib": "^2.5.0",
"ts-node": "^10.9.1",
"typescript": "^5.0.3",
"typescript": "^5.1.3",
"xml2js": "^0.5.0",
"cpy@8>globby": "^11.1.0",
"qqjs>globby": "^11.1.0"
Expand Down
13 changes: 13 additions & 0 deletions packages/cli/BREAKING-CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ This list shows all the versions which include breaking changes and how to upgra
### What changed?

Due to Node.js/OpenSSL upgrade, the following crypto algorithms are not supported anymore.

- RSA-MD4
- RSA-MDC2
- md4
Expand All @@ -18,6 +19,18 @@ Due to Node.js/OpenSSL upgrade, the following crypto algorithms are not supporte

If you're using any of the above mentioned crypto algorithms in Crypto node in any of your workflows, then please update the algorithm property in the node to one of the supported values.

### What changed?

The `LoneScale List` node has been renamed to `LoneScale`.

### When is action necessary?

If you have used the `LoneScale List` node in any of your workflows.

### How to upgrade:

Update any workflows using `LoneScale List` to use the updated node.

## 0.226.0

### What changed?
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "n8n",
"version": "0.230.0",
"version": "0.231.0",
"description": "n8n Workflow Automation Tool",
"license": "SEE LICENSE IN LICENSE.md",
"homepage": "https://n8n.io",
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/License.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export class License {
}

isAdvancedExecutionFiltersEnabled() {
return this.isFeatureEnabled(LICENSE_FEATURES.ADVANCED_EXECUTION_FILTERS);
return true;
}

isVariablesEnabled() {
Expand Down
4 changes: 1 addition & 3 deletions packages/cli/src/Server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,6 @@ export class Server extends AbstractServer {
},
personalizationSurveyEnabled:
config.getEnv('personalization.enabled') && config.getEnv('diagnostics.enabled'),
userActivationSurveyEnabled:
config.getEnv('userActivationSurvey.enabled') && config.getEnv('diagnostics.enabled'),
defaultLocale: config.getEnv('defaultLocale'),
userManagement: {
enabled: isUserManagementEnabled(),
Expand Down Expand Up @@ -1248,7 +1246,7 @@ export class Server extends AbstractServer {
throw new ResponseHelper.NotFoundError('Execution not found');
}

const execution = await Db.collections.Execution.findOne({
const execution = await Db.collections.Execution.exist({
where: {
id: executionId,
workflowId: In(sharedWorkflowIds),
Expand Down
25 changes: 22 additions & 3 deletions packages/cli/src/WaitTracker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@ import * as Db from '@/Db';
import * as ResponseHelper from '@/ResponseHelper';
import type {
IExecutionFlattedDb,
IExecutionResponse,
IExecutionsStopData,
IWorkflowExecutionDataProcess,
} from '@/Interfaces';
import { WorkflowRunner } from '@/WorkflowRunner';
import { getWorkflowOwner } from '@/UserManagement/UserManagementHelper';
import { recoverExecutionDataFromEventLogMessages } from './eventbus/MessageEventBus/recoverEvents';

@Service()
export class WaitTracker {
Expand Down Expand Up @@ -106,12 +108,29 @@ export class WaitTracker {
// Also check in database
const execution = await Db.collections.Execution.findOneBy({ id: executionId });

if (execution === null || !execution.waitTill) {
if (execution === null) {
throw new Error(`The execution ID "${executionId}" could not be found.`);
}

const fullExecutionData = ResponseHelper.unflattenExecutionData(execution);

if (!['new', 'unknown', 'waiting', 'running'].includes(execution.status)) {
throw new Error(
`Only running or waiting executions can be stopped and ${executionId} is currently ${execution.status}.`,
);
}
let fullExecutionData: IExecutionResponse;
try {
fullExecutionData = ResponseHelper.unflattenExecutionData(execution);
} catch (error) {
// if the execution ended in an unforseen, non-cancelable state, try to recover it
await recoverExecutionDataFromEventLogMessages(executionId, [], true);
// find recovered data
const recoveredExecution = await Db.collections.Execution.findOneBy({ id: executionId });
if (recoveredExecution) {
fullExecutionData = ResponseHelper.unflattenExecutionData(recoveredExecution);
} else {
throw new Error(`Execution ${executionId} could not be recovered or canceled.`);
}
}
// Set in execution in DB as failed and remove waitTill time
const error = new WorkflowOperationError('Workflow-Execution has been canceled!');

Expand Down
1 change: 1 addition & 0 deletions packages/cli/src/commands/Interfaces.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
interface IResult {
totalWorkflows: number;
slackMessage: string;
summary: {
failedExecutions: number;
successfulExecutions: number;
Expand Down
Loading

0 comments on commit 8113ddd

Please sign in to comment.