Skip to content

Conversation

@mnocon
Copy link
Contributor

@mnocon mnocon commented Feb 11, 2026

Target: 5.0 (we need to wait until it's released)

Adding doc for https://github.com/ibexa/migrations/pull/430

In addition, because it was missing, I've added doc for the "sql: execute" step (this might be cherry-picked to 4.6 as well)

@github-actions
Copy link

Preview of modified files

Preview of modified Markdown:

@@ -0,0 +1,13 @@
-
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -0,0 +1,14 @@
-
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally:

09:15:17 NOTICE    [app] Executing migration: "l5"
09:15:17 INFO      [app] Processing step: 0
09:15:17 INFO      [app] Type "try_catch" | Mode: "execute" | Matching step: "Ibexa\Migration\ValueObject\Step\TryCatchStep"
09:15:17 INFO      [app] Processing step: 0
09:15:17 INFO      [app] Type "language" | Mode: "create" | Matching step: "Ibexa\Migration\ValueObject\Step\LanguageCreateStep"
✅ Migration l5 finished executing.

@mnocon mnocon added Needs DEV review Wait with merge PRs that shouldn't be merged instantly labels Feb 11, 2026
@mnocon mnocon marked this pull request as ready for review February 11, 2026 09:25
@mnocon mnocon requested a review from Steveb-p February 11, 2026 09:25
```

When an exception is thrown within a try-catch step, it's compared against the list of `allowed_exceptions`.
If the exception matches, it's caught and the migration continues or stops depending on the `stop_after_first_exception` configuration setting.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In both cases migration is treated as if it succeeded.

Non-matching exceptions throw immediately just like before.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Added in af4288e

@mnocon mnocon requested a review from a team February 11, 2026 10:41
@ibexa-workflow-automation-1 ibexa-workflow-automation-1 bot requested review from adriendupuis, dabrt and julitafalcondusza and removed request for a team February 11, 2026 10:41
@sonarqubecloud
Copy link

@github-actions
Copy link

code_samples/ change report

Before (on target branch)After (in current PR)

code_samples/data_migration/examples/sql_execute.yaml


code_samples/data_migration/examples/sql_execute.yaml

docs/content_management/data_migration/importing_data.md@141:```yaml
docs/content_management/data_migration/importing_data.md@142:[[= include_file('code_samples/data_migration/examples/sql_execute.yaml') =]]
docs/content_management/data_migration/importing_data.md@143:```

001⫶-
002⫶ type: sql
003⫶ mode: execute
004⫶ query:
005⫶ -
006⫶ driver: mysql
007⫶ sql: 'INSERT INTO test_table (test_value) VALUES ("foo");'
008⫶ -
009⫶ driver: sqlite
010⫶ sql: 'INSERT INTO test_table (test_value) VALUES ("foo");'
011⫶ -
012⫶ driver: postgresql
013⫶ sql: "INSERT INTO test_table (test_value) VALUES ('foo');"


code_samples/data_migration/examples/try_catch_step.yaml


code_samples/data_migration/examples/try_catch_step.yaml

docs/content_management/data_migration/importing_data.md@176:```yaml
docs/content_management/data_migration/importing_data.md@177:[[= include_file('code_samples/data_migration/examples/try_catch_step.yaml') =]]
docs/content_management/data_migration/importing_data.md@178:```

001⫶-
002⫶ type: try_catch
003⫶ mode: execute
004⫶ allowed_exceptions:
005⫶ - Throwable
006⫶ stop_after_first_exception: true
007⫶ steps:
008⫶ -
009⫶ type: language
010⫶ mode: create
011⫶ metadata:
012⫶ languageCode: ger-DE
013⫶ name: German
014⫶ enabled: true

docs/release_notes/ibexa_dxp_v5.0.md@21:``` yaml
docs/release_notes/ibexa_dxp_v5.0.md@22:[[= include_file('code_samples/data_migration/examples/try_catch_step.yaml') =]]
docs/release_notes/ibexa_dxp_v5.0.md@23:```

001⫶-
002⫶ type: try_catch
003⫶ mode: execute
004⫶ allowed_exceptions:
005⫶ - Throwable
006⫶ stop_after_first_exception: true
007⫶ steps:
008⫶ -
009⫶ type: language
010⫶ mode: create
011⫶ metadata:
012⫶ languageCode: ger-DE
013⫶ name: German
014⫶ enabled: true

Download colorized diff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs DOC review Wait with merge PRs that shouldn't be merged instantly

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants