Problem/Motivation
It would be great if messages would be more helpful:
Migration d6_node did not meet the requirements
Proposed resolution
Remaining tasks
User interface changes
API changes
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | interdiff.txt | 3.49 KB | benjy |
| #13 | 2321609-13.patch | 18.77 KB | benjy |
| #9 | interdiff.txt | 4.57 KB | benjy |
| #9 | 2321609-9.patch | 17.13 KB | benjy |
| #7 | interdiff.txt | 1.32 KB | benjy |
Comments
Comment #1
manjit.singhCan you Please elaborate the same ?
Comment #2
rteijeiro commentedComment #3
hussainwebAdding related issue in Migrate Upgrade module.
Comment #4
benjy commentedHow about we refactor checkRequirements() to throw exceptions instead of returning false?
Comment #5
dawehnerI thought about introducing an RequirementsResult value object, but indeed an exception works fine here, because of the semantic meaning of it.
Comment #7
benjy commentedAdded a try/catch to the executable to catch the exceptions.
Comment #9
benjy commentedCouple more fixes. I added a try/catch to LoadEntity, previously we were just silently ignoring the the migration if the source plugin didn't meet the requirements. Maybe we should log that error somewhere?
Comment #10
dawehnerDid we considered to pass along the missing requirements, maybe someone wants to use it? In that case we probably need a new getter method on the exception (forgot that).
Do we really want to do nothing? Just curious.
Comment #11
benjy commentedYeah, passing along the requirements sounds like a good idea.
I asked the question in my previous comment about whether we should maybe log it somewhere? Previously, we were just ignore migrations that failed the requirements check.
Comment #13
benjy commentedFixed the remaining test and added getRequirements() and getRequirementsString() to RequirementsException. I've put the requirements into the message in MigrateExecutable but it doesn't seem to be any additional information other than what the message already gives us at this point.
Comment #14
dawehnerGiven that the requirements for example are in english anyway did you thought of dropping the translatablity here? For sure this would be out of scope, just asking.
Comment #15
dawehner.
Comment #16
alexpottCommitted ffde907 and pushed to 8.0.x. Thanks!