You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from my observation assets do no longer work as intended when you do the following:
run the asset for the first time
change asset's field structure (e.g rename a field)
startup asset again
There seems to be a implicit schema for asset services that have been run at least once.
Correct me if I am wrong: an asset's schema will be published unmodifiably at first startup of the asset (baratine will not update the schema if the asset's members structure has been modified between 2 startups). That means its currently operating in a schemaful way.
Example: running a refactored asset on the same data directory
For example consider this litte asset that I've been prototyping and assume it has already been run with baratine in the default working directory (temp/baratine/.../kraken)
I then restarted baratine with the new code using the same data directory - no errors were displayed while spinning up.
Later I realized that something must be "really broken" in my application - not a single API method did respond any more. After logging out on FINEST level and doding some debugging I could see that managedBooks was null at runtime!
Proposed improvement
Well ... I've made a stupid mistake but I think those kind of mistakes are likely to happen and baratine needs some improvement here.
Of course baratine can not automatically migrate the data - nor should it overwrite the schema unasked.
But I think baratine should abort asset load with a self-explanatory runtime exception when the runtime class of an asset does not match the used kraken schema.
This would to make a possible production setting more robust and would be saving developers' time.
regards
DonReeal
The text was updated successfully, but these errors were encountered:
donreeal
changed the title
@Asset Services load should fail when an asset's field structure is out of sync with its kraken schema
@Asset Services load should fail when field structure of an asset is out of sync with its kraken schema
Jan 8, 2017
Hey guys,
from my observation assets do no longer work as intended when you do the following:
There seems to be a implicit schema for asset services that have been run at least once.
Correct me if I am wrong: an asset's schema will be published unmodifiably at first startup of the asset (baratine will not update the schema if the asset's members structure has been modified between 2 startups). That means its currently operating in a schemaful way.
Example: running a refactored asset on the same data directory
For example consider this litte asset that I've been prototyping and assume it has already been run with baratine in the default working directory (temp/baratine/.../kraken)
I then changed the the name of the book field to managedBooks
I then restarted baratine with the new code using the same data directory - no errors were displayed while spinning up.
Later I realized that something must be "really broken" in my application - not a single API method did respond any more. After logging out on FINEST level and doding some debugging I could see that managedBooks was null at runtime!
Proposed improvement
Well ... I've made a stupid mistake but I think those kind of mistakes are likely to happen and baratine needs some improvement here.
Of course baratine can not automatically migrate the data - nor should it overwrite the schema unasked.
But I think baratine should abort asset load with a self-explanatory runtime exception when the runtime class of an asset does not match the used kraken schema.
This would to make a possible production setting more robust and would be saving developers' time.
regards
DonReeal
The text was updated successfully, but these errors were encountered: